Skip to content

Music

POST/v1/run

Music is ElevenLabs's AI audio generation model. Produce high-quality music tracks, sound effects, and audio landscapes from natural language prompts.

Request body

Submit an async generation request. The model field selects the model; other fields are model-specific input parameters.

stringmodelrequired

Model identifier. Set to elevenlabs/music.

Default: elevenlabs/music

stringpromptrequired

The text prompt describing the music to generate

Optional<boolean>force_instrumental

If true, guarantees that the generated song will be instrumental.

Default: false

Optional<integer>music_length_ms

The length of the song to generate in milliseconds (3000-600000). If not provided, the model will choose a length based on the prompt.

Range: 3000 to 600000

Response Schema

The submit endpoint returns an accepted generation task. Poll the result endpoint with the returned id for terminal outputs or errors.

Optional<string>error

Error message if the task failed. Empty on success.

stringidrequired

Unique identifier for the generation task.

Optional<string>model

Model ID used for the prediction.

Optional<array>outputs

Array of generated content. Empty when status is not completed.

stringstatusrequired

Status of the task: pending, running, completed, failed, or timeout.

Allowed values: pending, running, completed, failed, timeout

Model capabilities

array<string>capability_tagsrequired

Capabilities declared by the model registry.

Default: text-to-audio

stringexecution_moderequired

Execution mode declared by the model registry.

Default: async