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.
https://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.
1 · Submit
POST returns a task id immediately. Credits are frozen; generation runs in the background.
2 · Stream-ready (~20–30s)
First callback. Both tracks now have a streamUrl (play now), cover image and lyrics. Final mp3 not ready yet.
3 · Complete (~60–90s)
Second callback. Final mp3 of every track is persisted to our CDN; the task is succeeded.
Why this matters
#Authentication
Send your API key in the Authorization header.
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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | suno-music | Always "suno-music". |
version | string | No | V5_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 |
prompt | string | Yes | — | 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. |
customMode | boolean | No | false | Advanced control. When true, style+title required (and prompt as lyrics unless instrumental). |
instrumental | boolean | No | false | Generate instrumental (no vocals). |
style | string | No | — | Genre/mood (required in custom mode). Max 200 chars on V4, 1000 on every other version. e.g. Synthwave, Jazz, Lo-fi. |
title | string | No | — | Track title (required in custom mode, max 80 chars). |
negativeTags | string | No | — | Styles/traits to avoid. e.g. Heavy Metal. |
vocalGender | string | No | — | Preferred vocal gender (custom mode only; best-effort). Options: m, f |
styleWeight | number | No | — | How strongly to follow the style. Range 0–1, up to 2 decimals. |
weirdnessConstraint | number | No | — | Experimental/creative deviation. Range 0–1, up to 2 decimals. |
audioWeight | number | No | — | Balance weight for audio features vs. other factors. Range 0–1, up to 2 decimals. |
personaId | string | No | — | Apply a Persona/Voice to the generation. Custom mode only. |
personaModel | string | No | — | Persona type. Only available on V5 and V5_5. Options: style_persona, voice_persona |
callback_url | string | No | — | Optional public http(s) URL. We POST the task result here the moment generation finishes (success or failure). |
#Request example
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.
{
"id": "task_abc123",
"status": "queued",
"type": "music",
"model": "suno-music"
}Getting the tracks
#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 | ~Time | What's ready |
|---|---|---|
| Stream-ready (first) | ~20–30s | streamUrl (playable), cover image, lyrics — for both tracks |
| Complete (complete) | ~60–90s | Final mp3 of every track, persisted to our CDN; task succeeded |