Bring Your Own Key (BYOK)
Use your own provider API keys with KairosRoute. Get the benefits of intelligent routing, caching, and unified billing while paying providers directly at their rates with zero markup.
How It Works
Add your provider API keys
Configure one or more provider keys on your KairosRoute API key via the dashboard or API.
Requests use your key automatically
When a request routes to a provider where you have a BYOK key, your key is used instead of the platform key.
No margin charged
BYOK requests have zero markup. You pay the provider directly at their standard rates. No credits are deducted from your KairosRoute balance.
Configure Provider Keys
Set BYOK keys on your API key using the PATCH /api/auth endpoint.
import requests
# Set BYOK keys for OpenAI and Anthropic
response = requests.patch(
"https://api.kairosroute.com/api/auth?keyId=YOUR_KEY_ID",
headers={"Authorization": "Bearer YOUR_SESSION_TOKEN"},
json={
"providerKeys": {
"OpenAI": "sk-your-openai-key",
"Anthropic": "sk-ant-your-anthropic-key"
}
}
)
# Clear all BYOK keys
response = requests.patch(
"https://api.kairosroute.com/api/auth?keyId=YOUR_KEY_ID",
headers={"Authorization": "Bearer YOUR_SESSION_TOKEN"},
json={"providerKeys": null}
)Supported Providers
| Provider | Key Format | Where to Get |
|---|---|---|
| OpenAI | sk-... | platform.openai.com/api-keys |
| Anthropic | sk-ant-... | console.anthropic.com/settings/keys |
| AIza... | aistudio.google.com/app/apikey | |
| Mistral | sk-... | console.mistral.ai/api-keys |
| Groq | gsk_... | console.groq.com/keys |
| DeepSeek | sk-... | platform.deepseek.com/api_keys |
| Fireworks | fw_... | fireworks.ai/account/api-keys |
| Together AI | sk-... | api.together.xyz/settings/api-keys |
Billing with BYOK
| Platform Key | BYOK | |
|---|---|---|
| Provider cost | Paid via KairosRoute credits | Paid directly to provider |
| KairosRoute margin | 5% | 0% (free) |
| Credits deducted | Yes | No |
| Intelligent routing | Yes | Yes |
| Caching | Yes | Yes |
| Failover | Yes | Yes (falls back to platform key) |
| Usage tracking | Yes | Yes |
Mixed Mode
You can provide BYOK keys for some providers and use the platform key for others. The router handles this automatically — if a request routes to a provider where you have a BYOK key, your key is used. Otherwise, the platform key is used and credits are deducted normally.
Example: You have a BYOK key for OpenAI but not Anthropic. When the router picks GPT-4o, your OpenAI key is used (no margin). When it picks Claude, the platform key is used (5% margin, credits deducted).
Identifying BYOK Requests
Every response includes a header telling you whether BYOK was used:
X-KairosRoute-BYOK: true # Your key was used — no credits deducted X-KairosRoute-Provider: OpenAI X-KairosRoute-Model: gpt-4o