BYOK setup
Bring your own provider keys for zero markup. Add as many as you want — the smart router can fall through them in order, and per-key user preferences (pin / exclude / ¢-cap) apply.
Adding a key
In the dashboard, go to Providers → [provider] → Add. Keys are encrypted with AES-GCM before they hit D1; the encryption key lives in the worker's secret store, not the database.
Per-provider details
OpenAI
Keys start with sk-…. Get one at platform.openai.com.
Anthropic
Keys start with sk-ant-…. Console at console.anthropic.com.
Google (Gemini)
Use a Generative Language API key from Google AI Studio. EdgeRoute uses the SSE streaming endpoint (streamGenerateContent) so the auto-router and health tracker work uniformly with the OpenAI-compatible providers.
Mistral
Console at console.mistral.ai. EdgeRoute supports mistral-large-latest, mistral-medium-latest, mistral-small-latest.
xAI
Keys start with xai-…. Default model: grok-4.20.
Groq
Get a key at console.groq.com. Llama, Mixtral, and Qwen-Coder are all supported.
Together AI
api.together.xyz. Same OpenAI-compatible shape; cheap Llama / Qwen-Coder hosting.
Cloudflare Workers AI
Two values: an account ID and an API token with the Workers AI scope. The dashboard asks for both; we store them combined as one credential.
Cohere
dashboard.cohere.com. Recent command-r and command-r-plus are supported.
Ollama (self-hosted)
Ollama doesn't really have keys — it has a base URL. Paste the URL of your Ollama instance into the key field, prefixed with url::
url:https://ollama.your-internal.example/apiThe gateway will POST to <that URL>/chat with stream:true. No bearer token is sent.
Azure OpenAI
Azure needs a deployment-prefixed URL plus an API key. Paste them combined:
https://YOUR-RESOURCE.openai.azure.com/openai/deployments/YOUR-DEPLOYMENT|YOUR-KEYWhat you pay
- Tokens: billed by the provider, not by us. We never see your bill.
- Platform fee: free for the first 1,000 requests/month, then $1/1,000 (1¢ per 10 requests over the threshold), debited from your credit balance.