Skip to main content
POST
/api/v1/audio/queue
Appelez /audio/quote pour estimer le coût, puis interrogez /audio/retrieve avec le queue_id renvoyé jusqu’à ce que la génération soit terminée. Si vous conservez les médias générés après récupération, appelez /audio/complete une fois que vous les avez téléchargés. Les modèles de changeur de voix utilisent /audio/voice-changer/queue à la place.

Collection Postman

Pour des exemples supplémentaires, veuillez consulter cette collection Postman.

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json
model
string
requis

The model to use for audio generation. Voice-changer models are not supported here; use the /api/v1/audio/voice-changer endpoints instead.

Exemple:

"elevenlabs-music"

prompt
string
requis

The prompt describing the audio to generate. Minimum and maximum prompt lengths vary by model; inspect /models for min_prompt_length and prompt_character_limit.

Minimum string length: 1
Exemple:

"A warm spoken narration introducing a product launch."

lyrics_prompt
string

Optional lyrics/text for lyric-capable models. Required when /models reports lyrics_required=true; unsupported when /models reports supports_lyrics=false.

Exemple:

"Verse 1: Walking through the city lights..."

duration_seconds

Optional duration hint in seconds. Only supported for models that expose duration metadata via /models. Accepts either an integer or a numeric string. If omitted, the model default duration is used when available.

Plage requise: x > 0
Exemple:

60

force_instrumental
boolean

Optional instrumental toggle. Only supported when /models reports supports_force_instrumental=true.

Exemple:

false

lyrics_optimizer
boolean

When enabled, auto-generates lyrics from the prompt. Only supported when /models reports supports_lyrics_optimizer=true. lyrics_prompt must be empty when this is true.

Exemple:

false

loop
boolean

Render the clip so its end splices back into its start without an audible seam. Only supported when /models reports supports_loop=true.

Exemple:

false

voice
string

Optional voice selection for voice-enabled models. See /models?type=music for the model's supported voices and default_voice.

Exemple:

"Aria"

language_code
string

Optional ISO 639-1 language code. Only supported when /models reports supports_language_code=true.

Exemple:

"en"

speed
number

Optional audio speed multiplier. Only supported when /models reports supports_speed=true; use the model-specific min_speed and max_speed values.

Plage requise: 0.25 <= x <= 4
Exemple:

1

Réponse

Audio generation request queued successfully

model
string
requis

The ID of the model used for audio generation. Voice-changer models are not supported on /api/v1/audio/retrieve or /api/v1/audio/complete; use the /api/v1/audio/voice-changer endpoints instead.

Exemple:

"elevenlabs-music"

queue_id
string
requis

The ID of the audio generation request. Use this to poll for status and retrieve the result.

Exemple:

"123e4567-e89b-12d3-a456-426614174000"

status
enum<string>
requis

The status of the audio generation request.

Options disponibles:
QUEUED
Exemple:

"QUEUED"