# 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.

Attach your keys, no per-token cut

**Slug**: `byok`  
**URL**: https://anyrouter.dev/use-cases/byok  
**Markdown**: https://anyrouter.dev/use-cases/byok.md  
**Short link**: https://anyrouter.dev/u/byok  

## 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.

## Set it up

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.

## Code

### curl · anyrouter/byok (your keys only)

```bash
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." }]
  }'
```

### curl · anyrouter/auto

```bash
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." }]
  }'
```

## Related

- [free-tier-keys](https://anyrouter.dev/use-cases/free-tier-keys)
- [zdr-no-training](https://anyrouter.dev/use-cases/zdr-no-training)
- [donate-keys](https://anyrouter.dev/use-cases/donate-keys)
