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 your provider credentials to theDedalus constructor alongside your normal API key:
Only
providerKey is strictly required. If you omit provider, it is inferred from the model name. If you omit providerModel, the model from the request body is used.
Provider examples
Streaming
Switching providers at runtime
UsewithOptions() to create a new client with different BYOK credentials. Both clients are independent — the original is not mutated.
Per-request overrides
Override BYOK headers for a single request without changing the client:DedalusRunner with BYOK
DedalusRunner inherits BYOK from the client you pass in — no extra configuration needed.
Its core job is to run multi-step loops that can mix and chain tool calls across local tooling plus remote and local MCP servers in one run.
Basic runner
Runner with local tools (Zod)
Runner with MCP servers
Runner with streaming
Switching providers between runner calls
Partial BYOK
You don’t need to set all three parameters. If you only provideproviderKey, the provider is inferred from the model name and the model from the request body.
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.
