Skip to main content

ElevenLabs

ElevenLabs provides high-quality AI voice technology, including speech-to-text capabilities through their transcription API.

PropertyDetails
DescriptionElevenLabs offers advanced AI voice technology with speech-to-text transcription capabilities that support multiple languages and speaker diarization.
Provider Route on LiteLLMelevenlabs/
Provider DocElevenLabs API โ†—
Supported Endpoints/audio/transcriptions

Quick Startโ€‹

LiteLLM Python SDKโ€‹

Basic audio transcription with ElevenLabs
import litellm

# Transcribe audio file
with open("audio.mp3", "rb") as audio_file:
response = litellm.transcription(
model="elevenlabs/scribe_v1",
file=audio_file,
api_key="your-elevenlabs-api-key" # or set ELEVENLABS_API_KEY env var
)

print(response.text)

LiteLLM Proxyโ€‹

1. Configure your proxyโ€‹

ElevenLabs configuration in config.yaml
model_list:
- model_name: elevenlabs-transcription
litellm_params:
model: elevenlabs/scribe_v1
api_key: os.environ/ELEVENLABS_API_KEY

general_settings:
master_key: your-master-key

2. Start the proxyโ€‹

Start LiteLLM proxy server
litellm --config config.yaml

# Proxy will be available at http://localhost:4000

3. Make transcription requestsโ€‹

Audio transcription with curl
curl http://localhost:4000/v1/audio/transcriptions \
-H "Authorization: Bearer $LITELLM_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F file="@audio.mp3" \
-F model="elevenlabs-transcription" \
-F language="en" \
-F temperature="0.3"

Response Formatโ€‹

ElevenLabs returns transcription responses in OpenAI-compatible format:

Example transcription response
{
"text": "Hello, this is a sample transcription with multiple speakers.",
"task": "transcribe",
"language": "en",
"words": [
{
"word": "Hello",
"start": 0.0,
"end": 0.5
},
{
"word": "this",
"start": 0.5,
"end": 0.8
}
]
}

Common Issuesโ€‹

  1. Invalid API Key: Ensure ELEVENLABS_API_KEY is set correctly