Documentation Index Fetch the complete documentation index at: https://help.soundverse.ai/llms.txt
Use this file to discover all available pages before exploring further.
Extend AI Song (v6)
The API supports both streaming and synchronous responses
Endpoints
POST /v6/extend/song - streaming
POST /v6/extend/song/sync - synchronous
Request Parameters
Parameter Type Description Required Default Value audio_urlstring URL of the audio file to extend Yes N/A lyricsstring Lyrics to guide the extension style and mood. Yes N/A promptstring Prompt to guide the extension style and mood. No N/A extend_atinteger Position (in ms) to extend the song at [8000,420000] Yes N/A
Example Request
{
"audio_url" : "https://storage.soundverse.ai/.../original_song.mp3" ,
"lyrics" : "These are the song lyrics to guide the extension" ,
}
Code Examples - Streaming
🐍 Python
⚡ JavaScript
💻 cURL
import requests
import json
url = "https://api.soundverse.ai/v6/extend/song"
headers = {
"Authorization" : "Bearer your_api_key_here" ,
"Content-Type" : "application/json"
}
payload = {
"audio_url" : "https://storage.soundverse.ai/.../original_song.mp3" ,
"lyrics" : "These are the song lyrics to guide the extension" ,
}
response = requests.post(url, json = payload, headers = headers, stream = True )
# Process streaming response
for line in response.iter_lines():
if line:
text = line.decode( 'utf-8' )
if text.startswith( 'data: ' ):
data = json.loads(text[ 6 :])
print (data)
Code Examples - Synchronous
🐍 Python
⚡ JavaScript
💻 cURL
import requests
url = "https://api.soundverse.ai/v6/extend/song/sync"
headers = {
"Authorization" : "Bearer your_api_key_here" ,
"Content-Type" : "application/json"
}
payload = {
"audio_url" : "https://storage.soundverse.ai/.../original_song.mp3" ,
"lyrics" : "These are the song lyrics to guide the extension" ,
}
response = requests.post(url, json = payload, headers = headers)
print (response.json())
Streaming Response
Fields
🛈 The fields below are used in the chunks sent by SSE during the streaming process.
Parameter Type Description isCompleteboolIndicates if the streaming response is complete. statusstringCurrent status of the extension process. chunkIndexintegerIndex of the current chunk in the streaming sequence. message_idstringUnique identifier for the extension request. stream_urlstringURL to access the generated audio stream when ready. versionintegerVersion of the generated content. album_artstringURL of the album art associated with the generated content. song_namestringName of the generated track. progressintegerProgress percentage of the generation process. 0-100 streaming_readyboolIndicates if audio is ready for streaming. versionintegerVersion number of the generated audio. audio_urlstringURL of the generated audio file. errorstringError message if any issues occurred during processing. operationstringType of operation being performed (e.g., “extend_song”).
Synchronous 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_song_v1.mp3" ,
"song_name" : "Extended Song" ,
"licenses" : {
"licenses" : "Royalty Free"
}
},
{
"audio_url" : "https://storage.soundverse.ai/x-one/.../.../extended_song_v2.mp3" ,
"song_name" : "Extended Song" ,
"licenses" : {
"licenses" : "Royalty Free"
}
}
],
"ai_reply" : "Your song has been extended successfully."
}
Possible Errors
Rate Limit Exceeded:
{
"success" : false ,
"message" : "Rate limits have been passed for the user."
}
Insufficient Balance:
{
"success" : false ,
"message" : "Insufficient balance for this operation."
}
Invalid Prompt:
{
"detail" : "Invalid or empty prompt provided"
}
NSFW Content Detected:
{
"success" : false ,
"message" : "NSFW words detected. Please try again with different lyrics."
}
Service Unavailable:
{
"success" : false ,
"message" : "Service temporarily unavailable. Please try again in a moment." ,
"error" : "Database connection pool exhausted"
}