K
KairosRoute
Docs/BYOK

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

1

Add your provider API keys

Configure one or more provider keys on your KairosRoute API key via the dashboard or API.

2

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.

3

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

ProviderKey FormatWhere to Get
OpenAIsk-...platform.openai.com/api-keys
Anthropicsk-ant-...console.anthropic.com/settings/keys
GoogleAIza...aistudio.google.com/app/apikey
Mistralsk-...console.mistral.ai/api-keys
Groqgsk_...console.groq.com/keys
DeepSeeksk-...platform.deepseek.com/api_keys
Fireworksfw_...fireworks.ai/account/api-keys
Together AIsk-...api.together.xyz/settings/api-keys

Billing with BYOK

Platform KeyBYOK
Provider costPaid via KairosRoute creditsPaid directly to provider
KairosRoute margin5%0% (free)
Credits deductedYesNo
Intelligent routingYesYes
CachingYesYes
FailoverYesYes (falls back to platform key)
Usage trackingYesYes

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

Start using your own keys

Configure BYOK in your dashboard or via the API.

Go to Dashboard