AI Music API
HomeGet API key
HomeGet API key
  1. sonic
  • Introduction
  • Credits Usage Guide
  • AI Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • sonic
    • Sonic Instructions
    • download (mp3 / m4a / wav)
      POST
    • create / extend / cover music
      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
    • concat music
      POST
    • stems basic
      POST
    • stems full
      POST
    • remaster
      POST
    • replace section
      POST
    • add vocal
      POST
    • add instrumental
      POST
    • upload music
      POST
    • create voice
      POST
    • get music
      GET
  • riffusion(Deprecated)
    • Riffusion instructions
    • create music (with lyrics)
    • create music (with description)
    • cover music
    • extend music
    • replace music section
    • swap music sound
    • swap music vocals
    • upload
    • get music
  • producer
    • Producer Instructions
    • Complete Request Example
    • create music
    • upload
    • download
    • get task / poll result
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
    • create instrument music
    • get music
  • lyrics generation
    • Make Lyrics
  • get-credits
    GET
  1. sonic

create / extend / cover music

POST
https://api.aimusicapi.ai/api/v1/sonic/create
Unified endpoint for creating, extending, and covering music. The operation is determined by the task_type parameter.
Credits cost: 10 (2 for concat_music)

Task Types#

task_typeDescriptionRequired Parameters
create_musicCreate new music from scratchcustom_mode, mv
extend_musicExtend existing song from a timestampcontinue_clip_id, continue_at, custom_mode, mv
cover_musicCreate cover version of existing songcontinue_clip_id, custom_mode, mv
concat_musicConcatenate songscontinue_clip_id only
persona_musicCreate music with virtual singerpersona_id, custom_mode, mv

Generation Modes#

Custom Mode (custom_mode: true)#

Provide your own lyrics in the prompt field with structure tags like [Verse], [Chorus], [Bridge], [Outro].

AI Description Mode (custom_mode: false)#

Let AI generate lyrics based on your description in gpt_description_prompt.

Auto Lyrics Mode (auto_lyrics: true)#

Requires custom_mode: true. AI generates lyrics, title, tags based on prompt (song description)

Special Parameters#

Vocal Gender Control#

vocal_gender: 'f' (female) or 'm' (male). Only for sonic-v4-5, sonic-v4-5-plus, sonic-v5.

Audio Weight (Cover Only)#

audio_weight (0-1): Controls original audio influence on cover.
0 = More creative freedom
1 = Closer to original

Style Control#

style_weight (0-1): Style tag influence strength
weirdness_constraint (0-1): Creativity/randomness level

Polling Result#

Use get-music endpoint with the returned task_id. Recommended interval: 15-25 seconds.

Related Endpoints#

upload-extend-music: Upload + Extend in one request
upload-cover-music: Upload + Cover in one request
create-persona: Create virtual singer for persona_music
Every mv value on this page stayed valid through Suno's v6 release on 2026-09-09 — see Sonic Instructions for what that changed and what it did not.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/json

Examples
{
    "task_type": "create_music",
    "custom_mode": true,
    "mv": "sonic-v4-5",
    "prompt": "[Verse]\nStars they shine above me\nMoonlight softly glows\nWhispers in the night sky\nDreams that only grow\n\n[Chorus]\nStarry night starry night\nLet your light ignite ignite",
    "title": "Starry Night",
    "tags": "pop, dreamy, emotional"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.aimusicapi.ai/api/v1/sonic/create' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "task_type": "create_music",
    "custom_mode": true,
    "mv": "sonic-v4-5",
    "prompt": "[Verse]\nStars they shine above me\nMoonlight softly glows\nWhispers in the night sky\nDreams that only grow\n\n[Chorus]\nStarry night starry night\nLet your light ignite ignite",
    "title": "Starry Night",
    "tags": "pop, dreamy, emotional"
}'

Responses

🟢200OK
application/json
Success
Bodyapplication/json

Example
{
    "code": 200,
    "task_id": "81ed9f60-56ae-48c1-9c46-33a8220dfca7",
    "message": "success"
}
Modified at 2026-09-09 15:19:33
Previous
download (mp3 / m4a / wav)
Next
upload and extend music
Built with