Docs / Music Series / Suno / Task submission
[Core] Music Generation
Submit an async task via the unified music generation endpoint and query normalized music results using the public task ID.
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#
| Field | Type | Required | Description |
|---|---|---|---|
model | string | No | The 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) |
prompt | string | Conditional | Required when lyrics is omitted and instrumental=false; may be omitted for instrumental-only tracks. Simple-mode description, up to 3000 characters |
lyrics | string | Conditional | Custom lyrics; passing it switches the request to custom-lyrics mode and prompt is no longer required. Up to 5000 characters |
instrumental | boolean | No | Whether to generate instrumental-only music; defaults to false. The legacy field make_instrumental is still accepted |
title | string | Required for custom lyrics | Song title, up to 100 characters |
style | string | Required for custom lyrics | Genre, tempo, vocal, and production descriptions, up to 1000 characters |
negative_tags | string | No | Styles or traits to avoid, up to 1000 characters |
duration | integer | No | Custom duration in seconds, integer 10-360; omit for auto. Interpreted per upstream model — newer models honor it, older ones may ignore it |
persona_id | string | No | ID of a previously created vocal persona |
callback_url | string | No | HTTPS URL that receives a notification when the task completes or fails |
model_params | object | No | Extra 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-field | Type | Description |
|---|---|---|
vocal_gender | string | Vocal gender: m / f |
control_sliders | object | Creative sliders with sub-keys weirdness_constraint / style_weight / audio_weight, values 0–1 |
infill_lyrics | string | Replacement lyrics for the infill (section replace) action; only used by that action endpoint |
is_max_mode | boolean | Max-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):
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):
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:
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):
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:
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:
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:
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:
{
"code": "success",
"message": "",
"data": "task_01KABCDEF0123456789XYZ"
}| Field | Type | Description |
|---|---|---|
code | string | Always success on success |
message | string | Usually an empty string on success |
data | string | The task ID used to query the result |
Querying the Task Result#
Only single-task queries by task ID are supported:
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
status | Description | Terminal state |
|---|---|---|
queued | Task created, waiting to be processed | No |
in_progress | Task is being processed | No |
completed | Task finished; the result is in data | Yes |
failed | Task failed; the reason is in error | Yes |
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:
{
"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.

