Suno
Suno · Звук
suno- Режимы
- 1
Режимы и цены
- Цена
- 14 токенов
- за генерацию
Запрос
Песня или музыка
"model": "suno:create"Цена
14 токенов за генерацию. Цена не зависит от параметров.
Пример запроса
curl https://api.unitool.ai/v1/generations \
-H "Authorization: Bearer $UNITOOL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=60" \
-d '{
"model": "suno",
"mode": "create",
"input": {
"prompt": "A red fox running through fresh snow at sunrise",
"model": "V6",
"instrumental": false
},
"metadata": {
"order_id": "A-1042"
}
}'{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "suno",
"mode": "create",
"status": "queued",
"progress": 0,
"cost": {
"estimated_tokens": 14,
"charged_tokens": 0,
"refunded_tokens": 0,
"settled": false
},
"outputs": [],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": null,
"expires_at": null
}Результат
Пока генерация идёт, читайте её по id: статус сменится с queued или running на succeeded. С заголовком Prefer: wait готовый объект может прийти уже в ответе на POST, тогда это 200, а не 202.
curl https://api.unitool.ai/v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60 \
-H "Authorization: Bearer $UNITOOL_API_KEY"{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "suno",
"mode": "create",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 14,
"charged_tokens": 14,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "audio",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp3",
"content_type": "audio/mpeg",
"size": 482304,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}Если генерация не удалась
HTTP-ответ тот же 200. Причина в error.code, судьба токенов в error.refund. Все коды: Генерации медиа
{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "suno",
"mode": "create",
"status": "failed",
"progress": 0,
"cost": {
"estimated_tokens": 14,
"charged_tokens": 14,
"refunded_tokens": 14,
"settled": true
},
"outputs": [],
"error": {
"code": "model_error",
"message": "The model failed to produce a result.",
"refund": "full"
},
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": null
}Параметры
| Параметр | Описание |
|---|---|
promptstring · обязательный | |
modelstring | Модель. V6 follows the brief most precisely (default). V6_MINI is faster and a little simpler, for drafts. V6_WILD blends genres and strays from the brief on purpose. Same price.Значения:V6V6_MINIV6_WILDПо умолчанию "V6" |
lyricsstring | Текст песни. Exact words to sing, up to 5000 characters, any language. Put section tags on their own lines: [Intro] [Verse] [Pre-Chorus] [Chorus] [Bridge] [Outro]. With lyrics the prompt is only the musical style (up to 1000 characters). Omit to let Suno write the words from the prompt (then the prompt is limited to 500 characters). |
instrumentalboolean | Без вокала. true = no vocals, for background music. The prompt is then the musical style (up to 1000 characters). Do not combine with lyrics.По умолчанию false |
titlestring | Название. Track title, up to 80 characters. Only with lyrics or instrumental=true. |
durationnumber 10–360 | Длительность, сек. Target length in whole seconds, 10-360. Only with lyrics or instrumental=true; without it Suno picks the length itself. |
vocal_genderstring | Голос. Singer voice: f or m. Only with lyrics; without lyrics say "female vocals" in the prompt instead.Значения:fm |
negative_tagsstring | Исключить стили. Comma-separated styles or sounds to avoid, up to 200 characters. Only with lyrics or instrumental=true. |
Вебхук
Когда генерация завершается, тот же объект приходит POST-запросом на ваш адрес в поле data. Подпись, повторы и настройка: Вебхуки
{
"type": "generation.succeeded",
"timestamp": "2026-11-29T12:00:41.000Z",
"data": {
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "suno",
"mode": "create",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 14,
"charged_tokens": 14,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "audio",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp3",
"content_type": "audio/mpeg",
"size": 482304,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}
}Лимиты
Генерация асинхронная: создание, ожидание или опрос, результат по ссылке на 7 дней. Подробно: Генерации медиа
Одновременные генерации ограничены на аккаунт, лишние ждут в очереди: Лимиты и заголовки