AnyRouter
This skill is a map. Fetch the relevant page and cite its URL before answering non-trivial questions. Never rely on remembered model ids, scopes, or headers.
- Docs index:
https://anyrouter.dev/docs.md. Append.mdto any docs URL for markdown.https://anyrouter.dev/llms-full.txtis everything in one file. - Guides live under
guides/(quickstart, claude-code, migrate-from-openai, migrate-from-anthropic, migrate-from-openrouter, provider-routing) andfeatures/(app-attribution, byok). - Model ids: MCP
list_modelstool orhttps://anyrouter.dev/models. Never invent one.
Contract:
| Setting | Value |
| --------------------- | ------------------------------------------------------------- |
| Base URL | https://anyrouter.dev/api/v1 |
| Anthropic-native base | https://anyrouter.dev/api (for /messages) |
| API key env var | ANYROUTER_API_KEY (keys start with sk-ar-) |
| Model id | provider/model |
| MCP | https://anyrouter.dev/api/v1/mcp, registered by this plugin |
- In an existing project, change the client's base URL, key, and model id rather than adding a client. Read the key and
ANYROUTER_MODELfrom env, never inline. - Claude Code: set
ANTHROPIC_BASE_URL="https://anyrouter.dev/api"andANTHROPIC_AUTH_TOKENto the key. - Send
X-AnyRouter-Title,X-AnyRouter-Source, andX-AnyRouter-Versionso analytics work. Keepallow_fallbacks: trueunless an eval needs a fixed upstream. - Done means calls hit the base URL, streaming still streams, and one short
/chat/completionsrequest succeeds. For migrations run/anyrouter:migrate. - The MCP server has no chat tool. Use the chat endpoint for inference.