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

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# ElevenLabs

> Add an ElevenLabs API key under Settings, Model Providers and call speech and transcription through the LangWatch AI Gateway with the OpenAI audio routes or the ElevenLabs SDKs.

## Add the credential

Open **Settings > Model Providers**, click **Add Model Provider** and select **ElevenLabs**. Give the row a name, pick the organization, team or project it belongs to, and fill in:

| Field                       | Value                                                                                                 |
| --------------------------- | ----------------------------------------------------------------------------------------------------- |
| `ELEVENLABS_API_KEY`        | Your ElevenLabs API key.                                                                              |
| `ELEVENLABS_WEBHOOK_SECRET` | Optional. The secret ElevenLabs signs post-call webhooks with, for Conversational AI usage reporting. |
| `ELEVENLABS_BASE_URL`       | Optional. A residency host on `elevenlabs.io`, over HTTPS.                                            |

Save the row. Every virtual key whose scope can see the row can now dispatch to it, unless the key restricts its providers. See [Virtual keys](/docs/ai-gateway/virtual-keys#create-a-virtual-key).

<Frame caption="The ElevenLabs row: ELEVENLABS_API_KEY, the optional webhook secret and base URL, and the routing handle elevenlabs.">
  <img src="https://mintcdn.com/langwatch/6EHh-4eZyYKZhosJ/images/ai-gateway/model-provider-elevenlabs-form.png?fit=max&auto=format&n=6EHh-4eZyYKZhosJ&q=85&s=8c21c365a038c1c37eb9b1acbf6df984" alt="The ElevenLabs model provider drawer with ELEVENLABS_API_KEY, ELEVENLABS_WEBHOOK_SECRET, ELEVENLABS_BASE_URL and the routing handle elevenlabs" width="1440" height="880" data-path="images/ai-gateway/model-provider-elevenlabs-form.png" />
</Frame>

## Model names

Write `elevenlabs/<model_id>`, for example `elevenlabs/eleven_flash_v2_5` or `elevenlabs/eleven_multilingual_v2`. `eleven_multilingual_v2` is the default when a speech request names no model.

## Send a request

With the OpenAI audio routes:

```bash theme={null}
curl https://gateway.langwatch.ai/v1/audio/speech \
  -H "Authorization: Bearer $LANGWATCH_VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "elevenlabs/eleven_flash_v2_5",
    "voice": "<voice_id>",
    "input": "Hello from ACME"
  }'
```

With the ElevenLabs SDKs, set the base URL to `https://gateway.langwatch.ai` and the virtual key as the API key. The SDK sends it in the `Xi-Api-Key` header, which the gateway accepts.

## Endpoints

| Endpoint                                           | Served                                                           |
| -------------------------------------------------- | ---------------------------------------------------------------- |
| `POST /v1/audio/speech`                            | Yes. An OpenAI `response_format` of `pcm` is sent as `pcm_24000` |
| `POST /v1/audio/transcriptions`                    | Yes                                                              |
| `POST /v1/text-to-speech/{voice_id}`               | Yes, the ElevenLabs native route                                 |
| `POST /v1/speech-to-text`                          | Yes, the ElevenLabs native route                                 |
| `GET /v1/convai/conversation/get-signed-url`       | Yes, for Conversational AI sessions                              |
| `POST /v1/chat/completions`, `POST /v1/embeddings` | No                                                               |
