Skip to contentSkip to page list

Docs

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.

On this page

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:

FieldValue
ELEVENLABS_API_KEYYour ElevenLabs API key.
ELEVENLABS_WEBHOOK_SECRETOptional. The secret ElevenLabs signs post-call webhooks with, for Conversational AI usage reporting.
ELEVENLABS_BASE_URLOptional. 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.

The ElevenLabs model provider drawer with ELEVENLABS_API_KEY, ELEVENLABS_WEBHOOK_SECRET, ELEVENLABS_BASE_URL and the routing handle elevenlabs
The ElevenLabs row: ELEVENLABS_API_KEY, the optional webhook secret and base URL, and the routing handle elevenlabs.

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:

example.shBash
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

EndpointServed
POST /v1/audio/speechYes. An OpenAI response_format of pcm is sent as pcm_24000
POST /v1/audio/transcriptionsYes
POST /v1/text-to-speech/{voice_id}Yes, the ElevenLabs native route
POST /v1/speech-to-textYes, the ElevenLabs native route
GET /v1/convai/conversation/get-signed-urlYes, for Conversational AI sessions
POST /v1/chat/completions, POST /v1/embeddingsNo

Documentation