The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
[Feat] add ElevenLabs eleven_v3 and eleven_multilingual_v2 to model cost map (#20522)
Cesar Garcia95f8cbe5cacb
diff --git a/docs/my-website/docs/providers/elevenlabs.md b/docs/my-website/docs/providers/elevenlabs.mdindex 5cf62f51203..b4ed3d3346b 100644--- a/docs/my-website/docs/providers/elevenlabs.md+++ b/docs/my-website/docs/providers/elevenlabs.md@@ -243,6 +243,13 @@ ElevenLabs provides high-quality text-to-speech capabilities through their TTS A| Supported Operations | `/audio/speech` || Link to Provider Doc | [ElevenLabs TTS API ↗](https://elevenlabs.io/docs/api-reference/text-to-speech) |+### Supported Models++| Model | Route | Description |+|-------|-------|-------------|+| Eleven v3 | `elevenlabs/eleven_v3` | Most expressive model. 70+ languages, audio tags support for sound effects and pauses. |+| Eleven Multilingual v2 | `elevenlabs/eleven_multilingual_v2` | Default TTS model. 29 languages, stable and production-ready. |+### Quick Start#### LiteLLM Python SDK@@ -265,6 +272,26 @@ with open("test_output.mp3", "wb") as f:f.write(audio.read())```+#### Using Eleven v3 with Audio Tags++Eleven v3 supports [audio tags](https://elevenlabs.io/docs/overview/capabilities/text-to-speech#audio-tags) for adding sound effects and pauses directly in the text:++```python showLineNumbers title="Eleven v3 with audio tags"+import litellm+import os++os.environ["ELEVENLABS_API_KEY"] = "your-elevenlabs-api-key"++audio = litellm.speech(+ model="elevenlabs/eleven_v3",+ input='Welcome back. <sfx>applause</sfx> Today we have a special guest. <pause duration="1.5s"/> Let me introduce them.',+ voice="alloy",+)++with open("eleven_v3_output.mp3", "wb") as f:+ f.write(audio.read())+```+#### Advanced Usage: Overriding Parameters and ElevenLabs-Specific Features```python showLineNumbers title="Advanced TTS with custom parameters"diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex d352bd86d14..60b1967a1ba 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -10833,6 +10833,32 @@"/v1/audio/transcriptions"]},+ "elevenlabs/eleven_v3": {+ "input_cost_per_character": 0.00018,+ "litellm_provider": "elevenlabs",+ "metadata": {+ "calculation": "$0.18/1000 characters (Scale plan pricing, 1 credit per character)",+ "notes": "ElevenLabs Eleven v3 - most expressive TTS model with 70+ languages and audio tags support"+ },+ "mode": "audio_speech",+ "source": "https://elevenlabs.io/pricing",+ "supported_endpoints": [+ "/v1/audio/speech"+ ]+ },+ "elevenlabs/eleven_multilingual_v2": {+ "input_cost_per_character": 0.00018,+ "litellm_provider": "elevenlabs",+ "metadata": {+ "calculation": "$0.18/1000 characters (Scale plan pricing, 1 credit per character)",+ "notes": "ElevenLabs Eleven Multilingual v2 - default TTS model with 29 languages support"+ },+ "mode": "audio_speech",+ "source": "https://elevenlabs.io/pricing",+ "supported_endpoints": [+ "/v1/audio/speech"+ ]+ },"embed-english-light-v2.0": {"input_cost_per_token": 1e-07,"litellm_provider": "cohere",diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 66c8e55c3ae..b02ae7b587f 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -10810,6 +10810,32 @@"/v1/audio/transcriptions"]},+ "elevenlabs/eleven_v3": {+ "input_cost_per_character": 0.00018,+ "litellm_provider": "elevenlabs",+ "metadata": {+ "calculation": "$0.18/1000 characters (Scale plan pricing, 1 credit per character)",+ "notes": "ElevenLabs Eleven v3 - most expressive TTS model with 70+ languages and audio tags support"+ },+ "mode": "audio_speech",+ "source": "https://elevenlabs.io/pricing",+ "supported_endpoints": [+ "/v1/audio/speech"+ ]+ },+ "elevenlabs/eleven_multilingual_v2": {+ "input_cost_per_character": 0.00018,+ "litellm_provider": "elevenlabs",+ "metadata": {+ "calculation": "$0.18/1000 characters (Scale plan pricing, 1 credit per character)",+ "notes": "ElevenLabs Eleven Multilingual v2 - default TTS model with 29 languages support"+ },+ "mode": "audio_speech",+ "source": "https://elevenlabs.io/pricing",+ "supported_endpoints": [+ "/v1/audio/speech"+ ]+ },"embed-english-light-v2.0": {"input_cost_per_token": 1e-07,"litellm_provider": "cohere",