sonic
upload and extend music
One-stop API to upload an audio file and extend it with new content. This combines the upload and extend operations into a single request.
Credits cost: 15
Workflow:
- Upload the audio file to get a clip_id
- Extend the uploaded clip with the specified parameters
- Poll the result using get-music endpoint with the returned task_id
Polling Result
Use GET /api/v1/sonic/task/{task_id} to poll the result.
Standard Response (auto_concat: false)
{
"code": 200,
"data": [
{
"clip_id": "ext-clip-1",
"state": "succeeded",
"title": "My Song",
"audio_url": "https://cdn1.suno.ai/ext-clip-1.mp3",
"duration": 60
}
],
"message": "success"
}
Auto-Concat Response (auto_concat: true)
When auto_concat is enabled, the response contains paired objects:
Stage 1: Extend completed, concat in progress
{
"code": 200,
"data": [
{
"extended": { "clip_id": "ext-clip-1", "state": "succeeded", "duration": 60, ... },
"full": null
}
],
"message": "extend completed, concat in progress"
}
Stage 2: Fully completed
{
"code": 200,
"data": [
{
"extended": { "clip_id": "ext-clip-1", "state": "succeeded", "duration": 60, ... },
"full": { "clip_id": "concat-clip-1", "state": "succeeded", "duration": 240, ... }
}
],
"message": "success"
}
The extended and full fields are paired - each full song is the concatenation of the original + corresponding extended segment.
post/api/v1/sonic/upload-extend
Request
- Base URLhttps://api.musicapi.ai
- URLhttps://api.musicapi.ai/api/v1/sonic/upload-extend
- AuthHTTP bearer
Request body
Example request
{
"duration": 120
}Response
Success
Changes
No recorded changes to this operation across all 1 revision of this API.