Zum Hauptinhalt springen
POST
/api/v1/audio/queue
Rufen Sie /audio/quote auf, um die Kosten zu schätzen, und fragen Sie dann /audio/retrieve mit der zurückgegebenen queue_id ab, bis die Generierung abgeschlossen ist. Wenn Sie generierte Medien nach dem Abruf aufbewahren, rufen Sie /audio/complete auf, sobald Sie sie heruntergeladen haben.

Postman-Collection

Weitere Beispiele finden Sie in dieser Postman-Collection.

Autorisierungen

Authorization
string
header
erforderlich

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

Body

application/json
model
string
erforderlich

The model to use for audio generation.

Beispiel:

"elevenlabs-music"

prompt
string
erforderlich

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
Beispiel:

"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.

Beispiel:

"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.

Erforderlicher Bereich: x > 0
Beispiel:

60

force_instrumental
boolean

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

Beispiel:

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.

Beispiel:

false

voice
string

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

Beispiel:

"Aria"

language_code
string

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

Beispiel:

"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.

Erforderlicher Bereich: 0.25 <= x <= 4
Beispiel:

1

Antwort

Audio generation request queued successfully

model
string
erforderlich

The ID of the model used for audio generation.

Beispiel:

"elevenlabs-music"

queue_id
string
erforderlich

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

Beispiel:

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

status
enum<string>
erforderlich

The status of the audio generation request.

Verfügbare Optionen:
QUEUED
Beispiel:

"QUEUED"