Extend Audio Endpoint
Overview
Extends an existing audio clip by generating additional content. Can continue from a specific time point or extend from the end.
🔗 Quick Links
- 📊 Dashboard - Manage accounts, view logs, and monitor system status
- 📚 API Index - Complete API reference
Endpoint
POST /api/extend_audio
POST /[accountId]/api/extend_audio
Request
Headers
Content-Type: application/json
Body (JSON)
audio_id (string, required)
ID of the audio clip to extend
prompt (string, optional)
Prompt for the extended content
continue_at (string, optional)
Time to continue from (format: "mm:ss", e.g., "00:30")
| tags | string | No | "" | Style/genre tags |
| negative_tags | string | No | "" | Negative tags to avoid |
| title | string | No | - | Title for the extended audio |
| model | string | No | "chirp-crow" | Model to use |
| wait_audio | boolean | No | false | Whether to wait for audio generation to complete |
Example Request
curl -X POST https://your-domain.com/api/extend_audio \
-H "Content-Type: application/json" \
-d '{
"audio_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"prompt": "Continue with a guitar solo",
"continue_at": "00:30",
"tags": "rock, guitar",
"wait_audio": true
}'
const response = await fetch('/api/extend_audio', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
audio_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
prompt: 'Continue with a guitar solo',
continue_at: '00:30',
tags: 'rock, guitar',
wait_audio: true
})
});
Response
Success Response (200 OK)
Returns an array of AudioInfo objects:
[
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"title": "Extended Song",
"image_url": "https://cdn.suno.ai/image-67890.png",
"lyric": "Continue with a guitar solo",
"audio_url": "https://cdn.suno.ai/audio-67890.mp3",
"video_url": "https://cdn.suno.ai/video-67890.mp4",
"created_at": "2025-12-09T15:00:00.000Z",
"model_name": "chirp-crow",
"status": "complete",
"prompt": "Continue with a guitar solo",
"type": "extension",
"tags": "rock, guitar",
"duration": "240"
}
]
Status Code: 200
Content-Type: application/json
Bad Request (400)
When audio_id is missing:
{
"error": "Audio ID is required"
}
Status Code: 400
Content-Type: application/json
Payment Required (402)
When account credits are insufficient:
{
"error": "Insufficient credits"
}
Status Code: 402
Content-Type: application/json
Internal Server Error (500)
When an error occurs:
{
"error": "Internal server error: [error details]"
}
Status Code: 500
Content-Type: application/json
Method Not Allowed (405)
When using an unsupported HTTP method:
Status Code: 405
Headers: Allow: POST
Notes
- If
continue_atis not provided, extends from the end of the song continue_atformat: "mm:ss" (e.g., "00:30" for 30 seconds)- If
wait_audioistrue, waits for generation to complete (may take time) - All responses include CORS headers