Skip to main content

Extend AI Music (v5)

  • The API supports only synchronous responses

Endpoint

  • POST /v5/extend/music

Request Parameters

ParameterTypeDescriptionRequiredDefault Value
audio_urlstringURL of the audio file to extend.YesN/A
promptstringPrompt for guiding the extension.NoN/A
durationintegerDuration to extend in seconds.No30
sidestringWhich side to extend: left or right.Noright
styleOfMusicstringMusical style to guide the extension.NoN/A
inferStepintegerNumber of inference steps (higher = better quality, slower).NoN/A
guidanceScalefloatGuidance scale for prompt adherence (1.0-15.0).NoN/A
omegaScalefloatOmega scale for audio quality refinement.NoN/A
retakeVariancefloatVariance for regeneration attempts.NoN/A
refAudioStrengthfloatReference audio influence strength (0.0-1.0).NoN/A
manualSeedsarrayManual seeds for reproducible outputs.NoN/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())

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."
}
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"
}