Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generateTask/suno | Создание задачи генерации |
| GET | /api/v1/statusTask/suno | Запрос статуса задачи |
Authentication
Все запросы требуют API Key в заголовке:Request Body
Parameters
async (polling) или callback (webhook)
Callback URL, обязателен при request_type=callback (условно)
Стратегия маршрутизации: auto, value или official
Параметры входа модели
V4— Classic version, stable and reliableV4_5— Improved version, better audio qualityV4_5ALL— V4.5 All versionV4_5PLUS— Enhanced version (recommended), balanced quality and speedV5— Latest version, best audio quality and creativity
customMode=true: V4 max 3000 chars, V4.5/V4.5ALL/V4.5PLUS/V5 max 5000 charscustomMode=false: max 500 chars
- V4: max 200 chars
- V4.5/V4.5ALL/V4.5PLUS/V5: max 1000 chars
Example
Simple Mode (Non-Custom)Response
POST /api/v1/generateTask/suno
При успехе возвращает taskId для последующих запросов статуса. Success:GET /api/v1/statusTask/suno
Запрос статуса выполнения задачи и результатов по taskId.resultJson structure:
| Field in each item | Type | Description |
|---|---|---|
audio_url | string | MP3 audio file URL |
image_url | string | Cover art image URL (JPG) |
Status Response Fields
Уникальный идентификатор задачи.
Текущее состояние задачи: pending, processing, success или failed.
JSON-строка с массивом resultUrls. Присутствует только при success. Парсите через JSON.parse().
Код ошибки. Присутствует только при state=failed. См. Error Codes.
Читаемое сообщение об ошибке. Присутствует только при state=failed.
Timestamp создания задачи (Unix миллисекунды).
Timestamp завершения задачи (Unix миллисекунды).
Длительность обработки в миллисекундах.
Error Codes
| Code | Description |
|---|---|
| 400 | Неверные параметры или ошибка запроса |
| 401 | Недействительный или отсутствующий API Key |
| 429 | Превышен лимит запросов |
| Fail Code | Description |
|---|---|
CONTENT_VIOLATION | Контент нарушает правила безопасности |
Rate Limits
| Limit | Value |
|---|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
Tips
- Generation time: Average ~60-90 seconds. Submit task, wait 45 seconds, then poll every 5 seconds.
- Callback mode: Recommend using
callbackmode to avoid frequent polling. - Audio expiration: Result URLs are valid for 15 days. Download promptly.
- Content moderation: Lyrics and descriptions must comply with content safety guidelines.
- Version selection:
V4: Classic version, stable and reliableV4_5/V4_5ALL: Improved versions, better audio qualityV4_5PLUS: Enhanced version (recommended), balanced quality and speedV5: Latest version, best audio quality and creativity
- Custom mode vs simple mode:
customMode: false: Simple mode, only provide short description (max 500 chars), system auto-generates lyrics and stylecustomMode: true: Custom mode, provide full lyrics (max 5000 chars), specify style and title
- Lyrics writing tips:
- Use standard song structure (Verse, Chorus, Bridge, etc.)
- Leave blank lines between sections
- Use markers like [Verse 1], [Chorus], [Bridge] to clarify structure
- Lyrics should have rhythm and rhyme
- Style description:
- Use music terminology (e.g., “pop”, “rock”, “jazz”, “orchestral”)
- Combine multiple styles (e.g., “orchestral, emotional, film score”)
- Describe mood and atmosphere (e.g., “upbeat”, “melancholic”, “energetic”)
- Vocal selection:
vocalGender: "m": Male voice, for lower range, powerful songsvocalGender: "f": Female voice, for higher range, emotional songs- Not specified: System chooses based on style
- Instrumental mode:
instrumental: true: Generate instrumental only (no vocals)- Ideal for background music, soundtracks, ambiance
- Describe instruments and atmosphere in prompt, no lyrics needed
- Weight parameter tuning:
styleWeight(0-1): Style intensity, higher = strictly follows specified styleweirdnessConstraint(0-1): Creativity level, lower = conservative, higher = innovativeaudioWeight(0-1): Audio quality weight- Recommended range: 0.4-0.7
- Negative tags: Use
negativeTagsto avoid unwanted elements (e.g., “noise, distortion, low quality”) - Best practices:
- Test with simple mode first to explore styles and effects
- Once satisfied, use custom mode for full lyrics
- V4_5PLUS or V5 versions offer best quality
- Clear structure and strong rhythm in lyrics yield better results
- Output format: Each generation produces 2 tracks. Each track includes an
audio_url(MP3) andimage_url(cover art JPG). ParseresultJsonand iterate over theresultUrlsarray of objects — do NOT assume it is a plain string array. - Lyrics in response: When vocals are included, the
lyricsfield in the status response contains the full auto-generated (or echoed) lyrics with section markers like[Verse 1],[Chorus], etc.