CallMineAI Docs
Home
  • Introduction
  • Architecture
  • Installation
  • Web installer
  • Configuration
  • Deployment
  • Customer panel
  • Admin panel
  • Agents & Voices
  • Campaigns & Calls
  • Billing & Credits
  • Telephony (Twilio)
  • Voice & AI
  • SIP trunks
  • Messaging
  • REST API
Home
  • Introduction
  • Architecture
  • Installation
  • Web installer
  • Configuration
  • Deployment
  • Customer panel
  • Admin panel
  • Agents & Voices
  • Campaigns & Calls
  • Billing & Credits
  • Telephony (Twilio)
  • Voice & AI
  • SIP trunks
  • Messaging
  • REST API
  • Getting started

    • Introduction
    • Architecture
    • Installation
    • Web installer
    • Configuration
    • Deployment
  • Using CallMineAI

    • Customer Guide
    • Agents & Voices
    • Campaigns & Calls
    • Billing & Credits
  • Administration

    • Admin Guide
    • Roles & permissions
    • Localization
  • Integrations

    • Telephony (Twilio)
    • Voice & AI
    • SIP trunks
    • Messaging
    • REST API
  • Help

    • FAQ & troubleshooting

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

Admin — ElevenLabs keys

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 from ELEVENLABS_MAX_CONCURRENCY, default 30). 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 active or unhealthy.
  • Sync voices — pulls the account's voice library and upserts it into the local voices table (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

KeyPurposeDefault
ELEVENLABS_ENABLEDMaster switch for ElevenLabstrue
ELEVENLABS_API_KEYBootstrap/fallback key (pool keys preferred)—
ELEVENLABS_MAX_CONCURRENCYDefault per-key concurrency cap30
ELEVENLABS_DEFAULT_VOICE_IDFallback voice id—
ELEVENLABS_TTS_MODELText-to-speech modeleleven_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

Admin — engines

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.

KeyPurposeDefault
AI_PROVIDERActive AI provideropenai
AI_OPENAI_ENABLEDEnable the OpenAI providertrue
OPENAI_API_KEYOpenAI API key—
OPENAI_MODELModel used for conversationsgpt-4o-mini
OPENAI_MAX_TOKENSMax tokens per completion4096
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:

ModelLabelCost / min
gpt-4o-miniGPT-4o Mini1¢
gpt-4oGPT-4o15¢

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.
Last Updated: 7/9/26, 8:56 AM
Prev
Telephony (Twilio)
Next
SIP trunks