All Suno generation, editing, and tool interfaces use asynchronous tasks: obtain task_id after submitting an operation, then query results through this page interface.
Authentication
Authorization stringBearer Token authentication: Authorization: Bearer <YOUR_API_KEY>.
Visit the API Key management page to obtain an API Key.
V6 version and model selection
Public models support the following versions:
v6v6-wildv6-mini
The main generation endpoint requires either version or the custom_model_id returned by a model-creation task. Editing operations that support versions default to v6 when version is omitted. A public version and custom_model_id cannot be sent together.
custom: true selects custom-lyrics mode, while custom_model_id selects a trained custom model. They are different concepts. Custom-lyrics mode does not automatically switch to custom-model pricing.
General V6 Generation Options
List the following fields only when specific endpoints are provided:
| Field | Description |
|---|---|
variety |
Style variation: off / normal / high / extra / max |
max_mode |
Max mode, default false; when supported, billed at 2× the standard price |
audio_format |
mp3 / m4a / wav |
duration / duration_s |
Target generation duration, an integer from 10 to 360 seconds; supported only by specified generation operations |
Omit fields that an operation does not support; do not send max_mode: false to every operation. variety and Max mode are independent, so choosing variety: "max" does not enable Max billing.
text and weight limits
| content | field | limit |
|---|---|---|
| Inspiration description | prompt (main generation) / gpt_description (operation endpoints) |
Up to 3,000 characters |
| Lyrics | prompt (custom mode) |
Up to 5,000 characters |
| Style | style (main generation) / tags (operation endpoints) |
Up to 1,000 characters |
| Title | title |
Up to 80 characters |
| Weights | style_weight / weirdness / audio_weight |
0–1; numeric 0 is valid |
The new request for the operation interface uses weirdness; weirdness_constraint is a compatibility alias. The main generation still uses weirdness_constraint. Text length is calculated in Unicode characters.
Reference source track
Based on existing works:
task_id:API Mart task ID for the output audio track.audio_index: The original position in the source task query response ofdata.result.music[], starting from 1 by default, and can be1.
Return however many are specified in the array without fixing the result count to 2. Even if the display order changes on the page, subsequent operations must use the index of tracks in the original results.
All new requests use task_id + audio_index to reference the source audio track and cannot be replaced by audio_id, music_id, or audio_url. If a resolved task is not found or an index out of bounds occurs, 400 will be returned.
Submit response
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01M24YMN4EV04M84R5QYM77R1E"
}
]
}Read the task ID from data[0].task_id. submitted simply indicates that the task has been accepted, not that there is already final audio or other products.
Query task
GET /v1/music/tasks/{task_id}
You can append ?language=zh to get applicable failure message translations. This parameter does not change the language of the song or lyrics.
task_id stringThe task ID returned by the submission interface.
It is recommended to wait approximately 3 seconds initially, then query every 5-10 seconds until data.status becomes completed or failed. You can continue using the same task ID after page refresh; do not automatically resend paid POST requests due to network timeout.
query response
code integerresponse status code.
data objectid stringPlatform task ID.
status stringpending / processing / completed / failed / unknown.
progress numberTask progress, usually 0–100. Whether it is completed should be based on status.
created numberCreation time, Unix seconds.
estimated_time numberEstimated processing time in seconds, for reference only and not a countdown guarantee.
cost numberAmount of money (USD).
credits_cost numberThe task consumption points value. Please display the interface return value directly.
result objectResult after completion, the structure varies with different operations.
error objectFailure message, common fields are message / type / code / param.
Response example
{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "completed",
"progress": 100,
"created": 1789041600,
"cost": 0.12,
"credits_cost": 1.2,
"result": {
"music": [
{
"audio_id": "example-track-id",
"status": "complete",
"title": "follow the lights",
"lyrics": "[Verse]\nthe late wind blows over familiar streets",
"tags": "pop, acoustic",
"display_tags": "Pop, Acoustic",
"negative_tags": "harsh vocals",
"style_weight": 0.7,
"weirdness_constraint": 0,
"audio_weight": 0.4,
"duration": 119.8,
"audio_url": "https://example.com/result.mp3",
"image_url": "https://example.com/cover.jpg",
"image_large_url": "https://example.com/cover-large.jpg"
}
]
}
}
}{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "failed",
"progress": 0,
"cost": 0,
"credits_cost": 0,
"error": {
"message": "task failure reason",
"type": "task_failed",
"code": "task_failed",
"param": ""
}
}
}result processing
- Music-related results are typically found at
data.result.music[], but different operations such as downloads, lyrics, MIDI, Persona, and custom models have their own result structures. durationis the actual duration and may contain decimals; input target duration does not guarantee exact match with final product.- The weight return value
0is a valid value and cannot be hidden due to JavaScript's falsy judgment. audio_urldoes not guarantee the use of.mp3suffix, please play or download using the actual URL returned by the interface.status="unknown"Keep the task ID and allow manual refreshing while not automatically creating new tasks.
AbortController can stop browser requests and polling, but it does not cancel the server-side task. There is currently no endpoint for canceling a submitted Suno task.
This documentation is built and hosted on Mintlify, a developer documentation platform.