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

# Generate TTS

> Generate an AI Text to Speech message.

### Header

<ParamField header="Authorization" type="string" placeholder="ttsm_12345-abcdef" required>
  Add your API token here. You can find it by reading the [/authentication](/authentication) page.
</ParamField>

### Body

<ParamField body="voice_id" type="string" placeholder="9aad4a1b-f04e-43a1-8ff5-4830115a10a8" required>
  The ID of the voice to use. Use the [/voices](/endpoint/get-voices) endpoint to get a list of all available voices.
</ParamField>

<ParamField body="message" type="string" placeholder="I like eating pie" required>
  The message to generate. Limited to the first 500 characters.
</ParamField>

<ParamField body="return_usage" type="boolean" placeholder="false">
  Set to `true` if you would like the current character usage to be returned along with the generated TTS.
</ParamField>

### Response

<ResponseField name="url" type="string">
  The URL to the generated audio file. The file will be **deleted** after 24 hours.
</ResponseField>

<ResponseField name="status" type="string">
  The status of the TTS generation. Learn more about different status codes [here](/status-codes).
</ResponseField>

<ResponseField name="characterUsage" type="number">
  The current character count of the user.
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl -X POST https://api.console.tts.monster/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: ttsm_12345-abcdef" \
  -d '{
        "voice_id": "9aad4a1b-f04e-43a1-8ff5-4830115a10a8",
        "message": "I like eating pie"
      }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "status": 200,
    "url": "https://storage.tts.monster/tts/12345678981.wav"
  }
  ```
</ResponseExample>
