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

# Text-to-Speech API

> Learn how to make your first Text-to-Speech API call with Dubverse

## Prerequisites

Before you begin, ensure you have:

* Your Dubverse API key (If you haven't obtained one, visit the [API Key page](/api-key))
* A tool for making HTTP requests (e.g., Postman, cURL, or your preferred programming language)

## API Request Details

### HTTP Method

<ParamField query="POST" type="string" required>
  The HTTP method for the TTS API call.
</ParamField>

### Endpoint URL

<ParamField query="https://audio.dubverse.ai/api/tts" type="string" required>
  The endpoint URL for the TTS API.
</ParamField>

### Headers

<ParamField header="X-API-Key" type="string" required>
  Your Dubverse API key.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  application/json
</ParamField>

### Request Body

<ParamField body="text" type="string" required>
  The input text you want to convert to speech.
</ParamField>

<ParamField body="speaker_no" type="number" required>
  The ID of the speaker voice.
</ParamField>

<ParamField body="config" type="object">
  Additional configuration options.

  <Expandable title="config">
    <ParamField body="use_streaming_response" type="boolean">
      Set to `true` for streamed audio, `false` for a complete audio file response.
    </ParamField>

    <ParamField body="sample_rate" type="number" default="22050">
      Audio sample rate in Hz. Accepts values between 8000 and 48000. Only supported by 'neo.one' speakers.
    </ParamField>

    <ParamField body="instructions" type="string">
      Optional instructions to guide voice generation. Only supported for 'Mermish' speakers.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="callback_url" type="string">
  URL to receive the API response if different from the origin.
</ParamField>
