When to use BYOK
- You have negotiated pricing or credits with a provider.
- You want to use a model tier or region not available on our shared keys.
- Your compliance policy requires that API keys stay under your control.
Quick start
Pass three headers (or SDK options) alongside your normal Dedalus API key:
Only
X-Provider-Key is strictly required. If you omit X-Provider, it is inferred from the model name. If you omit X-Provider-Model, the model from the request body is used.
Examples
curl
Python SDK
TypeScript SDK
Environment variables
You can also set BYOK options via environment variables instead of passing them in code:Per-request overrides
The SDK options set defaults for every request. You can also override per-request by setting the headers directly:Supported providers
Any provider in our model list works with BYOK:OpenAI
openai
Anthropic
anthropic
google
xAI
xai
Mistral
mistral
DeepSeek
deepseek
Groq
groq
Cohere
cohere
Perplexity
perplexity
Cerebras
cerebras
Together AI
together_ai
Fireworks AI
fireworks_ai
Moonshot
moonshot
How it works
Your request still goes through Dedalus. We handle routing, format normalization, streaming, and tool calling. The only difference is which API key is used for the upstream LLM call.Error handling
The error response always includes the upstream provider’s error message so you can debug directly.
