Music
Create Music
Creates a music generation task using Suno
Use GET /v1/models?recommended_for=music to get current music models.
Generate music and lyrics using AI. This is an asynchronous API. Create responses return a task identity, and may also return a preferred poll_url for status checks.
Request Body
suno_musicMusic model ID, such as suno-music. For lyrics only, choose a model whose current public operations include lyrics.
Music description or replacement text. Required for music, lyrics, upload-cover, upload-extend, and replace-section; optional for add-instrumental and stem separation.
Title for the generated song.
Style tags (e.g., "pop, upbeat, electronic").
Styles to avoid. Required when audio_operation is add-instrumental.
Optional MUSIC or LYRICS value. Choose a model that supports the corresponding public operation; this field does not add lyrics support to a music-only model.
Suno version selector. Required for generation, upload-cover, upload-extend, add-instrumental, and replacement from audio_url. Omit it for lyrics, replacement from task_id + audio_id, and stem separation. Accepted values: chirp-v3-5, chirp-v4, chirp-v4-5, chirp-v4.5, chirp-v4-5plus, chirp-v4.5plus, chirp-v4-5all, chirp-v4.5all, chirp-v5, chirp-v5-5, chirp-v5.5.
Set to true to generate instrumental output without vocals.
Publicly reachable reference or uploaded audio URL. When provided without audio_operation, TokenLab uses the upload-cover flow.
Audio operation: upload-cover, upload-extend, add-instrumental, replace-section, vocal-separate, multi-stem-separation, advanced-split.
vocal-separate, multi-stem-separation, and advanced-split require task_id + audio_id; advanced-split also requires stem_name. upload-extend requires continue_at greater than 0. add-instrumental requires audio_url, title, tags, and negative_tags.
For replace-section, send prompt, tags, title, infill_start_s, infill_end_s, and full_lyrics. Choose exactly one source: task_id + audio_id, or audio_url + mv. The replacement interval must be 6–60 seconds.
Source task ID belonging to your organization, for generated-audio replacement or stem separation.
Source audio ID returned in the source task result. Required with task_id for generated-audio replacement and stem separation.
Replacement start time in seconds, at least 0. Required for replace-section.
Replacement end time in seconds. Required for replace-section; it must be 6–60 seconds after infill_start_s.
Full lyrics for the resulting song. Required for replace-section.
Stem name. Required for advanced-split.
ID of a previous clip to continue from.
Time in seconds from which to continue. Required and greater than 0 for upload-extend.
prompt accepts up to 5000 characters; tags and negative_tags accept up to 1000 characters each. Supported operations and parameters depend on the selected model's current details.
Response
Task ID for polling status.
Alias of the same asynchronous task ID, when returned.
Preferred polling URL for this task when provided.
Task status: pending, processing, completed, or failed.
Task creation time as a Unix timestamp, when returned.
Request
curl -X POST "https://api.tokenlab.sh/v1/music/generations" \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-music",
"mv": "chirp-v4",
"prompt": "An upbeat electronic dance track with heavy bass",
"title": "Night Drive",
"tags": "electronic, EDM, energetic"
}'Response
{
"id": "ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"task_id": "ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"poll_url": "/v1/tasks/ldtask_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "pending",
"model": "suno-music"
}Authorization
BearerAuth API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
In: header
Headers
Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Verified first and may switch once to Official only before output, request acceptance, or persistent resource creation.
Value in
- "auto"
- "verified"
- "official"
Request Body
application/json
Response
application/json
application/json