Suno V5 API Reference
Overview
| Property | Value |
|---|---|
| Model ID | suno |
| Type | Text-to-Music, Image-to-Music |
| Pricing | 0.18$ / per time (2 music output) |
| Average Time | ~2-3 minutes |
Authentication
All API requests must include a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Endpoints & Workflow
- Submit Generation Task (callback required)
POST https://api.apixo.ai/api/v1/generateTask/suno
Always send request_type: "callback" with a reachable callback_url.
-
Wait for Callback Stages
- Suno emits up to three webhook events per task:
text– lyrics/text preparedfirst– first track finishedcomplete– all tracks finished
- Parse the payload as shown in the callback sample below.
- Suno emits up to three webhook events per task:
-
Fallback Polling (only if callback stalls)
- If the
firstcallback arrives but no additional callback within 5 minutes, call the status endpoint. - If you never receive
complete, poll manually untilsuccess/failed.
- If the
GET https://api.apixo.ai/api/v1/statusTask/suno?taskId={taskId}
Request Parameters
Request Body Structure
{
"request_type": "callback",
"callback_url": "https://your-server.com/callback",
"input": {
"mode": "V5",
"prompt": "Lyrics or creative brief",
"style": "K-pop, Electronic",
"title": "All Day With Pupu",
"customMode": true,
"instrumental": false
}
}
Top-Level Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request_type | string | Yes | async or callback; Suno strongly recommends callback |
callback_url | string | Yes (for callback) | Public URL receiving webhook updates (text → first → complete) |
input | object | Yes | All generation controls (see below) |
Input Parameters
Core Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mode | string | Yes | - | Model version: V4, V4_5, V4_5PLUS, V4_5ALL, V5 |
customMode | boolean | Yes | false | Toggle advanced controls. false = simple prompt-only mode |
instrumental | boolean | Yes | false | true = instrumental only (no vocals) |
prompt | string | Conditional | - | Lyrics or creative brief (see requirements below) |
style | string | Conditional | - | Musical genres/moods, comma-separated (see requirements below) |
title | string | Conditional | - | Track title, max 80 characters (see requirements below) |
Parameter Requirements by Mode
Non-Custom Mode (customMode: false)
| Parameter | Required | Notes |
|---|---|---|
prompt | ✅ Yes | Max 500 characters |
style | ❌ Leave empty | - |
title | ❌ Leave empty | - |
Note: In non-custom mode, only
promptis required regardless ofinstrumentalsetting. Other parameters should be left empty.
Custom Mode (customMode: true)
instrumental | Required Parameters |
|---|---|
true (no vocals) | style + title |
false (with vocals) | style + title + prompt |
Character Limits by Model Version
| Model | prompt Limit | style Limit | title Limit |
|---|---|---|---|
| V4 | 3,000 chars | 200 chars | 80 chars |
| V4_5 | 5,000 chars | 1,000 chars | 80 chars |
| V4_5PLUS | 5,000 chars | 1,000 chars | 80 chars |
| V4_5ALL | 5,000 chars | 1,000 chars | 80 chars |
| V5 | 5,000 chars | 1,000 chars | 80 chars |
Non-custom mode:
promptlimit is always 500 characters regardless of model version.
Optional Parameters
| Parameter | Type | Range | Description |
|---|---|---|---|
negativeTags | string | - | Styles or traits to avoid (e.g., "Acoustic, Soft, Slow") |
styleWeight | number | 0–1 | Strength of adherence to style. Up to 2 decimals (e.g., 0.65) |
weirdnessConstraint | number | 0–1 | Controls creative deviation. Up to 2 decimals (e.g., 0.35) |
audioWeight | number | 0–1 | Balance weight for audio features vs lyrical fidelity. Up to 2 decimals |
vocalGender | string | m / f | Vocal gender preference. Only effective when customMode: true. Note: This only increases probability—cannot guarantee adherence |
personaId | string | - | Persona ID to apply a specific persona style. Only available when customMode: true. Generate via the Persona endpoint |
Response Format
Task Submission Response
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678"
}
}
Status Query Response
Processing
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_12345678",
"state": "processing",
"createTime": 1763990437000
}
}
Success
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_12345678",
"state": "success",
"resultJson": "{\"resultUrls\":[{\"image_url\":\"https://cdn2.suno.ai/image1.jpeg\",\"audio_url\":\"https://cdn1.suno.ai/track1.mp3\"},{\"image_url\":\"https://cdn2.suno.ai/image2.jpeg\",\"audio_url\":\"https://cdn1.suno.ai/track2.mp3\"}]}",
"createTime": 1763990437000,
"costTime": 75000
}
}
Failed
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_12345678",
"state": "failed",
"failCode": "CONTENT_VIOLATION",
"failMsg": "Content does not meet safety guidelines",
"createTime": 1763990437000,
"completeTime": 1763990500000
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
code | integer | HTTP-style status (200 = accepted) |
msg / message | string | Human-readable status |
data.taskId | string | Unique task identifier |
data.state | string | pending, processing, success, failed |
data.resultJson | string | JSON string with resultUrls array (image_url, audio_url) |
data.costTime | integer | Generation time in milliseconds |
data.createTime | integer | Task creation timestamp |
data.completeTime | integer | Completion timestamp |
data.failCode / data.failMsg | string | Error diagnostics |
Callback Response
Success Callback
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678",
"state": "success",
"resultJson": "{\"resultUrls\":[{\"image_url\":\"https://cdn2.suno.ai/image_a.jpeg\",\"audio_url\":\"https://cdn1.suno.ai/track_a.mp3\"},{\"image_url\":\"https://cdn2.suno.ai/image_b.jpeg\",\"audio_url\":\"https://cdn1.suno.ai/track_b.mp3\"}]}",
"createTime": 1763982056689,
"completeTime": 1763982132051,
"costTime": 75362
}
}
Failure Callback
{
"code": 400,
"message": "failed",
"data": {
"taskId": "task_12345678",
"state": "failed",
"failCode": "CONTENT_VIOLATION",
"failMsg": "Content does not meet safety guidelines",
"createTime": 1763982056689,
"completeTime": 1763982070000,
"costTime": 13311
}
}
Quick Start
1. Submit Generation Task
curl -X POST https://api.apixo.ai/api/v1/generateTask/suno \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_type": "callback",
"callback_url": "https://your-server.com/api/suno-callback",
"input": {
"mode": "V5",
"prompt": "[Intro] Chill but groovy...",
"style": "K-pop, Electronic, Lo-fi",
"title": "All Day With Pupu",
"customMode": true,
"instrumental": false,
"negativeTags": "Acoustic, Soft, Slow",
"styleWeight": 0.9,
"weirdnessConstraint": 0.35,
"audioWeight": 0.7
}
}'
Response:
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678"
}
}
2. Check Task Status (Optional Polling)
curl -X GET "https://api.apixo.ai/api/v1/statusTask/suno?taskId=task_12345678" \
-H "Authorization: Bearer YOUR_API_KEY"
Response (Success):
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_12345678",
"state": "success",
"resultJson": "{\"resultUrls\":[{\"image_url\":\"https://cdn2.suno.ai/image.jpeg\",\"audio_url\":\"https://cdn1.suno.ai/track.mp3\"}]}"
}
}
3. Handle Callback Payload
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678",
"state": "complete",
"resultJson": "{\"resultUrls\":[{\"image_url\":\"https://cdn2.suno.ai/image_a.jpeg\",\"audio_url\":\"https://cdn1.suno.ai/track_a.mp3\"},{\"image_url\":\"https://cdn2.suno.ai/image_b.jpeg\",\"audio_url\":\"https://cdn1.suno.ai/track_b.mp3\"}]}",
"createTime": 1763982056689,
"completeTime": 1763982132051
}
}
Best Practices
Request Mode Selection
| Mode | Use When |
|---|---|
| Callback | Recommended for all production traffic (three-stage webhook: text, first, complete) |
| Async | For manual polling or local experiments |
Performance Tips
- Generation usually completes in 2-3 minutes; avoid polling before 90 seconds, and polling interval of 10s is recommended.
- Expect three callback stages; some jobs may skip
text/firstand jump tocomplete - Generated assets remain available for 14 days—download promptly
- Retry network errors with exponential backoff; honor rate limits
Parameter Guidance
- New users: Start with
customMode: falsefor simpler usage—onlypromptis needed - Custom mode with vocals: When
customMode: trueandinstrumental: false, provide full lyrics inprompt; Suno will sing them verbatim - Custom mode instrumental: When
customMode: trueandinstrumental: true, onlystyleandtitleare needed - Character limits: Respect model-specific limits—V4 has stricter limits (3000/200) vs V5 (5000/1000)
- Style control: Use
negativeTagsto exclude unwanted genres andstyleWeight(0–1) to tighten adherence - Vocal gender:
vocalGenderis best-effort only; combine with lyrical cues for stronger control - Persona: Use
personaIdin custom mode to apply a consistent persona style across generations
Reliability & Compliance
- Ensure callback endpoints accept JSON POST bodies and respond quickly with 200
- Validate lyrics for policy compliance to avoid
CONTENT_VIOLATION - Log task IDs and callback payloads for audit and troubleshooting
- Monitor storage budgets; each job returns two MP3 + cover images