MusicAPI
HomeDocs
HomeDocs
  1. sonic
  • Introduction
  • Credits Usage Guide
  • Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • sonic
    • Sonic Instructions
    • create / extend / cover / remaster / add vocals / add instrumental
      POST
    • upload and extend music
      POST
    • upload and cover music
      POST
    • create persona
      POST
    • sample
      POST
    • mashup
      POST
    • get BPM
      POST
    • get VOX
      POST
    • get wav
      POST
    • get midi
      POST
    • get lyrics timeline
      POST
    • upsample tags
      POST
    • stems basic
      POST
    • stems full
      POST
    • replace section
      POST
    • upload music
      POST
    • get music
      GET
  • riffusion(Deprecated)
    • Riffusion instructions
    • create music (with lyrics)
      POST
    • create music (with description)
      POST
    • cover music
      POST
    • extend music
      POST
    • replace music section
      POST
    • swap music sound
      POST
    • swap music vocals
      POST
    • upload
      POST
    • get music
      GET
  • producer
    • Producer instructions
    • Complete Request Examples
    • create music
    • upload
    • download
    • get music
  • studio(Unavailable)
    • Studio Instructions
    • description mode (Use case1)
    • extend mode (Use case2)
    • custom mode (Use case3)
    • instrumental mode (Use case4)
    • get music
  • lyrics generation
    • Make Lyrics
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
    • create instrument music
    • get music
  • get-credits
    GET
  • Schemas
    • 记录不存在
    • 参数不正确
HomeDocs
HomeDocs
  1. sonic

Sonic Instructions

Sonic API Instructions#

The Sonic API enables AI-powered music generation with multiple modes and advanced controls. This guide covers all available features and parameters.

Quick Start#


Task Types#

task_typeDescriptionCreditsRequired Parameters
create_musicCreate new music from scratch15custom_mode, mv
extend_musicExtend an existing song from a timestamp15continue_clip_id, continue_at, custom_mode, mv
cover_musicCreate a cover version with style transformation15continue_clip_id, custom_mode, mv
concat_musicConcatenate/merge songs together2continue_clip_id only
persona_musicGenerate music with a virtual singer's voice15persona_id, custom_mode, mv
extend_upload_musicExtend your own uploaded music15continue_clip_id, continue_at, custom_mode, mv
cover_upload_musicCover your own uploaded music15continue_clip_id, custom_mode, mv
Important: When extending or covering your own uploaded music (via the upload endpoint), you must use extend_upload_music or cover_upload_music task types instead of extend_music or cover_music.

Generation Modes#

Custom Mode (custom_mode: true)#

Provide your own lyrics with full control over song structure.
{
  "custom_mode": true,
  "mv": "sonic-v4-5",
  "title": "Starry Night",
  "tags": "pop, dreamy",
  "prompt": "[Verse]\nStars they shine above me\nMoonlight softly glows\n\n[Chorus]\nStarry night, starry night\nLet your light ignite"
}
Supported Structure Tags:
[Verse] - Main verses
[Chorus] - Repeated chorus sections
[Pre-Chorus] - Build-up before chorus
[Bridge] - Contrasting middle section
[Outro] - Ending section
[Intro] - Opening section
[Hook] - Catchy repeated phrase
[Break] - Instrumental break
Character Limits for prompt:
Model VersionMax Characters
sonic-v3-5, sonic-v43,000
sonic-v4-5, sonic-v4-5-plus, sonic-v55,000

AI Description Mode (custom_mode: false)#

Let AI generate lyrics based on your description.
{
  "custom_mode": false,
  "mv": "sonic-v4-5",
  "gpt_description_prompt": "An upbeat summer pop song about road trips and freedom, with catchy hooks and positive energy"
}
Character Limit: gpt_description_prompt max 400 characters.

Auto Lyrics Mode (auto_lyrics: true)#

AI automatically generates lyrics,title,tags based on prompt. Requires custom_mode: true.
{
  "custom_mode": true,
  "auto_lyrics": true,
  "mv": "sonic-v4-5",
  "prompt":"pop song",
  "title": "Midnight Dreams",
  "tags": "r&b, smooth, romantic"
}

Model Versions#

ModelDescriptionVocal Gender Support
sonic-v3-5Legacy modelNo
sonic-v4Improved qualityNo
sonic-v4-5Enhanced vocals and instrumentsYes
sonic-v4-5-allfast modelYes
sonic-v4-5-plusPremium qualityYes
sonic-v5Latest model with best qualityYes

Optional Parameters#

Vocal Gender Control#

Control the singer's gender. Only available for sonic-v4-5, sonic-v4-5-plus, and sonic-v5.
ValueDescription
fFemale vocal
mMale vocal
{
  "custom_mode": true,
  "mv": "sonic-v4-5",
  "vocal_gender": "f",
  "prompt": "...",
  "tags": "pop, female vocal"
}

Instrumental Mode#

Generate music without vocals.
{
  "custom_mode": false,
  "mv": "sonic-v4-5",
  "make_instrumental": true,
  "gpt_description_prompt": "A peaceful piano melody with soft strings"
}

Style Control#

Fine-tune the generation with these parameters:
ParameterRangeDescription
style_weight0 - 1How strongly style tags influence output. Higher = stronger adherence to tags.
weirdness_constraint0 - 1Creativity/randomness level. Higher = more experimental/unusual output.
{
  "custom_mode": true,
  "mv": "sonic-v4-5",
  "style_weight": 0.8,
  "weirdness_constraint": 0.3,
  "tags": "electronic, synthwave",
  "negative_tags": "acoustic, folk",
  "prompt": "..."
}

Negative Tags#

Exclude unwanted styles or elements from the generated music.
{
  "tags": "pop, modern",
  "negative_tags": "country, folk, acoustic, slow"
}

Audio Weight (Cover Only)#

For cover_music task type only. Controls how much the original audio influences the cover.
ValueEffect
0Minimal original influence, maximum creative freedom
0.5Balanced mix
1Maximum original influence, closer to source
{
  "task_type": "cover_music",
  "continue_clip_id": "original-clip-id",
  "audio_weight": 0.6,
  "tags": "jazz, smooth",
  "custom_mode": true,
  "mv": "sonic-v4-5",
  "prompt": "..."
}

Tags Reference#

Character Limits for tags#

Model VersionMax Characters
sonic-v3-5, sonic-v4200
sonic-v4-5, sonic-v4-5-plus, sonic-v51,000

Common Style Tags#

Genres: pop, rock, jazz, electronic, hip-hop, r&b, country, folk, classical, metal, punk, reggae, blues, soul, funk, disco, house, techno, ambient, lo-fi
Moods: happy, sad, energetic, calm, romantic, dark, uplifting, melancholic, aggressive, peaceful, dreamy, nostalgic
Instruments: piano, guitar, acoustic, electric guitar, bass, drums, violin, saxophone, synthesizer, orchestra
Vocals: male vocal, female vocal, choir, harmonies, falsetto, rap, spoken word
Tempo: slow, mid-tempo, fast, upbeat, downtempo
Era/Style: 80s, 90s, retro, modern, vintage, futuristic, cinematic, epic

Webhooks#

Receive notifications when tasks complete instead of polling.
{
  "custom_mode": true,
  "mv": "sonic-v4-5",
  "prompt": "...",
  "webhook_url": "https://your-server.com/webhook",
  "webhook_secret": "your-secret-key"
}
The webhook payload will be signed using webhook_secret for verification.

Polling Results#

After creating a task, poll the result using the get-music endpoint:
Recommended polling interval: 15-25 seconds
Task States:
StateDescription
pendingTask is queued
runningTask is processing
succeededTask completed successfully
failedTask failed

Related Endpoints#

EndpointDescription
upload-extend-musicOne-stop API: upload + extend in single request
upload-cover-musicOne-stop API: upload + cover in single request
create-personaCreate virtual singer from existing song
get-musicPoll task results
upload-musicUpload audio file to get clip_id
get-bpmGet BPM information of a song
get-voxExtract vocals from a song

Error Handling#

Common validation errors:
ErrorCauseSolution
mv field is invalidInvalid model versionUse one of: sonic-v3-5, sonic-v4, sonic-v4-5, sonic-v4-5-plus, sonic-v5
prompt length exceededLyrics too longReduce to 3000 (v4-) or 5000 (v4.5+) characters
gpt_description_prompt length exceededDescription too longReduce to 400 characters
tags length exceededTags too longReduce to 200 (v4-) or 1000 (v4.5+) characters
continue_clip_id is requiredMissing source clipProvide clip_id for extend/cover/concat tasks
persona_id is requiredMissing personaProvide persona_id for persona_music task
audio_weight should be 0-1Invalid audio weightUse value between 0 and 1
Modified at 2026-01-31 14:19:00
Previous
Webhook Integration Guide
Next
create / extend / cover / remaster / add vocals / add instrumental
Built with