Voice & AI
Every AI agent is the combination of a voice (how it sounds) and an LLM brain (what it says). The voice is synthesized by ElevenLabs; the conversation is driven by an LLM provider, OpenAI by default. This page covers the ElevenLabs key pool, the LLM brain, and how their costs combine.
ElevenLabs voices

The ElevenLabs key pool — the platform load-balances calls across keys.
API keys are managed in the admin panel at /admin/elevenlabs-keys — the env value is only a bootstrap fallback. Add one or more keys and the platform load-balances across them.
The load-balanced key pool
App\Services\Voice\ElevenLabsKeyPool treats all active keys as one shared pool:
- Per-key concurrency cap — each key has a
max_concurrency(seeded fromELEVENLABS_MAX_CONCURRENCY, default30). The pool's total capacity is the sum across active keys, and it is the platform-wide concurrency throttle for the dialer. - Least-loaded routing —
acquire()atomically reserves a slot on the least-loaded healthy key and increments its load; when every key is at its cap the pool returns nothing and the dialer requeues. - Health check — verifies each key against the ElevenLabs subscription endpoint and marks it
activeorunhealthy. - Sync voices — pulls the account's voice library and upserts it into the local
voicestable (keyed by external voice id), then retires (deactivates) any voice the account no longer returns, so the library only ever shows real, playable voices.
Both health check and sync voices are one-click actions on the admin ElevenLabs screen.
Env keys
| Key | Purpose | Default |
|---|---|---|
ELEVENLABS_ENABLED | Master switch for ElevenLabs | true |
ELEVENLABS_API_KEY | Bootstrap/fallback key (pool keys preferred) | — |
ELEVENLABS_MAX_CONCURRENCY | Default per-key concurrency cap | 30 |
ELEVENLABS_DEFAULT_VOICE_ID | Fallback voice id | — |
ELEVENLABS_TTS_MODEL | Text-to-speech model | eleven_turbo_v2_5 |
ELEVENLABS_ENABLED=true
ELEVENLABS_API_KEY=
ELEVENLABS_MAX_CONCURRENCY=30
ELEVENLABS_DEFAULT_VOICE_ID=
ELEVENLABS_TTS_MODEL=eleven_turbo_v2_5
Tips
Keys live in the database (encrypted) and are managed in admin. Set ELEVENLABS_API_KEY in .env only to bootstrap the first sync before any pool key exists — the API key is never exposed back in the UI.
The LLM brain

Calling engines — the LLM/voice providers that power agent conversations.
The conversation itself is generated by an LLM provider resolved through the AIProviderRegistry. OpenAI is the default provider; gpt-4o-mini is the default model.
| Key | Purpose | Default |
|---|---|---|
AI_PROVIDER | Active AI provider | openai |
AI_OPENAI_ENABLED | Enable the OpenAI provider | true |
OPENAI_API_KEY | OpenAI API key | — |
OPENAI_MODEL | Model used for conversations | gpt-4o-mini |
OPENAI_MAX_TOKENS | Max tokens per completion | 4096 |
AI_PROVIDER=openai
AI_OPENAI_ENABLED=true
OPENAI_API_KEY=sk-xxxxxxxx
OPENAI_MODEL=gpt-4o-mini
OPENAI_MAX_TOKENS=4096
Conversation models & their cost
The models agents can pick from — and their approximate per-minute credit cost — are defined in config/calling.php under llm_models:
| Model | Label | Cost / min |
|---|---|---|
gpt-4o-mini | GPT-4o Mini | 1¢ |
gpt-4o | GPT-4o | 15¢ |
The registry powers two services:
AgentConversationService— builds the system prompt (agent instructions + tone + goal + knowledge base + contact details) and generates each turn of the live call.CallAnalysisService— turns the finished transcript into a summary, sentiment and lead qualification. When no LLM provider is configured it falls back to a heuristic, and if a recording is present it can transcribe via Whisper as a fallback.
Whisper transcription
Whisper is an optional fallback used to transcribe call recordings when a live transcript is missing. It uses the same OpenAI key.
How costs combine
Each agent stores a cost per minute computed on save as voice cost + LLM cost:
agent cost/min = CALL_VOICE_COST_CENTS + llm_models[model].cost_cents_per_min
For example, a gpt-4o-mini agent at the default 10¢/min voice cost is ≈ 11¢/min; the same agent on gpt-4o is ≈ 25¢/min. Customers pick a voice and an LLM per agent, and calls are billed by started minute against the credit ledger — see Billing & Credits.
See also
- Agents & Voices — building agents in the customer workspace.
- Telephony — the Twilio layer the voice runs on.
- Configuration — full env reference.