Bring your own keys, $0 markup
Attach OpenAI, Anthropic, Google, Groq, NVIDIA, and more. Requests bill the provider. AnyRouter does not take a per-token cut.
Set it up
curl · anyrouter/byok (your keys only)
$ curl https://anyrouter.dev/api/v1/chat/completions \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anyrouter/byok",
"messages": [{ "role": "user", "content": "Say hello in one sentence." }]
}'- 1.Open /byok and add each provider key.
- 2.Call AnyRouter with your sk-ar key. Matching models go out on your BYOK key.
- 3.Use anyrouter/byok to route across every key you added and never spend credits. A named model tries your keys first, then credits.
- 4.Optionally donate idle quota to the shared pool for credits.
Why use this
You already pay providers. A second gateway invoice is waste if all you needed was one URL, logs, and failover across the keys you have.
Other ways to set it up
curl · anyrouter/auto
curl https://anyrouter.dev/api/v1/chat/completions \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anyrouter/auto",
"messages": [{ "role": "user", "content": "Say hello in one sentence." }]
}'Endpoints and key
- OpenAI-compatible
- https://anyrouter.dev/api/v1
- Anthropic-compatible
- https://anyrouter.dev/api
- Key
- ANYROUTER_API_KEY (sk-ar-…)
Using your own provider keys? Add each one once, then call anyrouter/byok. Bring your keys →