BYOK: Bring Your Own OpenAI Key
BYOK is a per-number billing mode on Pro. Paste your own OpenAI API key on a number, and AgentCall drops the AI voice rate from $0.40/min to $0.10/min. OpenAI bills you directly for the AI conversation. Persistent caller memory, transcripts, post-call webhooks, and every other AgentCall feature work identically on Managed and BYOK numbers.
Two billing modes, one product
Managed
DefaultAgentCall handles the AI key behind the scenes. One bill. No OpenAI account required. Best for fresh signups and most production receptionists.
BYOK
ProYou bring your own OpenAI API key. AgentCall takes a thin platform fee, OpenAI bills you for the conversation. Best for high-volume callers and teams with OpenAI credits already in hand.
Persistent caller memory, transcripts, post-call email summaries, recording, webhooks, and the dashboard work identically on both modes. The only differences are the per-minute platform rate and which AI account is billed for the conversation. See the full pricing page.
How BYOK works
- 1A call comes in (or goes out) on a BYOK number. AgentCall picks up the call on its phone network, exactly like the Managed flow.
- 2AgentCall decrypts your stored OpenAI key just-in-time for that call and opens the Realtime voice session with your key. The encrypted key never leaves AgentCall infra; the decrypted value lives only in the per-call session.
- 3The conversation runs. You see the live AI usage in your own OpenAI dashboard. AgentCall meters call minutes and bills you at $0.10/min on your next Pro invoice.
- 4After the call ends, the transcript, post-call email summary, Memory extraction, contact and brief updates, and any subscribed webhooks fire exactly as they do on Managed. Memory is on for both modes; nothing about the post-call surface changes.
Setup
Three steps from a fresh AgentCall Pro account to a BYOK-enabled number. The dashboard does the same thing under the hood as the curl calls shown below.
Get an OpenAI API key
Sign in to platform.openai.com/api-keys and create a new project API key. Copy it (starts with sk- or sk-proj-). Make sure the OpenAI workspace has a payment method on file and at least a few dollars of credit.
Allow gpt-realtime in the OpenAI project
In the OpenAI dashboard, open the project the key belongs to, click Limits, and confirm gpt-realtime is in the project's “Allowed models” list. If you haven't touched that setting it's usually wide open by default. If the test in step 3 returns model_not_found, this is the fix. Verify with:
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer sk-proj-..." \
| grep realtimePaste the key into AgentCall
Open the Numbers page, click the number you want to switch, and paste the key into the BYOK field. Hit Test to open a live validation session against the Realtime API. If the test passes, hit Save and the number flips to BYOK immediately. Prefer the API? Use the calls below.
API reference
Replace ac_live_xxxxxxxxxxxxx with your AgentCall API key, num_xxxxxxxxxxxx with the target number ID (find it in the dashboard or via GET /v1/numbers), and sk-proj-... with your OpenAI key.
Test a key without saving (recommended first call)
curl -X POST https://api.agentcall.co/v1/numbers/num_xxxxxxxxxxxx/byok/test \
-H "Authorization: Bearer ac_live_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"apiKey": "sk-proj-..."}'
# 200 OK
# { "ok": true, "model": "gpt-realtime" }
#
# 422 Unprocessable Entity (key rejected by OpenAI)
# { "error": { "code": "byok_key_invalid", "reason": "model_not_found",
# "message": "Key cannot access gpt-realtime in this project." } }Save the key and flip the number to BYOK
curl -X POST https://api.agentcall.co/v1/numbers/num_xxxxxxxxxxxx/byok/key \
-H "Authorization: Bearer ac_live_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"apiKey": "sk-proj-..."}'
# 200 OK
# {
# "ok": true,
# "numberId": "num_xxxxxxxxxxxx",
# "voiceMode": "byok",
# "keyPreview": "sk-proj-...xy12",
# "configuredAt": "2026-05-18T17:14:08.000Z"
# }AgentCall re-runs the validation test before saving. If your key cannot open a Realtime session, the save is refused and the number stays on its current mode. The key is encrypted at rest with AES-256-GCM and never returned in API responses; only the redacted preview is shown.
Switch back to Managed
curl -X DELETE https://api.agentcall.co/v1/numbers/num_xxxxxxxxxxxx/byok/key \
-H "Authorization: Bearer ac_live_xxxxxxxxxxxxx"
# 200 OK
# { "ok": true, "numberId": "num_xxxxxxxxxxxx", "voiceMode": "managed" }The encrypted key is wiped from the number record in the same request. The number resumes billing at $0.40/min on Managed. Everything else (system prompt, voice, recording flag, Memory, post-call email, context webhook) stays exactly as it was.
What BYOK does not support yet
BYOK v1 ships with one provider on purpose. Bring a real OpenAI project API key. Everything below is explicitly out of scope.
- OpenAI keys only. No Anthropic, Gemini, Grok, Cohere, Mistral, or self-hosted provider keys in v1. AgentCall's voice runtime was built on the OpenAI Realtime API. Adding a second Realtime provider is real engineering work: each has a different WebSocket protocol, audio format support, and feature shape. xAI Grok lacks caller-side transcription events (would break Memory unless we add a separate STT step). Google Gemini Live has transcription but doesn't natively support the g711_ulaw audio format phone carriers use, which forces real-time resampling that degrades call quality. AssemblyAI and Deepgram are composed-pipeline architectures (STT plus LLM plus TTS), a different integration shape than the single-shot Realtime API we built on. Anthropic doesn't ship a Realtime API. We'll add another provider when more customers ask for the same alternative, or when OpenAI Realtime pricing changes the cost calculus materially.
- No OAuth subscriptions. SuperGrok, ChatGPT Plus, Claude Pro, Gemini Advanced, and similar consumer subscriptions are not API keys and do not work. You need a project-scoped key from platform.openai.com/api-keys billed against an OpenAI workspace.
- Pro only. Free accounts cannot enable BYOK because the BYOK fields are managed under Pro billing.
- Per-number, not per-account. If you have ten numbers and want all ten on BYOK, you currently set the key on each (one call per number). A bulk-apply UI is on the roadmap.
Memory on BYOK
Persistent caller memory works identically on every billing mode and every plan. There is no carve-out for BYOK. The same extractor, the same Call Reports, the same source-backed quotes, the same one-paragraph brief loaded on the next inbound call.
Memory is a foundational AgentCall capability, not a Pro tier upsell. Free, Managed Pro, and BYOK Pro all ship with it on by default. Full details and the customer-controlled on/off toggle live at /docs/memory.
Security
Encrypted at rest
Your OpenAI key is encrypted with AES-256-GCM before it touches the database. AgentCall stores the ciphertext plus a short preview (last 4 characters) so you can recognize the key in the dashboard.
Never returned in responses
No AgentCall API endpoint will hand the decrypted key back to you. The dashboard, REST API, SDK, and MCP server all return only the redacted preview. Rotate by saving a new key; we never show the old one.
Tested before saved
POST /byok/key opens a real Realtime session against your key before persisting it. Invalid, expired, or insufficiently scoped keys are rejected with a structured 422 instead of being silently saved.
Keep reading
Cut your AI voice rate to $0.10/min
Sign up, upgrade to Pro, paste an OpenAI key on any number, and the next call bills at the BYOK rate. Memory and every other AgentCall feature unchanged.
Get Started