Endpoints
Create Task
Submit a new AI generation task
POST
Create Task
Create Task
Submit a new task to an AI model. The task is processed asynchronously — use the Get Task endpoint to poll for results. Sunor validates the JSON body, model, task type, and model-specific input before freezing credits, inserting a task, or calling an upstream provider. Invalid requests therefore fail without creating a task or changing the credit balance. The JSON body may be up to 256 KiB. The serializedinput object may be up to
128 KiB, and known text fields may be up to 16,000 Unicode characters. A body
over the first limit returns 413 request_body_too_large; an oversized
input or text field returns 400 invalid_task_input.
Request
Headers
Body parameters
The type of task to create. Suno supports:
"music", "lyrics", "upload", "concat". Udio and ACE Music support "music" only.Pin the delivery format of
audio_url. Currently the only accepted value is "mp3".Omit it and you get the provider’s own file, in whatever format that provider produces. That is
not a fixed format — it changes when a provider changes what it makes, and it changes when we
route your request to a different provider to keep the service up. See
Audio format.Send "mp3" and audio_url points at MP3. A source that is already MP3 is delivered as-is rather
than re-encoded, so you never pay a second lossy pass for a file that was already right.If the conversion fails the task still succeeds — you get our copy of the source file, at our
URL and our retention, in the source format. The response echoes back the audio_format you sent
either way, because that field records the request rather than the outcome; read Content-Type to
know what a file actually is.Applies to task types that return audio. A lyrics task has no audio_url, so the field changes
nothing about what you receive — it is still accepted and still echoed back.Any other value is rejected with invalid_audio_format before any credits are charged. The field
as a whole can also be refused with audio_format_unavailable, which means conversion is switched
off on our side rather than anything being wrong with your request; omit the field to receive the
provider’s original file.Sunor validates the documented model/task fields before charging credits or submitting to a provider.
Extra root or
input properties are accepted for backward/forward compatibility, but they are not
interpreted as provider controls unless a request variant explicitly prohibits them. Use documented
fields for provider behavior.Task types and input schemas
music — Generate music
The music task supports three modes depending on which input fields you provide.
All three Suno modes also accept the model version:
Suno model to generate with:
"v6" (the default), "v5.5" or "v5". Suno retired v5.5 and v5 on 2026-09-09; both are still accepted for backward compatibility and generate with V6. Values are case-sensitive, and any other value is rejected with a 400 before any credits are charged. To use the default, omit the field; null is rejected. See Model version.- Inspiration Mode
- Custom Mode
- Continuation Mode
- Udio
- ACE Music
Generate music from a natural language description. The AI interprets your prompt and creates lyrics, melody, and arrangement.
A natural language description of the music you want (e.g., “A chill lo-fi beat for studying”).
lyrics — Generate lyrics
upload — Upload audio
The upload returns a clip
id (at output.result[0].id). Pass it as continue_clip_id in a music task to extend your uploaded audio into a full song (see the Continuation Mode tab under the music task). Generating a new song in a different style from an uploaded reference (an “audio cover”) is not currently supported.concat — Concatenate clips
Response
Response headers
202
Code examples
Errors
Errors retain the numericcode and human-readable message, and also include
a stable machine-readable error_code. See Error Codes for the full
list.
Rejection after a task was created (pending rollout)
After the production rollout, the following contract applies. Some input can only be checked by the provider. If submission is rejected after Sunor created a task and the failure/refund transition commits, the error response includes top-leveltask_id. When the stored error has classifiable text,
retryable, retry_after_seconds, and error_code use the same classification as
GET /api/v1/task/{task_id}. A content rejection is an HTTP 422 JSON error,
not a gateway failure:
422
data.task_id; on these errors it is task_id. Query
the existing task before deciding to create another. The content-check verdict
does not establish whether you own or are entitled to use the audio.
retryable is guidance, not a promise; always read it rather than deriving it
from 422 or the error code. A numeric wait is also returned as Retry-After;
when no wait is known, retry_after_seconds is null and that header is absent.
Provider rate limits do not mean your API-key quota was exhausted.
If the stored error contains no classifiable text, the HTTP response remains
a generic 502 with task_id, but no retry guidance is invented; GET may report
null task-level classification fields.
Validation/authentication failures before task creation have no task reference.
If settlement cannot be confirmed, a 500 may include a task_id without
retryable or a refund claim; query it to determine the outcome.