Docs
Audio Generation Tasks
Updated 2026-08-30
API Overview
Suno and FlowMusic generation are asynchronous operations:
- Call
POST /v1/audios/tasksto submit a task - Save the public task ID from the response
- Call
GET /v1/tasks/{task_id}to check status and results
The Base URL is https://api.rokoapi.com/v1, and all requests must include Authorization: Bearer $API_KEY.
Available Models
suno-v3.5suno-v4suno-v4.5suno-v4.5-allsuno-v4.5-plussuno-v5suno-v5.5flowmusic-lyria-3-proflowmusic-lyria-3.5
The actual availability depends on /v1/models and the key’s group.
Generate with FlowMusic Lyria
FlowMusic reads its supported fields from the model catalog. Provide at least one of prompt or metadata.lyrics; do not send fields that the model metadata does not expose.
{
"model": "flowmusic-lyria-3.5",
"prompt": "cinematic ambient music with warm strings and a gentle piano",
"duration": 30,
"metadata": {
"lyrics": "[Verse]\nNeon rain falls softly tonight",
"title": "Neon Rain",
"bpm": 120,
"seed": "42"
}
}
Generate a Song
curl https://api.rokoapi.com/v1/audios/tasks \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-v5.5",
"action": "generate",
"mode": "easy",
"prompt": "An upbeat summer pop song with female vocals and bright guitars"
}'
action defaults to generate, mode defaults to easy.
Advanced Mode
{
"model": "suno-v5.5",
"action": "generate",
"mode": "advanced",
"lyrics": "[Verse]\nWalking through the neon rain...",
"style": "synth-pop, female vocal, 120 bpm",
"title": "Neon Rain",
"instrumental": false
}
advanced Inprompt, lyrics, style mode, provide at least one of lyrics_model also requires prompt.
Extend a Clip
{
"model": "suno-v5.5",
"action": "extend",
"continue_clip_id": "clip_123",
"continue_at": 90,
"prompt": "Build into a more powerful chorus"
}
extend requires continue_clip_id and a non-negative continue_at.
Submission Response
A successful submission returns HTTP 202: ```json
{
“id”: “task_public_id”,
“object”: “audio.generation.task”,
“status”: “queued”,
“upstream”: “Suno Task API”
}
Subsequent queries must always use the public `id`here, not the upstream internal task ID.
## Query Task
```bash
curl https://api.rokoapi.com/v1/tasks/task_public_id \
-H "Authorization: Bearer $API_KEY"
Common statuses include queued, in_progress, completed and failed. Once a task is complete, the result includes a generated audio URL. We recommend increasing the polling interval gradually to avoid high-frequency queries.
Result Archiving and Media URLs
When media archiving is enabled on the server, a successful task does not guarantee that file URLs are stable. Downstream systems should continue polling until archive_status changes to ready(or partialfor partial success), then persist assets[].url.
Archived audio, covers, videos, and lyrics are transferred to the platform CDN (https://cdn.rokoapi.com), returning unguessable public HTTPS URLs that are accessible without an API Token.
Retention Period
- Archived media is retained for 24 hours by default. After expiration, objects are deleted, and the corresponding asset status changes to
expired. - The expiration time for each asset is in
assets[].expires_at(Unix timestamp in seconds). - For long-term use, downstream systems should download and store the media within 24 hours. Do not treat platform CDN URLs as permanent links.
archive_statuschanges toexpired, the originalassets[].urlbecomes unavailable.
Query response example:
{
"code": "success",
"data": {
"task_id": "task_public_id",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://cdn.rokoapi.com/media/2026/07/abcdef.mp3",
"archive_status": "ready",
"assets": [
{
"output_id": "clip-1",
"kind": "audio",
"title": "Neon Rain",
"url": "https://cdn.rokoapi.com/media/2026/07/abcdef.mp3",
"content_type": "audio/mpeg",
"size": 3456789,
"expires_at": 1753862400,
"status": "ready"
},
{
"output_id": "clip-1",
"kind": "cover",
"title": "Neon Rain",
"url": "https://cdn.rokoapi.com/media/2026/07/coverxyz.jpg",
"content_type": "image/jpeg",
"expires_at": 1753862400,
"status": "ready"
},
{
"output_id": "clip-1",
"kind": "lyrics",
"title": "Neon Rain",
"url": "https://cdn.rokoapi.com/media/2026/07/lyricsxyz.txt",
"content_type": "text/plain; charset=utf-8",
"expires_at": 1753862400,
"status": "ready"
}
]
}
}
Notes:
archive_status:pending/processing/ready/partial/failed/expiredassets: A single task may contain multiple clips, each withaudio,cover,video,lyricsresult_url: Public URL of the first archived audio; may still be an upstream temporary URL before archiving is completeassets[].expires_at: Estimated deletion time for this file; defaults to approximately 24 hours after archiving completes- Public media URLs are unguessable and do not require a platform Token; deleted by default after 24 hours**
- Downstream sites should only store archived public URLs (and re-store them before expiration); do not rely on upstream temporary CDN URLs
Polling recommendations:
# Keep polling after success until archive_status=ready
curl https://api.rokoapi.com/v1/tasks/task_public_id \
-H "Authorization: Bearer $API_KEY"
Parameters
| Parameter | Type | Description |
|---|---|---|
model | string | Suno model ID, required |
action | string | generate or extend |
mode | string | Generation mode:easy or advanced |
prompt | string | Natural language song description |
lyrics | string | Custom lyrics |
style | string | Description of genre, mood, instruments, etc. |
instrumental | boolean | Whether to generate instrumental music |
title | string | Song title |
vocal_gender | string | Optional vocal preference |
continue_clip_id | string | Source clip ID for extension |
continue_at | number | Extend from the specified second of the source clip; cannot be negative |
timeout_ms | integer | Upstream task timeout, range 10,000–7,200,000 milliseconds |
Billing
Suno versions are billed per request by default, with a current default price of $0.06per request. Model prices and group multipliers in the console can override defaults; refer to the/pricing/for current pricing.
Differences from the Legacy Suno API
/v1/audios/tasks uses suno-v* model IDs and a unified task query interface. The legacy /suno/submit uses suno_music, suno_lyrics and other model names; the two APIs and model names cannot be mixed.
Common Errors
400: Incorrect path, action, mode, or required parameters403: Key group lacks model permissions or has insufficient balance404: Task ID does not exist, or the model is not enabled in available channels502: Upstream returned an invalid response or the task service is temporarily unavailable