Sozdai LogoDocs
Suno/Generate Music

Generate Music

Generate full songs from a text prompt with Suno. One model — suno-music — the engine version (V5, V4.5+, …) is just a parameter. Each request returns two track variations. You can play each track while it is still generating, then get a permanent mp3 on our CDN once it finishes.

POSThttps://api.foxwire.ai/v1/media/generations

#Generation flow

Music generation is asynchronous and completes in two meaningful stages. Suno signals both stages with a callback to us, which we use to react immediately — you observe the same two stages by polling the task.

Why this matters

Your users can start listening at stage 2 (~20–30s) instead of waiting ~60–90s for the full song. Poll the task, and as soon as a track has a streamUrl, play it. Get Music Details

#Authentication

Send your API key in the Authorization header.

http
Authorization: Bearer sk-corr-...

#Request parameters

Always send model: "suno-music". In non-custom mode (default) only prompt is required. In custom mode (customMode: true) style and title are required, and prompt is used as the exact lyrics (unless instrumental).

Prompt length limits differ by mode

Non-custom mode: prompt max 500 chars. Custom mode: prompt is the lyrics — max 3000 chars on V4, 5000 on every other version. style: max 200 (V4) / 1000 (other versions); title: max 80.
ParameterTypeRequiredDefaultDescription
modelstringYessuno-musicAlways "suno-music".
versionstringNoV5_5
Suno engine version (the model is a parameter, not a separate endpoint). Default V5_5 (latest).
Options: V5_5, V5, V4_5PLUS, V4_5, V4_5ALL, V4
promptstringYes
Non-custom mode (default): a short idea, lyrics auto-written — max 500 chars. Custom mode (customMode: true): used as the exact lyrics — max 3000 chars on V4, 5000 on every other version.
customModebooleanNofalse
Advanced control. When true, style+title required (and prompt as lyrics unless instrumental).
instrumentalbooleanNofalse
Generate instrumental (no vocals).
stylestringNo
Genre/mood (required in custom mode). Max 200 chars on V4, 1000 on every other version. e.g. Synthwave, Jazz, Lo-fi.
titlestringNo
Track title (required in custom mode, max 80 chars).
negativeTagsstringNo
Styles/traits to avoid. e.g. Heavy Metal.
vocalGenderstringNo
Preferred vocal gender (custom mode only; best-effort).
Options: m, f
styleWeightnumberNo
How strongly to follow the style. Range 0–1, up to 2 decimals.
weirdnessConstraintnumberNo
Experimental/creative deviation. Range 0–1, up to 2 decimals.
audioWeightnumberNo
Balance weight for audio features vs. other factors. Range 0–1, up to 2 decimals.
personaIdstringNo
Apply a Persona/Voice to the generation. Custom mode only.
personaModelstringNo
Persona type. Only available on V5 and V5_5.
Options: style_persona, voice_persona
callback_urlstringNo
Optional public http(s) URL. We POST the task result here the moment generation finishes (success or failure).

#Request example

bash
curl https://api.foxwire.ai/v1/media/generations \
  -H "Authorization: Bearer $CORRY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "suno-music",
    "version": "V5_5",
    "prompt": "upbeat indie rock about a summer road trip",
    "instrumental": false,
    "callback_url": "https://your-app.com/webhooks/corry"
  }'

#Response

Returns the task id immediately. Poll it (or wait for your callback_url) to get the tracks.

json
{
  "id": "task_abc123",
  "status": "queued",
  "type": "music",
  "model": "suno-music"
}

Getting the tracks

The tracks (streamUrl, audioUrl, lyrics, cover) are returned by the task-details endpoint. /docs/suno/task →

#Callbacks & timing

A Suno generation fires callbacks at two stages — stream-ready and complete. Internally we use these to stop polling early and react instantly. There are two separate callback concepts to keep straight:

Stage~TimeWhat's ready
Stream-ready (first)~20–30sstreamUrl (playable), cover image, lyrics — for both tracks
Complete (complete)~60–90sFinal mp3 of every track, persisted to our CDN; task succeeded

Your callback_url

If you pass callback_url, we POST you the final task result (the full tracks payload) once, when the task reaches a terminal state (succeeded/failed). It must be a public https URL. Don't have one? Just poll the task — it's the same data. (Note: Suno also emits an earlier "text" callback; only stream-ready and complete carry usable results.)