> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ElevenLabs Text-to-Speech Flash V2

Convert text into speech using the voice of your choice and return audio.

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="seed" type="integer">
  If specified, the system will try to sample deterministically. Repeated requests with the same seed and parameters should return the same result, but full determinism is not guaranteed.

  Value range: \[0, 4294967295]
</ParamField>

<ParamField body="text" type="string" required={true}>
  The text to convert into speech.
</ParamField>

<ParamField body="stream" type="boolean">
  Whether to enable Stream mode.
</ParamField>

<ParamField body="voice_id" type="string" required={true}>
  The voice ID to use.
</ParamField>

<ParamField body="next_text" type="string">
  Text after the current request text. Used to improve speech continuity when concatenating multiple generations.
</ParamField>

<ParamField body="language_code" type="string">
  Language code (ISO 639-1) used for the model and text normalization. If the model does not support this language code, an error will be returned.
</ParamField>

<ParamField body="output_format" type="string" default="mp3_44100_128">
  The output format of the generated audio. The format is codec\_sample\_rate\_bitrate. A 192 kbps bitrate for MP3 requires a Creator account or higher, and a 44.1 kHz sample rate for PCM requires a Pro account or higher.

  Options: `mp3_22050_32`, `mp3_24000_48`, `mp3_44100_32`, `mp3_44100_64`, `mp3_44100_96`, `mp3_44100_128`, `mp3_44100_192`, `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_32000`, `pcm_44100`, `pcm_48000`, `ulaw_8000`, `alaw_8000`, `opus_48000_32`, `opus_48000_64`, `opus_48000_96`, `opus_48000_128`, `opus_48000_192`
</ParamField>

<ParamField body="previous_text" type="string">
  Text before the current request text. Used to improve speech continuity when concatenating multiple generations.
</ParamField>

<ParamField body="use_pvc_as_ivc" type="boolean" default={false}>
  If true, uses the IVC version of the voice instead of the PVC version. This is a temporary workaround for the higher latency of the PVC version.
</ParamField>

<ParamField body="voice_settings" type="object">
  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="speed" type="number" default={1}>
      Adjusts the speed of the voice. 1.0 is the default speed; values below 1.0 slow down the speech, while values above 1.0 speed it up.
    </ParamField>

    <ParamField body="style" type="number" default={0}>
      Determines the exaggeration level of the voice style. Attempts to amplify the original speaker's style. Setting this to a non-zero value consumes more compute resources and may increase latency.
    </ParamField>

    <ParamField body="stability" type="number" default={0.5}>
      Determines the stability of voice generation and the randomness between each generation. Lower values provide a broader emotional range, while higher values may make the voice sound monotonous.
    </ParamField>

    <ParamField body="similarity_boost" type="number" default={0.75}>
      Determines how closely the AI tries to replicate the original voice.
    </ParamField>

    <ParamField body="use_speaker_boost" type="boolean" default={true}>
      Enhances similarity to the original speaker. Requires a slightly higher compute load and increases latency.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="next_request_ids" type="string[]">
  List of request\_id values for subsequent samples. Used to maintain speech continuity when regenerating samples. Up to 3 request\_id values can be passed.

  Array length: 0 - 3
</ParamField>

<ParamField body="previous_request_ids" type="string[]">
  List of request\_id values for samples generated before the current generation. Can be used to improve speech continuity. Up to 3 request\_id values can be passed.

  Array length: 0 - 3
</ParamField>

<ParamField body="apply_text_normalization" type="string" default="auto">
  Controls text normalization. 'auto' lets the system decide, 'on' always normalizes, and 'off' skips it.

  Options: `auto`, `on`, `off`
</ParamField>

<ParamField body="apply_language_text_normalization" type="boolean" default={false}>
  Controls language-specific text normalization for certain supported languages to achieve more natural pronunciation. Warning: this may significantly increase latency. Currently only Japanese is supported.
</ParamField>

<ParamField body="pronunciation_dictionary_locators" type="object[]">
  List of pronunciation dictionary locators (id, version\_id) to apply to the text. They take effect in order. Each request can have up to 3 locators.

  Array length: 0 - 3

  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="version_id" type="string">
      The ID of the pronunciation dictionary version. If not specified, the latest version is used.
    </ParamField>

    <ParamField body="pronunciation_dictionary_id" type="string" required={true}>
      The ID of the pronunciation dictionary.
    </ParamField>
  </Expandable>
</ParamField>

## Response Information

Generated audio file

Format: `binary`
