task_id, then poll for the result.duration — 50 credits/second at 480p, 100 credits/second at 720p. A 5-second 480p video costs 250 credits; a 15-second 720p video costs 1500 credits. Each request returns two videos. Credits are refunded automatically if the task fails.prompt + duration.first_frame_url.first_frame_url + last_frame_url (cannot be combined with reference images).reference_image_urls (up to 9), alone or with a first frame.clip_id of a clip you generated, optional clip_start_s / clip_end_s to pick the part of the song, and lip_sync: true to sync a singer to it. If you send clip_end_s, clip_end_s - clip_start_s must equal duration.clip_id the MP4 carries the song audio.task_id in the responseGET /api/v1/sonic/task/{task_id} until data.state is succeeded (HTTP 202 while processing; jobs usually finish in 15–60 seconds)video_url (MP4), poster_url, last_frame_url, width, height and durationwebhook_url is not supported for video yet — poll the task endpoint.{
"code": 200,
"message": "success",
"data": {
"task_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"task_type": "video",
"state": "succeeded",
"videos": [
{
"video_id": "crt_01a20f98-6943-7225-a49b-6bd8bb889ddd",
"state": "succeeded",
"video_url": "https://files.aimusicapi.ai/media/video-crt_01a20f98-6943-7225-a49b-6bd8bb889ddd.mp4",
"poster_url": "https://files.aimusicapi.ai/media/video-crt_01a20f98-6943-7225-a49b-6bd8bb889ddd-poster.jpg",
"last_frame_url": "https://files.aimusicapi.ai/media/video-crt_01a20f98-6943-7225-a49b-6bd8bb889ddd-last-frame.jpg",
"width": 480,
"height": 840,
"duration": 6.58
}
]
}
}{
"type": "failed",
"error": "The video was blocked by content moderation. Please change the prompt or images and try again.",
"reason_code": "moderation",
"retriable": false,
"refund_processed": true
}