---
title: "Create Speech Generation"
method: POST
path: "/v1/flows/text-to-speech"
tags: ["Flows", "Text to Speech"]
---

# Create Speech Generation

`POST /v1/flows/text-to-speech`

Start a speech generation with the selected model. Charged per character via text-to-speech billing. Use this over `/v1/text-to-speech` for the asynchronous generation lifecycle or for models not offered there; for direct, synchronous speech synthesis, prefer `/v1/text-to-speech`.

## Headers

- `xi-api-key` string, nullable — Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- union
  - ElevenFlashV25Request — Request body for the ElevenLabs Flash v2.5 TTS model.
    - `webhook` union
      - WebhookTargetAll — Deliver the result to all of the workspace's configured flows webhooks.
        - `type` 'all' — Send the result to all of the workspace's configured flows webhooks.
      - WebhookTargetIds — Deliver the result to specific configured flows webhooks.
        - `type` 'ids' — Send the result to the listed flows webhooks.
        - `ids` string[], required — The IDs of the workspace flows webhooks to deliver the result to. Each must be one of the workspace's configured flows webhooks.
    - `text` string, required — The text to synthesize into speech.
    - `voice` string, required — The ID of the voice to speak with.
    - `output_format` 'mp3_22050_32' | 'mp3_24000_48' | 'mp3_44100_32' | 'mp3_44100_64' | 'mp3_44100_96' | 'mp3_44100_128' | 'mp3_44100_192' — The audio encoding of the output, as `codec_sampleRateHz_bitrateKbps`. `mp3_44100_192` requires the Creator tier or above.
    - `pronunciation_dictionary_locators` PronunciationDictionaryVersionLocator[] — Pronunciation dictionaries to apply to the text, in order of precedence. Up to 3.
      - `pronunciation_dictionary_id` string, required — The ID of a pronunciation dictionary created via `POST /v1/pronunciation-dictionaries/add-from-file` or `POST /v1/pronunciation-dictionaries/add-from-rules`.
      - `version_id` string, nullable — The version of the dictionary to use. Omit to use the latest version.
    - `model_id` 'eleven_flash_v2_5', required — The model to use for the generation.
    - `language_code` string, nullable — ISO 639-1 language code to enforce on the output. Omit to detect the language from the text.
    - `voice_settings` ElevenFlashV25VoiceSettings — Overrides for the voice's saved settings, applied to one generation.
      - `stability` number, nullable — How consistent the voice stays across generations. Lower values give more expressive, varied speech.
      - `similarity_boost` number, nullable — How closely the output adheres to the original voice.
      - `speed` number, nullable — The speed of the generated speech, where 1.0 is the voice's natural pace.
  - ElevenMultilingualV2Request — Request body for the ElevenLabs Multilingual v2 TTS model.
    - `webhook` union
      - WebhookTargetAll — Deliver the result to all of the workspace's configured flows webhooks.
        - `type` 'all' — Send the result to all of the workspace's configured flows webhooks.
      - WebhookTargetIds — Deliver the result to specific configured flows webhooks.
        - `type` 'ids' — Send the result to the listed flows webhooks.
        - `ids` string[], required — The IDs of the workspace flows webhooks to deliver the result to. Each must be one of the workspace's configured flows webhooks.
    - `text` string, required — The text to synthesize into speech.
    - `voice` string, required — The ID of the voice to speak with.
    - `output_format` 'mp3_22050_32' | 'mp3_24000_48' | 'mp3_44100_32' | 'mp3_44100_64' | 'mp3_44100_96' | 'mp3_44100_128' | 'mp3_44100_192' — The audio encoding of the output, as `codec_sampleRateHz_bitrateKbps`. `mp3_44100_192` requires the Creator tier or above.
    - `pronunciation_dictionary_locators` PronunciationDictionaryVersionLocator[] — Pronunciation dictionaries to apply to the text, in order of precedence. Up to 3.
      - `pronunciation_dictionary_id` string, required — The ID of a pronunciation dictionary created via `POST /v1/pronunciation-dictionaries/add-from-file` or `POST /v1/pronunciation-dictionaries/add-from-rules`.
      - `version_id` string, nullable — The version of the dictionary to use. Omit to use the latest version.
    - `model_id` 'eleven_multilingual_v2', required — The model to use for the generation.
    - `voice_settings` TtsVoiceSettings — Overrides for the voice's saved settings, applied to one generation.
      - `stability` number, nullable — How consistent the voice stays across generations. Lower values give more expressive, varied speech.
      - `similarity_boost` number, nullable — How closely the output adheres to the original voice.
      - `style` number, nullable — How strongly the speaking style is exaggerated.
      - `use_speaker_boost` boolean, nullable — Whether to boost similarity to the original speaker, at some latency cost.
      - `speed` number, nullable — The speed of the generated speech, where 1.0 is the voice's natural pace.
  - ElevenV3Request — Request body for the Eleven v3 TTS model.
    - `webhook` union
      - WebhookTargetAll — Deliver the result to all of the workspace's configured flows webhooks.
        - `type` 'all' — Send the result to all of the workspace's configured flows webhooks.
      - WebhookTargetIds — Deliver the result to specific configured flows webhooks.
        - `type` 'ids' — Send the result to the listed flows webhooks.
        - `ids` string[], required — The IDs of the workspace flows webhooks to deliver the result to. Each must be one of the workspace's configured flows webhooks.
    - `text` string, required — The text to synthesize into speech.
    - `voice` string, required — The ID of the voice to speak with.
    - `output_format` 'mp3_22050_32' | 'mp3_24000_48' | 'mp3_44100_32' | 'mp3_44100_64' | 'mp3_44100_96' | 'mp3_44100_128' | 'mp3_44100_192' — The audio encoding of the output, as `codec_sampleRateHz_bitrateKbps`. `mp3_44100_192` requires the Creator tier or above.
    - `pronunciation_dictionary_locators` PronunciationDictionaryVersionLocator[] — Pronunciation dictionaries to apply to the text, in order of precedence. Up to 3.
      - `pronunciation_dictionary_id` string, required — The ID of a pronunciation dictionary created via `POST /v1/pronunciation-dictionaries/add-from-file` or `POST /v1/pronunciation-dictionaries/add-from-rules`.
      - `version_id` string, nullable — The version of the dictionary to use. Omit to use the latest version.
    - `model_id` 'eleven_v3', required — The model to use for the generation.
    - `language_code` string, nullable — ISO 639-1 language code to enforce on the output. Omit to detect the language from the text.
    - `voice_settings` ElevenV3VoiceSettings — Overrides for the voice's saved settings, applied to one generation.
      - `stability` number, nullable — How consistent the voice stays across generations. Lower values give more expressive, varied speech.

## Response `200`

Successful Response

- MediaGenerationCreateResponse — A newly queued media generation; fetch the GET endpoint for the output.
  - `id` string, required — The unique identifier of the generation. Pass it to the corresponding GET endpoint to retrieve the output.
  - `status` 'pending', required — A newly created generation is always `pending`.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation.md) · [All operations](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elevenlabs/elevenlabs-api-documentation/revisions/acb0175c0525/schema)
