AI Music API
Suno-compatible music routes for song generation, audio transforms, task polling, and webhook-based completion.
AI Music routes are Suno-compatible asset-generation APIs. They are not chat-completion endpoints. Most routes create asynchronous tasks, return a taskId, and complete through polling or webhook callbacks.
Base URL and auth
https://gateway.api.anyint.ai
Authorization: Bearer <ANYINT_API_KEY>
Content-Type: application/jsonCreation routes
| Route | Purpose |
|---|---|
POST /suno/generate | Create a new song |
POST /suno/extend | Extend an existing generated song |
POST /suno/generate-lyrics | Generate lyrics from a prompt |
POST /suno/timestamped-lyrics | Fetch aligned word timings for a completed song |
POST /suno/style-generate | Expand a rough style hint into richer style text |
POST /suno/generate-cover | Generate cover art for a completed music task |
Transform and export routes
| Route | Purpose |
|---|---|
POST /suno/upload-cover | Upload audio and create an AI cover |
POST /suno/upload-extend | Upload audio and continue it |
POST /suno/add-vocals | Add vocals to an instrumental |
POST /suno/add-instrumental | Add accompaniment to vocals |
POST /suno/generate-persona | Create a reusable voice identity from a completed song |
POST /suno/vocal-removal | Split vocals and accompaniment or produce multitrack stems |
POST /suno/split-stem | Split stems from an existing audio result |
POST /suno/replace-section | Replace a section of an existing audio result |
POST /suno/wav-generate | Export a completed song as WAV |
POST /suno/mp4-generate | Create a music video from a completed song |
Query routes
| Route | Purpose |
|---|---|
GET /suno/query/task?taskId={taskId} | Song generation and cover tasks |
GET /suno/query/lyrics?taskId={taskId} | Lyrics tasks |
GET /suno/query/vocal-removal?taskId={taskId} | Stem or vocal-removal tasks |
GET /suno/query/wav?taskId={taskId} | WAV conversion tasks |
GET /suno/query/mp4?taskId={taskId} | MV generation tasks |
GET /suno/query/cover?taskId={taskId} | Cover-art tasks |
Generate a song
curl -X POST "https://gateway.api.anyint.ai/suno/generate" \
-H "Authorization: Bearer $ANYINT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customMode": false,
"instrumental": false,
"model": "V5",
"prompt": "A bright summer pop song about travel and freedom",
"callBackUrl": "https://your-domain.com/callback"
}'Key fields:
| Field | Type | Required | Meaning | Example |
|---|---|---|---|---|
customMode | boolean | Yes | false for simple prompt mode; true when you provide custom lyrics, style, and title. | false |
instrumental | boolean | Yes | true for instrumental music; false for vocals. | false |
model | string | Yes | Music model version. Supported values can change by account. | V5 |
callBackUrl | string | Yes | Public HTTPS callback URL for task completion events. Keep polling as a fallback. | https://your-domain.com/callback |
prompt | string | Conditional | In simple mode, a song description. In custom mode, lyric text. | A bright summer pop song... |
style | string | Conditional | Required in custom mode; describes genre, mood, vocals, and instrumentation. | pop, upbeat, female vocal |
title | string | Conditional | Required in custom mode; song title. | Summer Roads |
personaId | string | No | Reuse a saved voice persona when your account and model support it. | persona_123 |
Transform request fields
| Route | Important fields | Meaning |
|---|---|---|
POST /suno/extend | taskId, audioId, prompt, continueAt, callBackUrl | Continue or extend an existing generated song. |
POST /suno/upload-cover | uploadUrl or uploaded audio reference, style, title, callBackUrl | Create an AI cover from uploaded audio. |
POST /suno/upload-extend | uploaded audio reference, prompt, continueAt, callBackUrl | Continue an uploaded audio clip. |
POST /suno/add-vocals | source task or audio reference, vocal prompt fields, callBackUrl | Add vocals to an instrumental. |
POST /suno/add-instrumental | source task or audio reference, style fields, callBackUrl | Add accompaniment to vocals. |
POST /suno/vocal-removal | source task or audio reference, callBackUrl | Split vocals and accompaniment or produce stems. |
POST /suno/split-stem | source task or audio reference, callBackUrl | Split stems from an existing result when supported by the account. |
POST /suno/replace-section | source task or audio reference, section timing fields, replacement prompt fields, callBackUrl | Replace a section of an existing track when supported by the account. |
POST /suno/wav-generate | source task or audio ID, callBackUrl | Export a completed song as WAV. |
POST /suno/mp4-generate | source task or audio ID, callBackUrl | Create a music video from a completed song. |
Exact transform fields can vary by workflow. Use the route-specific example from the product page when available and verify the selected workflow in your account before production.
Task states
| Status | Meaning |
|---|---|
PENDING | queued |
TEXT_SUCCESS | text or lyric stage completed |
FIRST_SUCCESS | first audio finished |
SUCCESS | full job completed |
CREATE_TASK_FAILED | task creation failed |
GENERATE_AUDIO_FAILED | generation failed |
Webhook callbacks
All async music routes can call your callBackUrl.
callbackType | Meaning |
|---|---|
text | text or lyric stage completed |
first | first audio result is ready |
complete | full workflow completed |
Callback handling requirements
| Requirement | Guidance |
|---|---|
| Public HTTPS URL | The callback URL must be reachable from AnyInt. |
| Idempotency | Store taskId and ignore duplicate callbacks safely. |
| Fast response | Return quickly and move heavy media processing to a queue. |
| Polling fallback | Keep polling the query route if a callback is delayed. |
| Ownership check | Confirm the callback task ID belongs to a task your application created. |
Error codes
| Code | Meaning |
|---|---|
400 | invalid parameters |
401 | authentication failed |
405 | frequency limit exceeded |
413 | text too long |
429 | quota exhausted |
430 | request rate too high |
455 | system maintenance |
500 | server error |
Related guides
Media APIs
AnyInt publishes media-generation routes through DashScope and Transtreams Kling. These are not chat-completion endpoints. They have their own request bodies, and Kling and video generation routes are task-based.
Errors and Limits
AnyInt publishes both bearer-style and provider-style auth patterns. If a request fails unexpectedly, verify that you used the right header family for the route you called.