> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://space.respeecher.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://space.respeecher.com/docs/_mcp/server.

# VAPI Integration

There is a ready-made TTS endpoint for use with VAPI
[custom TTS feature](https://docs.vapi.ai/customization/custom-voices/custom-tts).

#### Add your Respeecher API key to VAPI

Go to [https://dashboard.vapi.ai/settings/integrations/custom-credential](https://dashboard.vapi.ai/settings/integrations/custom-credential)
and create a new custom credential with the following values:

* Authentication Type: ***Bearer Token***
* Credential Name: Arbitrary, for example *Respeecher API*
* Token: ***\<Your Respeecher API Key>***
  ([create one here](https://space.respeecher.com/api-keys))
* Header Name: ***X-Api-Key***
* Include Bearer Prefix: ***No***

#### Prepare a JSON request body

Create a text file `vapi-custom-tts.json` with the following content,
substituting `<CREDENTIAL_ID>` with the ID
(*not* the name, an ID is displayed after creation)
of the custom credential from the previous step:

```json
{
  "voice": {
    "provider": "custom-voice",
    "server": {
      "url": "https://api.respeecher.com/v1/public/tts/en-rt/tts/vapi",
      "credentialId": "<CREDENTIAL_ID>",
      "timeoutSeconds": 30,
      "headers": {
        "X-Voice-JSON": "{\"id\": \"vikram\"}"
      }
    }
  }
}
```

#### Make a request to VAPI

Run the following command, substituting `<ASSISTANT_ID>` with the ID of your assistant
and `<VAPI_API_KEY>` with your private VAPI API key from [https://dashboard.vapi.ai/org/api-keys](https://dashboard.vapi.ai/org/api-keys) (*not* the Respeecher API key):

```bash
curl -X PATCH https://api.vapi.ai/assistant/<ASSISTANT_ID> \
     -H "Authorization: Bearer <VAPI_API_KEY>" \
     -H "Content-Type: application/json" \
     -d "$(cat vapi-custom-tts.json)"
```

#### Test and customize

At this point your VAPI assistant should have a low-latency Respeecher TTS voice.
If the integration works, you can repeat steps 2 and 3 with another model
(for example, substituting `en-rt` with `ua-rt`, see
[Models & Languages](../models-and-languages) for more details)
or another voice
(the value of `X-Voice-JSON` is a JSON string that describes an object
of the [same format](../api/tts/web-socket#send.generate.voice)
that is used in the other TTS endpoints).

> **Warning**
>
> The graphical VAPI assistant builder may display the custom
> voice configuration incorrectly. It does not impact the actual
> functionality of the assistant—calls and demo pages should still work.
> You can temporarily revert to one of the VAPI built-in voices
> to use the graphical builder
> and then rerun the second and third steps to switch back to Respeecher TTS.

> **Warning**
>
> The assistant's `firstMessageMode` value of `assistant-speaks-first`
> may work incorrectly with custom TTS. Try
> `assistant-speaks-first-with-model-generated-message`
> or `assistant-waits-for-user` in that case.