Skip to main content
POST
Generate music
Operations are enabled individually by server configuration. Disabled operations return 503 without a task. Music credit deduction is currently disabled.

Using this operation

Describe the piece and supply a style or references. Custom mode lets you write the lyrics yourself.
    1. Prepare the fields shown in the example below. Replace sample URLs and IDs with resources you can access.
    1. Set model to suno_generate and place the parameters inside input. Submit once and save the returned task_id.
    1. Query the saved task or receive its callback. A processing result is not a reason to submit the operation again.
  • Read songs from result.data.data. Each song has its own APIstable id, which can be used as audio_id in a later task.

Create task

Send model and input to the common task endpoint. callback_url is an optional top-level public HTTPS address. All resource IDs are APIstable IDs owned by your account. Music credit deduction is currently disabled.

Acceptance response

HTTP 200 confirms acceptance, not completion. Query GET /api/v1/tasks/{task_id} until data.status is succeeded or failed. Read data.result only after success; a failed task has its error in data.message.

Parameter reference

Inputs and limits

The schema lists supported fields, types and basic limits. Also follow Important conditions: cross-field and source-resource checks are not fully represented in JSON Schema. Unknown parameters are rejected. URL fields accept public HTTPS URLs, never file objects.

Important conditions

  • Custom mode requires a non-blank title and at least one non-blank style, lyrics or negative_tags. Omit image_urls, video_urls and audio_urls entirely, including empty arrays. persona_model requires persona_id.
  • Simple mode requires 1–10 attachments: count each image/video/audio URL and each non-empty style or lyrics field. prompt alone is insufficient. Omit all five control fields and duration. In simple mode prompt describes the music while lyrics supplies lyrics; in custom mode lyrics takes precedence over prompt.
  • Audio references: 6–1800 seconds, up to 500 MiB each. Images: JPEG/PNG/WebP/BMP up to 10 MiB each. Videos: MP4/MOV/WebM up to 100 MiB and 241 seconds. audio_weight requires custom, non-instrumental mode.
  • Audio URL inputs must contain readable MP3/WAV/FLAC/OGG/M4A/AAC audio with positive duration; the limit is 500 MiB per file. URLs must be publicly accessible HTTPS on port 443, without embedded credentials or private-network addresses. Keep them accessible until the task finishes.
  • Song audio may be MP3 or M4A. Use suno_export_mp3 for an actual MP3 file. Unavailable optional cover art may be null; audio remains usable.
  • Uploaded files last 24 hours, generated files 14 days and task details 30 days. Reused files keep their original expiry. Valid Voice/Persona identity mappings are separate from task-log cleanup. Download files you need to retain.

Result schema

The creation response is {code:200,msg:“success”,data:{task_id}}. Poll GET /api/v1/tasks/{task_id}. On success, data.result is an object matching the schema below; it is otherwise null. input remains a JSON string.
Song duration is in seconds; task duration is in milliseconds. createTime is a Unix timestamp in milliseconds or null. Current stream_audio_url and source_stream_audio_url are null. source_audio_url/source_image_url refer to the same APIstable-hosted copies as audio_url/image_url, not provider links. Process the actual song array; upload registration does not imply two newly generated songs.
Voice: all four steps File uploads Callbacks

Authorizations

Authorization
string
header
required

Every valid key can submit and query its own account. Revoked keys are rejected.

Body

application/json
model
enum<string>
required
Available options:
suno_generate
Example:

"suno_generate"

input
object
required
callback_url
string<uri>

Optional public HTTPS endpoint for signed completion callbacks; no redirects or private IPs.

Response

Accepted task. Poll the common task endpoint or use callback_url.

code
any
required
msg
any
required
data
object
required