Extend AI Music (v5)
- The API supports only synchronous responses
Endpoint
- POST
/v5/extend/music
Request Parameters
| Parameter | Type | Description | Required | Default Value |
|---|---|---|---|---|
audio_url | string | URL of the audio file to extend. | Yes | N/A |
prompt | string | Prompt for guiding the extension. | No | N/A |
duration | integer | Duration to extend in seconds. | No | 30 |
side | string | Which side to extend: left or right. | No | right |
styleOfMusic | string | Musical style to guide the extension. | No | N/A |
inferStep | integer | Number of inference steps (higher = better quality, slower). | No | N/A |
guidanceScale | float | Guidance scale for prompt adherence (1.0-15.0). | No | N/A |
omegaScale | float | Omega scale for audio quality refinement. | No | N/A |
retakeVariance | float | Variance for regeneration attempts. | No | N/A |
refAudioStrength | float | Reference audio influence strength (0.0-1.0). | No | N/A |
manualSeeds | array | Manual seeds for reproducible outputs. | No | N/A |
Example Request
{
"audio_url": "https://storage.soundverse.ai/.../original_music.mp3",
"prompt": "Add a climactic orchestral section",
"duration": 30,
"side": "right",
"styleOfMusic": "orchestral",
"guidanceScale": 7.5
}
Code Examples
import requests
url = "https://api.soundverse.ai/v5/extend/music/sync"
headers = {
"Authorization": "Bearer your_api_key_here",
"Content-Type": "application/json"
}
payload = {
"audio_url": "https://storage.soundverse.ai/.../original_music.mp3",
"prompt": "Add a climactic orchestral section",
"duration": 30,
"side": "right",
"styleOfMusic": "orchestral",
"guidanceScale": 7.5
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.soundverse.ai/v5/extend/music/sync";
const headers = {
Authorization: "Bearer your_api_key_here",
"Content-Type": "application/json",
};
const payload = {
audio_url: "https://storage.soundverse.ai/.../original_music.mp3",
prompt: "Add a climactic orchestral section",
duration: 30,
side: "right",
styleOfMusic: "orchestral",
guidanceScale: 7.5,
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
curl -X POST "https://api.soundverse.ai/v5/extend/music/sync" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"audio_url": "https://storage.soundverse.ai/.../original_music.mp3",
"prompt": "Add a climactic orchestral section",
"duration": 30,
"side": "right",
"styleOfMusic": "orchestral",
"guidanceScale": 7.5
}'
Response
Sample Synchronous Output
{
"message_id": "...",
"album_art": "https://storage.soundverse.ai/soundverse-album-art/...album_art.png",
"audio_data": [
{
"audio_url": "https://storage.soundverse.ai/x-one/.../.../extended_music.mp3",
"song_name": "Extended Music Track",
"licenses": {
"licenses": "Royalty Free"
}
}
],
"ai_reply": "Your music has been extended successfully."
}
Possible Errors
Rate Limit Exceeded:{
"success": false,
"message": "Rate limits have been passed for the user."
}
{
"success": false,
"message": "Insufficient balance for this operation."
}
{
"detail": "Invalid or empty prompt provided"
}
{
"success": false,
"message": "NSFW words detected. Please try again with different lyrics."
}
{
"success": false,
"message": "Service temporarily unavailable. Please try again in a moment.",
"error": "Database connection pool exhausted"
}

