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

One operation, one execution item. The server records the provider, account, every upstream stage and output mapping. All IDs in the public API are APIstable IDs. Music credit deduction is not enabled.

Parameter reference

Inputs and limits

Read the input schema below for every supported field, required flag, enum, range and default. Unknown parameters are rejected. URL fields accept public HTTPS URLs, never file objects.

Important conditions

  • Song audio may be MP3 or M4A, matching the supplier media. M4A is never relabeled as MP3. Use suno_export_mp3 for an actual MP3. Unavailable optional covers are null; the audio remains usable.
  • Custom generation requires title and at least one of style, lyrics or negative_tags. Simple generation requires 1–10 attachments, counting non-empty style and lyrics as one each; prompt alone is insufficient. Lyrics overrides prompt.
  • Uploads remain available for 24 hours, generated files for 14 days, task details for 30 days. MP3 reuse keeps the source expiry. Valid Voice identity mappings survive task-log cleanup.

Result

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.
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