# About AnyRouter

> AnyRouter is an OpenAI- and Anthropic-compatible LLM gateway on Cloudflare. One API key reaches hundreds of models, with automatic failover, free models, bring-your-own-key at $0 markup, and a shared key Pool.

**Web page**: https://anyrouter.dev/about

## Highlights

- **Pool**: Donate a key, get Go free. Share one spare provider key with the Pool. You get the Go plan, and requests the Pool serves cost you $0. [Open the Pool](https://anyrouter.dev/pool)
- **Artifacts**: Publish and share one link. Publish an HTML page, Markdown, a React component or a small folder from your terminal or AI agent. Private by default, with versions. [Browse artifacts](https://anyrouter.dev/artifacts)
- **MCP**: One MCP URL for every tool. AnyRouter's tools and every server you connect behind one URL, in Claude Code, Cursor, Codex, VS Code and Claude Desktop. [See the MCP gateway](https://anyrouter.dev/mcp)
- **CLI**: Run coding agents on the gateway. anyr claude launches your agent on AnyRouter. One key, automatic failover, and no config files left behind. [Install the CLI](https://anyrouter.dev/cli)
- **Unified API**: One API shape for every model. OpenAI Chat Completions, Responses, Embeddings and Anthropic Messages on one base URL. [Read the API guide](https://anyrouter.dev/unify-api/chat-completions)
- **Apps**: Try it without writing code. Small interactive apps built on the AnyRouter API, including typed decisions and structured output. [Open the apps](https://anyrouter.dev/apps)

## Why it helps

- **One URL, every model**: A single OpenAI- and Anthropic-compatible endpoint reaches hundreds of models across providers. Change the model id, not your code.
- **Failover and uptime**: A 401, 429 or 5xx retries on the next upstream for that model, and continuous monitoring keeps the gateway answering when one provider does not.
- **Your keys, pooled**: Pool your own provider keys and paid plans behind one gateway. BYOK never spends platform credit and carries no markup.
- **Transparent prices**: Per-token pricing with one balance and one usage log, plus a curated set of free models on Go.
- **Presets and virtual models**: Swap the model behind an app from your account. Ids such as anyrouter/free and anyrouter/auto pick a model for you.
- **CLI, SDK and MCP**: anyr claude points Claude Code, Codex or Cursor at the gateway and wipes its config on exit. @anyr/sdk and @anyr/ai-sdk-provider reach every model from your own agents, and the built-in MCP server manages keys, credit and the catalog.
- **Private and compatible**: Provider keys are encrypted at rest. Request bodies are logged so you can debug real traffic, and you can turn that off in Privacy settings. Point your client elsewhere any time.

## Plans

- **Free**: A 5-request trial on free and decision models. Paid models run on credit you buy, or on your own keys.
- **Go**: $2/mo, or free when you donate one valid provider key. Every model, free models with no daily limit, and $4 of credit each month.
- **BYOK**: Bring your own provider keys at $0 markup. You pay your provider exactly what it charges, with failover and logging on top.
- Full details: [pricing](https://anyrouter.dev/pricing.md)

## How it works

1. **Point your client at one base URL**. Set an OpenAI SDK base URL to https://anyrouter.dev/api/v1, or an Anthropic SDK base URL to https://anyrouter.dev/api (the Anthropic SDK adds /v1/messages itself). Use an AnyRouter key (sk-ar-v1-...). Nothing else in your code changes.
2. **Name a model**. Models use the provider/model form, for example z-ai/glm-4.7-flash. Virtual ids such as anyrouter/free and anyrouter/auto pick a model for you.
3. **AnyRouter picks an upstream**. The gateway chooses a provider for that model, using your own key, a pooled key, or the platform's, and translates the request into that provider's format.
4. **Failures retry, answers stream back**. If an upstream returns 401, 429, or 5xx, the next upstream gets the request. Your client receives one streamed answer, and the call lands in your usage log.

## AnyRouter or the provider directly

| | Calling providers directly | Through AnyRouter |
|---|---|---|
| Integration | One SDK, one key, and one error format per provider. | One base URL, one key, one error format. |
| Changing models | A new integration when the model is on another provider. | Change the model id. |
| Provider outage or rate limit | Your code has to detect it and retry elsewhere. | The gateway retries on the next upstream. |
| Billing and logs | One invoice and one dashboard per provider. | One balance and one usage log. |
| Your own provider keys | Used directly. | Attached as BYOK at $0 markup, with failover and logging. |
| Best fit | You call one provider and never change models. | You use several models or providers, or run coding agents. |

## FAQ

### What is AnyRouter?

AnyRouter is an OpenAI- and Anthropic-compatible LLM gateway on Cloudflare. One API key reaches hundreds of models, with automatic failover, free models, bring-your-own-key at $0 markup, and a shared key Pool.

### Who is AnyRouter for?

Developers who use more than one model provider, teams that want one bill and one usage log, and people who run coding agents such as Claude Code, Codex, or OpenCode and want to swap models without editing config.

### Which APIs does it speak?

OpenAI Chat Completions, OpenAI Responses, OpenAI Embeddings, and Anthropic Messages. An OpenAI or Anthropic SDK works after you change the base URL and the key.

### Is there a free tier?

Yes. The model id anyrouter/free routes to the best free model available at that moment and deducts no credits on Go and up. The Decisions API is also free on Go. The Free plan gets a 5-request trial on both.

### Can I use my own provider keys?

Yes. Bring-your-own-key routes through the keys you already pay for with a $0 markup, so you pay your provider exactly what it charges. You can also donate a key to the shared Pool.

### What happens when a provider fails?

On a 401, 429, or 5xx from one upstream, AnyRouter retries the request on the next upstream for that model. Your client sees the final answer.

### Does AnyRouter store my prompts?

Request and response bodies are logged by default so you can debug real traffic in Request Logs. Turn off Body logging in Privacy settings to stop storing them. Provider keys are encrypted at rest.

### Does it generate images or video?

No. The catalog covers text generation and embeddings only.

## Links

- [Docs](https://anyrouter.dev/docs)
- [Models](https://anyrouter.dev/models.md)
- [llms.txt](https://anyrouter.dev/llms.txt)
- [X](https://x.com/AnyRouterHQ)
