Try Bifrost Enterprise free for 14 days.
Request access

How to Get an ElevenLabs API Key

Create a Mistral account at elevenlabs.io, generate your API key, store it securely, then integrate with Bifrost for virtual keys, budgets, and cost governance. Complete setup in minutes.

Text-to-speechVoice cloningMultilingualREST APIBifrost gateway

ElevenLabs provider summary

Bifrost supports ElevenLabs voice APIs for centralized authentication, budgets, and observability.

PropertyDetails
DescriptionElevenLabs provides realistic text-to-speech, voice cloning, and speech-to-text APIs.
Provider route on Bifrostelevenlabs/<model>
Provider docElevenLabs
API endpoint for providerhttps://api.elevenlabs.io/v1
Supported endpoints/v1/models, /v1/audio/speech, /v1/audio/transcriptions

Official ElevenLabs Resources

ElevenLabs documentation and account links.

Prerequisites

Before you begin, you will need:

ElevenLabs accountEmail addressFree tier or paid plan
i
Free tier: ElevenLabs offers a free tier with monthly character limits for testing voice APIs.

[ QUICK START ]

How Do You Get an ElevenLabs API Key in 5 Steps?

1

Create an ElevenLabs account

Use the ElevenLabs website.

Go to elevenlabs.io and sign up with email or SSO.

2

Open your profile API keys

Click your profile icon, then open Profile + API key (or API Keys in the dashboard).

3

Create and copy your API key

Copy the key immediately.

Generate a new API key, name it, and copy the value. Store it as an environment variable.

Terminal (macOS/Linux)
export ELEVENLABS_API_KEY="..."
!
Treat keys like passwords: Never expose secrets in client-side code or version control.
4

Make your first text-to-speech call

Use the xi-api-key header or Bearer auth per ElevenLabs docs.

ElevenLabs accepts xi-api-key on REST endpoints:

Terminal
$ curl "https://api.elevenlabs.io/v1/text-to-speech/21m00Tcm4TlvDq8ikWAM"   -H "xi-api-key: $ELEVENLABS_API_KEY"   -H "Content-Type: application/json"   -d '{"text": "Hello from ElevenLabs!", "model_id": "eleven_multilingual_v2"}'   --output speech.mp3

[ MODELS ]

Available ElevenLabs Models

ModelAPI IDBest for
Eleven Multilingual v2eleven_multilingual_v2High-quality multilingual TTS.
Eleven Turbo v2.5eleven_turbo_v2_5Low-latency TTS for real-time apps.
Eleven Flash v2.5eleven_flash_v2_5Fastest TTS with good quality.
Eleven v3eleven_v3Latest expressive speech generation.
Scribe v1scribe_v1Speech-to-text transcription.

Models and availability change over time. See the ElevenLabs' models documentation for the latest list and pricing.

[ TROUBLESHOOTING ]

Troubleshooting Common ElevenLabs Issues

ErrorLikely CauseWhat to Do
401 UnauthorizedInvalid or missing API key.Verify your API key is correct. Generate a new key if needed.
400 Bad RequestInvalid request format or unsupported model.Check request format and confirm model ID is valid.
429 Rate LimitedRate limit exceeded for your plan.Upgrade your plan or implement exponential backoff. Use Bifrost for intelligent load distribution.
502/503 Service ErrorTemporary Mistral service unavailability.Retry after a delay. Check Mistral status page. Configure failover with Bifrost.

[ PRODUCTION-READY ]

Use ElevenLabs with Bifrost

Bifrost is a drop-in replacement for ElevenLabs SDKs: keep your client code and change the base URL to your gateway. Bifrost handles cost tracking, virtual keys, budgets, and failover automatically.

Step 1: Start Bifrost and register ElevenLabs

Run the Bifrost gateway and configure your Mistral credentials in the Web UI.

Terminal
$ npx -y @maximhq/bifrost
OUTPUT
 Bifrost started
├─ HTTP server listening on http://localhost:8080
├─ Web UI available at   http://localhost:8080
└─ Configure providers and virtual keys in the dashboard
Add the ElevenLabs integration in the Web UI. For details, read ElevenLabs on Bifrost.

Step 2: Point your OpenAI SDK at Bifrost

Update your OpenAI SDK client to route through the Bifrost gateway.

example.py
import OpenAI

client = OpenAI(
    api_key="sk-bf-your-virtual-key",
    base_url="http://localhost:8080/openai"
)

response = client.audio.speech.create(
    model="eleven_multilingual_v2",
    voice="21m00Tcm4TlvDq8ikWAM",
    input="Hello from Bifrost!",
    response_format="mp3",
)

# response is a streamable HttpxBinaryResponseContent
audio = response.read()
print(len(audio))

# Or save directly to a file
response.stream_to_file("output.mp3")

Virtual keys can be sent as x-bf-vk or Authorization: Bearer sk-bf-* per the Bifrost documentation.

Ready to Route ElevenLabs Through Bifrost?

Bifrost is open source and production-ready. Get started in minutes with cost tracking, virtual keys, and failover built in.

[ BIFROST FEATURES ]

Open Source & Enterprise

Everything you need to run AI in production, from free open source to enterprise-grade features.

01 Governance

SAML support for SSO and Role-based access control and policy enforcement for team collaboration.

02 Adaptive Load Balancing

Automatically optimizes traffic distribution across provider keys and models based on real-time performance metrics.

03 Cluster Mode

High availability deployment with automatic failover and load balancing. Peer-to-peer clustering where every instance is equal.

04 Alerts

Real-time notifications for budget limits, failures, and performance issues on Email, Slack, PagerDuty, Teams, Webhook and more.

05 Log Exports

Export and analyze request logs, traces, and telemetry data from Bifrost with enterprise-grade data export capabilities for compliance, monitoring, and analytics.

06 Audit Logs

Comprehensive logging and audit trails for compliance and debugging.

07 Vault Support

Secure API key management with HashiCorp Vault, AWS Secrets Manager, Google Secret Manager, and Azure Key Vault integration.

08 VPC Deployment

Deploy Bifrost within your private cloud infrastructure with VPC isolation, custom networking, and enhanced security controls.

09 Guardrails

Automatically detect and block unsafe model outputs with real-time policy enforcement and content moderation across all agents.

[ SHIP RELIABLE AI ]

Try Bifrost Enterprise with a 14-day Free Trial

[quick setup]

Drop-in replacement for any AI SDK

Change just one line of code. Works with OpenAI, Anthropic, Vercel AI SDK, LangChain, and more.

1import os
2from anthropic import Anthropic
3
4anthropic = Anthropic(
5 api_key=os.environ.get("ANTHROPIC_API_KEY"),
6 base_url="https://<bifrost_url>/anthropic",
7)
8
9message = anthropic.messages.create(
10 model="claude-3-5-sonnet-20241022",
11 max_tokens=1024,
12 messages=[
13 {"role": "user", "content": "Hello, Claude"}
14 ]
15)
Drop in once, run everywhere.

[ FAQ ]

Frequently Asked Questions

Yes. The free tier includes monthly character credits for testing text-to-speech.

Pass your API key in the xi-api-key header on https://api.elevenlabs.io/v1 requests.

Yes. ElevenLabs supports instant and professional voice cloning, see their voice API documentation.

TTS endpoints typically return MP3 or PCM depending on parameters. Check the API reference for options.

Add ElevenLabs in the Bifrost dashboard and route through http://localhost:8080/elevenlabs.

Usage is billed by characters converted to speech. Monitor usage in the ElevenLabs dashboard or via Bifrost.