Skip to navigation

Submit Text-to-Speech Job

Submit a job for asynchronous speech synthesis. Returns 202 with the accepted job and a Location header pointing at GET /v2/tts/jobs/{id}; poll that endpoint for the result. Accepts the same body as POST /v2/tts. API-key requests require your organization to be enabled for the asynchronous TTS rollout; otherwise the request returns 503.

Authentication

x-api-keystring
API Key authentication via header

Headers

Idempotency-KeystringOptional

Optional idempotency key, 1–128 characters after trimming. Reusing the same key within your organization returns the original job; reusing it with a different request body returns 409.

Request

This endpoint expects an object.
scriptstringRequired
The text to synthesize into speech.
voiceIdstringRequired

A voice id to synthesize with — either an ElevenLabs voice id (discover via GET /v2/voices) or the id of a voice cloned via POST /v2/voices.

providerenumRequired

The voice provider to synthesize with. Currently elevenlabs.

Allowed values:
stabilitydoubleOptional

Voice stability (0-1). Higher is more consistent, lower is more expressive.

similarityBoostdoubleOptional

How closely the synthesized audio matches the original voice (0-1).

Response

Job accepted successfully.
idstring
Unique identifier for the job.
statusenum
The current lifecycle status of the job.
Allowed values:
createdAtdatetime
When the job was created.
urlstringOptional
The hosted URL of the synthesized audio. Null unless status is SUCCESS.
durationdoubleOptional
Duration of the synthesized audio in seconds. Null unless status is SUCCESS.
errorobjectOptional
Error detail. Null unless status is FAILED.
startedAtdatetimeOptional
When synthesis started. Null until synthesis starts.
finishedAtdatetimeOptional
When the job reached a terminal state. Null until the job is SUCCESS or FAILED.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
409
Conflict Error
422
Unprocessable Entity Error
503
Service Unavailable Error