{"openapi":"3.1.0","info":{"title":"ElevenLabs: Eleven v4 Turbo: Text To Speech","version":"sha256:b263a45d1d72ca42aa0c57b920fe251f7e18268ea6ea4c27c940206a5d655d67","description":"A faster, lower-cost version of Eleven v4 for interactive apps and high-volume narration. Keeps v4's expressive delivery, inline audio tags and 90+ languages, with stability and similarity controls. Up to 5,000 characters per request.","x-model":{"id":"elevenlabs/eleven-v4-turbo","category":"text-to-speech","group":{"id":"elevenlabs/eleven-v4-turbo","name":"ElevenLabs: Eleven v4 Turbo"},"model_url":"https://www.musespan.com/models/elevenlabs/eleven-v4-turbo","catalog_url":"https://www.musespan.com/v1/models"}},"servers":[{"url":"https://api.musespan.com"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/model-tasks":{"post":{"operationId":"createNativeTask","summary":"Create a native result task","description":"Put model parameters inside input. Maximum request body: 4 MiB. Reuse X-Request-Id only with the same body. Completion does not imply final billing settlement. A model task may first wait in our queue (status queued, with an estimated queue_position) while the account or the platform is at its limit of tasks running at once; one still waiting 5 minutes after it was submitted ends as failed with error.code queue_timeout and is not charged. Once sent, a task with no result 15 minutes after it was accepted, or whose submission is still not confirmed 15 minutes after it was sent, ends as failed with error.code generation_timeout and is not charged (any hold is refunded in full); poll for up to 25 minutes to see the final status. To try again, submit a new task with a new X-Request-Id: the old ID keeps returning the failed task. A task still waiting in the queue (status queued with queue_position) can be cancelled with POST /v1/model-tasks/{id}/cancel and the same API key: it ends as failed with error.code cancelled and its hold is refunded in full. A task no longer waiting in the queue (being sent, sent, or ended) cannot be cancelled (409 task_not_cancellable). A task that could not be started because generation is temporarily unavailable ends at once as failed with error.code upstream_unavailable and is not charged (any hold is refunded in full); it does not mean your input was wrong. Try again later with a new X-Request-Id: the old ID keeps returning the failed task. Task objects may gain fields in later versions: ignore fields you do not know. Price: $0.04 per 1K characters. Charged per 1,000 characters of input text, prorated to the exact length (spaces, punctuation and tags count). Each request temporarily reserves the price of its own text ($0.04 per 1,000 characters of `text`, counted as Unicode characters, the same count as `maxLength`, at least 1 character, rounded up to $0.000001; at most $0.20; a request with an undeclared top-level field, another top-level text over 64 characters that is not an `enum` or `const` value, or more than 64 characters of text inside another top-level list or object, reserves $0.20); you are charged for actual usage, usually within a minute: any unused amount is released and any usage above it is charged to your balance, even if that takes it below zero; while your balance is below zero, new requests are paused until a top-up covers it. Your balance must be at least the larger of $0.01 and this reserve. Failed generations are not charged.","parameters":[{"name":"X-Request-Id","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"additionalProperties":false,"properties":{"model":{"const":"elevenlabs/eleven-v4-turbo"},"input":{"$ref":"#/components/schemas/Input_TtsElevenV4TurboInput"}}}}}},"responses":{"202":{"description":"Owned task. Only completed tasks include output; null and empty results can be successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeTask"}}}},"400":{"description":"Invalid request: missing or malformed X-Request-Id, or input that does not match the model schema. Nothing was created. native_model_unavailable: this model is served on a different endpoint; read its openapi_url in GET /v1/models, and use an ID from suggested_models there.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"402":{"description":"Insufficient balance. Nothing was created; top up and resend with the same X-Request-Id.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"403":{"description":"This API key cannot use this model.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"404":{"description":"model_not_found: this ID cannot be called with this API key. Nothing was created. Do not resend it unchanged: use an ID from suggested_models or an id from GET /v1/models.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"409":{"description":"request_id_conflict: this X-Request-Id was used with a different request body (another spelling of the model ID also counts as a different body). Resend byte-identical bytes, or use a new X-Request-Id.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"429":{"description":"Too many requests, or too many of your tasks already waiting in the queue (too_many_active_tasks). Tasks beyond the number your account may run at once wait in the queue instead of being refused; this means the queue itself is full. Back off a moment, then resend with the same X-Request-Id.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"503":{"description":"Temporarily unavailable. Retry later with the same X-Request-Id.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}}}}},"/v1/model-tasks/{id}":{"get":{"operationId":"getNativeTask","summary":"Get an owned task","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Owned task. Only completed tasks include output; null and empty results can be successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeTask"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"404":{"description":"task_not_found: no task with this ID exists for this API key. If the POST may not have arrived, resend the exact same body with the same X-Request-Id instead of polling.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"429":{"description":"Too many requests. Back off, then query the same task again.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"503":{"description":"Temporarily unavailable. Query the same task again later.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}}}}},"/v1/model-tasks/{id}/cancel":{"post":{"operationId":"cancelNativeTask","summary":"Cancel a task still waiting in the queue","description":"A task still waiting in the queue (status queued with queue_position) can be cancelled with POST /v1/model-tasks/{id}/cancel and the same API key: it ends as failed with error.code cancelled and its hold is refunded in full. A task no longer waiting in the queue (being sent, sent, or ended) cannot be cancelled (409 task_not_cancellable).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The cancelled task: status failed with error.code cancelled. Cancelling it again returns the same task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NativeTask"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"404":{"description":"task_not_found: no task with this ID exists for this API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"409":{"description":"task_not_cancellable: the task is no longer waiting in the queue (being sent, sent, or ended). The body includes its current status; keep polling it.","content":{"application/json":{"schema":{"type":"object","required":["error","status"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}},"status":{"enum":["queued","running","completed","failed"],"description":"The task status now; keep polling the task."}}}}}},"429":{"description":"Too many requests. Back off, then try again.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"503":{"description":"Temporarily unavailable. Try again later.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}}}}},"/v1/model-tasks/{id}/artifacts/{index}":{"get":{"operationId":"downloadNativeArtifact","summary":"Download a declared result file using the task owner API key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Attachment download. Never execute SVG/HTML result bytes. Audio results: the file is the generated audio in the format the request selected, served as application/octet-stream. Identify the format from the leading bytes before playing or saving it: `ID3` or an MPEG frame sync (0xFF then 0xE0-0xFF) is MP3 (audio/mpeg), `RIFF`....`WAVE` is WAV (audio/wav), `OggS` is Ogg/Opus (audio/ogg), `fLaC` is FLAC (audio/flac), and `ftyp` at byte 4 is MP4/M4A (audio/mp4). Headerless formats such as raw PCM, mu-law or A-law cannot be played directly; save them and convert them with the sample rate you requested.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"404":{"description":"artifact_not_found: the task is not completed yet, the index is not one the completed task declares, or the task was submitted with another API key. Poll GET /v1/model-tasks/{id} until status is completed, then download only the indexes its output declares, with the API key that submitted the task.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"429":{"description":"Too many requests or downloads at once. Back off, then download the same file again.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}},"503":{"description":"Temporarily unavailable. Download the same file again later.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"param":{"anyOf":[{"type":"string"},{"enum":[null]}]},"suggested_models":{"type":"array","items":{"type":"string"},"description":"With model_not_found or native_model_unavailable: IDs this API key can call instead (ids from GET /v1/models). Empty when nothing is close."}}}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"schemas":{"NativeOutput":{"$ref":"#/components/schemas/Output_TtsElevenV4TurboOutput"},"NativeTask":{"description":"Task objects may gain fields in later versions: ignore fields you do not know.","anyOf":[{"type":"object","required":["id","model","status"],"additionalProperties":true,"properties":{"id":{"type":"string"},"model":{"const":"elevenlabs/eleven-v4-turbo"},"status":{"enum":["queued","running"]},"queue_position":{"type":"integer","minimum":1,"description":"Only while the task waits in the queue: its estimated place (1 = next). An estimate that can change; the account may also be at its own limit of tasks running at once, in which case its tasks wait in order for one of its own to finish."}}},{"type":"object","required":["id","model","status","output"],"additionalProperties":true,"properties":{"id":{"type":"string"},"model":{"const":"elevenlabs/eleven-v4-turbo"},"status":{"const":"completed"},"output":{"$ref":"#/components/schemas/NativeOutput"}}},{"type":"object","required":["id","model","status","error"],"additionalProperties":true,"properties":{"id":{"type":"string"},"model":{"const":"elevenlabs/eleven-v4-turbo"},"status":{"const":"failed"},"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Stable machine-readable failure code; keep a branch for unknown codes. A failed task is not charged, and a retry needs a new X-Request-Id. generation_timeout: no result 15 minutes after the task was accepted, or the submission was not confirmed within 15 minutes. upstream_unavailable: generation was temporarily unavailable and the task was not started; try again later. invalid_parameters: the input was rejected; error.issues lists each rejected field and its rule code. Fix them and submit a new task. Model tasks only, ended before they were sent: cancelled: you cancelled the queued task. queue_timeout: still waiting in the queue 5 minutes after submission. model_unavailable_while_queued: the model became unavailable while the task was queued. insufficient_balance: the balance went below zero while the task was queued; top up first."},"message":{"type":"string"},"issues":{"type":"array","maxItems":8,"items":{"type":"object","required":["field","rule"],"additionalProperties":false,"properties":{"field":{"type":"string","maxLength":256},"rule":{"type":"string","enum":["required","string","integer","number","boolean","array","object","allowed_value","range","length","multiple","invalid","unsupported_value","file_size","file_format","file_unreadable","duration","content_policy"]}}},"description":"Present only with code invalid_parameters: each rejected input field (field is its path in input, for example voice or image_urls[0]) and a rule code. Free-form error text is never returned."}}}}}]},"Input_TtsElevenV4TurboInput":{"properties":{"apply_text_normalization":{"default":"auto","description":"Whether to normalize text such as numbers and dates before generation.","enum":["auto","on","off"],"title":"Apply Text Normalization","type":"string"},"language_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Language code (ISO 639-1) for speech generation and text normalization.","title":"Language Code"},"output_format":{"default":"mp3_44100_128","description":"Output format of the generated audio. Formatted as codec_sample_rate_bitrate.","enum":["mp3_22050_32","mp3_44100_32","mp3_44100_64","mp3_44100_96","mp3_44100_128","mp3_44100_192","pcm_8000","pcm_16000","pcm_22050","pcm_24000","pcm_44100","pcm_48000","ulaw_8000","alaw_8000","opus_48000_32","opus_48000_64","opus_48000_96","opus_48000_128","opus_48000_192"],"title":"Output Format","type":"string"},"seed":{"anyOf":[{"maximum":4294967295,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Seed for best-effort reproducibility. Identical output is not guaranteed.","title":"Seed"},"similarity_boost":{"default":0.75,"description":"How closely the output follows the reference voice. Higher values increase similarity but may reduce naturalness.","maximum":1,"minimum":0,"title":"Similarity Boost","type":"number"},"stability":{"default":0.5,"description":"Voice stability. Lower values allow more expressive delivery; higher values make delivery more consistent.","maximum":1,"minimum":0,"title":"Stability","type":"number"},"text":{"description":"The text to convert to speech. Supports audio tags such as [whispering] and IPA pronunciation enclosed in forward slashes.","examples":["[excited] Hello! Welcome to Eleven v4."],"maxLength":5000,"minLength":1,"title":"Text","type":"string"},"timestamps":{"default":false,"description":"Whether to return character-level timing information with the generated audio.","title":"Timestamps","type":"boolean"},"voice":{"default":"Rachel","description":"The voice to use for speech generation","examples":["Aria","Roger","Sarah","Laura","Charlie","George","Callum","River","Liam","Charlotte","Alice","Matilda","Will","Jessica","Eric","Chris","Brian","Daniel","Lily","Bill"],"title":"Voice","type":"string"}},"required":["text"],"title":"TextToSpeechRequestV4","type":"object"},"Output_File":{"properties":{"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The mime type of the file.","examples":["image/png"],"title":"Content Type"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the file. It will be auto-generated if not provided.","examples":["z9RV14K95DvU.png"],"title":"File Name"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The size of the file in bytes.","examples":[4404019],"title":"File Size"},"url":{"description":"The URL where the file can be downloaded from.","title":"Url","type":"string"}},"required":["url"],"title":"File","type":"object"},"Output_TtsElevenV4TurboOutput":{"properties":{"audio":{"$ref":"#/components/schemas/Output_File","description":"The generated audio file"},"timestamps":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"description":"Timestamps for each word in the generated speech. Only returned if `timestamps` is set to True in the request.","title":"Timestamps"}},"required":["audio"],"title":"TTSOutput","type":"object"}}}}