apimaxDocs
DocsPricingConsole
API ReferenceIntegration GuideUser GuideChangelog

Music Series

POST[Core] Music GenerationPOSTCover SongsPOSTGenerate Sound EffectsPOSTExtend SongsPOSTConcatenate Extend Clips into a SongPOSTSong StemsPOSTAdd InstrumentalPOSTAdd Vocals

Image Series

Video series

Task Management

Error Code ReferenceQuery Task StatusGET

Account Management

Query Quota UsageGET

Docs / Music Series / Suno / Task submission

Task submissionPOSTSunoMUSICAsync Taskssuno_music

[Core] Music Generation

Submit an async task via the unified music generation endpoint and query normalized music results using the public task ID.

POSThttps://api.apimax.ai/v1/music/generations
Try it
Bearer API KeyJSONServer-side call

Purpose#

Create a music generation task with POST /v1/music/generations. The endpoint returns a task ID immediately; use the task query endpoint to get progress and the final audio.

Request Fields#

FieldTypeRequiredDescription
modelstringNoThe music model to use; defaults to suno_music. Available versions: chirp-v6, chirp-v6-wild, chirp-v6-mini; pass the version name directly (the suno/<version> form also works)
promptstringConditionalRequired when lyrics is omitted and instrumental=false; may be omitted for instrumental-only tracks. Simple-mode description, up to 3000 characters
lyricsstringConditionalCustom lyrics; passing it switches the request to custom-lyrics mode and prompt is no longer required. Up to 5000 characters
instrumentalbooleanNoWhether to generate instrumental-only music; defaults to false. The legacy field make_instrumental is still accepted
titlestringRequired for custom lyricsSong title, up to 100 characters
stylestringRequired for custom lyricsGenre, tempo, vocal, and production descriptions, up to 1000 characters
negative_tagsstringNoStyles or traits to avoid, up to 1000 characters
durationintegerNoCustom duration in seconds, integer 10-360; omit for auto. Interpreted per upstream model — newer models honor it, older ones may ignore it
persona_idstringNoID of a previously created vocal persona
callback_urlstringNoHTTPS URL that receives a notification when the task completes or fails
model_paramsobjectNoExtra parameters, forwarded verbatim as the upstream metadata; common keys: vocal_gender (m/f), control_sliders (creative sliders), and is_max_mode (Max mode). submit top-level fields such as mv, persona_id, and task must not be smuggled here

Vocal requests must provide either a non-empty prompt (simple mode) or lyrics plus title and style (custom-lyrics mode, active once lyrics is passed); instrumental-only requests may omit both prompt and lyrics.

Length limits are officially confirmed for the chirp-v6 family (description 3000 / custom lyrics 5000 / title 100 / style tags 1000 / negative tags 1000); older model families have lower caps (e.g. v3: 3000/200) and oversized values are rejected upstream.

model_params sub-fields#

The whole model_params object is forwarded verbatim as the upstream metadata; besides the common keys below, newly added upstream metadata keys can be passed directly:

Sub-fieldTypeDescription
vocal_genderstringVocal gender: m / f
control_slidersobjectCreative sliders with sub-keys weirdness_constraint / style_weight / audio_weight, values 0–1
infill_lyricsstringReplacement lyrics for the infill (section replace) action; only used by that action endpoint
is_max_modebooleanMax-mode toggle (higher audio-quality tier on the v6 family); effective only in custom-lyrics mode (when lyrics is passed); billed at 2x when enabled

Note: submit top-level fields such as mv, persona_id, task, and continue_clip_id must not be smuggled inside model_params (rejected with a hint to use the top-level field).

Request Example#

Simplest generation (default model, prompt only):

bash
curl -X POST 'https://api.apimax.ai/v1/music/generations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6",
    "prompt": "A summer road-trip anthem with warm vocals"
  }'

Custom lyrics and metadata (passing lyrics switches to custom-lyrics mode):

bash
curl -X POST 'https://api.apimax.ai/v1/music/generations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6",
    "lyrics": "[Verse] Driving down the open road\n[Chorus] Chasing the summer light",
    "title": "Summer Dream",
    "style": "pop, electronic, upbeat, female vocals",
    "instrumental": false,
    "callback_url": "https://your-app.example/music-callback"
  }'

Pin the chirp-v6-wild version and exclude unwanted styles:

bash
curl -X POST 'https://api.apimax.ai/v1/music/generations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6-wild",
    "prompt": "energetic rock with gritty guitars",
    "negative_tags": "distortion, heavy drums",
    "callback_url": "https://your-app.example/music-callback"
  }'

Instrumental-only (no lyrics needed; all versions share the same price, using chirp-v6-mini as an example):

bash
curl -X POST 'https://api.apimax.ai/v1/music/generations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6-mini",
    "prompt": "lofi study beat, warm piano, soft rain",
    "instrumental": true
  }'

Generate with a vocal persona:

bash
curl -X POST 'https://api.apimax.ai/v1/music/generations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6",
    "persona_id": "7d20fabc-1a2b-4c3d-8e9f-0123456789ab",
    "lyrics": "[Verse] We kept our names inside an old notebook\n[Chorus] Those summer days still call me home",
    "title": "Old School Days",
    "style": "acoustic pop, warm female vocal"
  }'

Pin vocal gender via model_params:

bash
curl -X POST 'https://api.apimax.ai/v1/music/generations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6",
    "prompt": "an upbeat summer anthem",
    "model_params": {
      "vocal_gender": "f"
    }
  }'

Custom lyrics combined with a vocal gender:

bash
curl -X POST 'https://api.apimax.ai/v1/music/generations' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "chirp-v6",
    "lyrics": "[Verse] City lights are calling\n[Chorus] We run through the neon glow",
    "title": "Neon Run",
    "style": "synthwave, energetic",
    "model_params": {
      "vocal_gender": "m"
    }
  }'

The callback_url should be served by your backend and return 2xx quickly. Do not use a page that requires login as the callback address.

Submission Response#

A successful submission returns the task ID immediately:

json
{
  "code": "success",
  "message": "",
  "data": "task_01KABCDEF0123456789XYZ"
}
FieldTypeDescription
codestringAlways success on success
messagestringUsually an empty string on success
datastringThe task ID used to query the result

Querying the Task Result#

Only single-task queries by task ID are supported:

bash
curl 'https://api.apimax.ai/v1/tasks/task_01KABCDEF0123456789XYZ' \
  -H "Authorization: Bearer $API_KEY"

Task status transitions in the following order:

queued → in_progress → completed / failed

statusDescriptionTerminal state
queuedTask created, waiting to be processedNo
in_progressTask is being processedNo
completedTask finished; the result is in dataYes
failedTask failed; the reason is in errorYes

We recommend polling every 2–5 seconds and stopping once the status reaches completed or failed. If callback_url is set, you can also wait for the callback notification.

Example completed response:

json
{
  "id": "task_01KABCDEF0123456789XYZ",
  "object": "task",
  "type": "music",
  "platform": "music",
  "status": "completed",
  "progress": 100,
  "model": "suno_music",
  "data": [
    {
      "id": "track_001",
      "audio_url": "https://media.example/result.mp3",
      "image_url": "https://media.example/cover.jpg",
      "title": "Summer Dream",
      "duration": 214.5,
      "model_name": "suno_music"
    }
  ]
}

During in_progress, a previewable audio URL may be returned early, but you should keep polling until the task reaches a terminal state.

Next steps

All docs
Upsample Style TagsPolish and expand style tags and lyrics into a fuller style description.Get Style Inspiration SuggestionsGet random style or inspiration suggestions from the Suno upstream.Method 1: Create a Voice from an Existing SongCreate a vocal voice directly from a song clip already generated in this pool.Upload AudioImport user audio as a Suno-owned clip; returns an async upload task ID. With copyright=true the request switches to the copyright pipeline.Get MIDIRetrieve a MIDI file for a clip generated by this service.Get Lyrics TimingGet the lyric alignment timing of a generated clip.
On this page
OverviewPurposeRequest Fieldsmodelparams sub-fieldsRequest ExampleSubmission ResponseQuerying the Task ResultNext steps
API

POST /v1/music/generations