Skip to main content
POST
POST /v1/audio/music composes a song or an instrumental from a text prompt, with optional lyrics, and returns the audio file as the response body. The request waits until the track is finished, so set a client timeout of several minutes. To extend, cover, remix, or split a song in later steps, use the task-based Music generation tasks endpoint with Suno or Flow Music instead.
string
required
Set to eleven-music-v2.5.
string
required
What the music should sound like, up to 4,100 characters: genre, mood, instruments, tempo, and structure.
string
Lyrics to sing, up to 4,000 characters.
integer
default:"30"
Length in whole seconds, from 3 to 300. You’re billed for the length you request.
boolean
true guarantees an instrumental with no vocals.
string
default:"mp3"
mp3, opus, or pcm. WAV isn’t offered for generated music. See Output formats.
Fields that aren’t listed here return invalid_request.

Response

A successful request returns HTTP 200 with the audio as the body. The Content-Type matches response_format: audio/mpeg, audio/ogg, or audio/pcm. The response carries x-gateway-execution-id.

Billing

The request is billed for duration_seconds at $0.00375 per second, whatever the finished file’s exact length. The default 30 seconds costs $0.1125, and the 300-second maximum costs $1.125. Failed requests aren’t charged. This endpoint rejects Idempotency-Key. If a request times out, the track may already have been generated: check your Console request logs before you retry.

Errors

See Errors for rate limits and provider failures.