Guides
How to route every model through one OpenAI-compatible endpoint — setup, coding agents, MCP, free models, and BYOK.
20 posts
Claude Code on anyrouter.dev
Claude Code on anyrouter.dev. setup.sh then anyr claude. ANTHROPIC_BASE_URL=https://anyrouter.dev/api. Free has no monthly credits; Go is $2/mo ($2.63 charged) → $4.
September 1, 2026
Use OpenCode with AnyRouter — CLI launcher or opencode.json
Point the OpenCode coding agent at AnyRouter in one command, or add a custom Chat Completions provider in opencode.json. One sk-ar- key reaches every catalog model, with unified billing and request logs.
August 19, 2026
Run Claude Code on AnyRouter — wrapper script or CLI
Route Claude Code through AnyRouter in two ways: a wrapper that installs itself and maps Opus, Sonnet, and Haiku to one catalog model (override with --model), or the anyr CLI launcher. One key, unified billing, audit logs.
August 5, 2026Sign in with AnyRouter: let users bring their own LLM account
If your app needs an LLM API to run, you have two bad options: ship your own keys and eat every user's inference bill, or make each user paste in a raw provider key. "Sign in with AnyRouter" is the third option — users sign in with their AnyRouter account, and their own balance powers the inference. You get a temporary, inference-only key per user and never handle model billing.
July 19, 2026Run the Claude Agent SDK on any model
The Claude Agent SDK reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY, the same two variables Claude Code uses. Point them at AnyRouter and every catalog model is available to query() behind the Anthropic /messages dialect — in TypeScript or Python.
July 19, 2026Use AnyRouter with the Vercel AI SDK
@anyr/ai-sdk-provider wraps the AnyRouter gateway as a standard Vercel AI SDK provider. Call createAnyRouter(), pass a provider/model id, and generateText, streamText, and generateObject work unchanged — switching models is a one-string edit.
July 19, 2026
Get a free NVIDIA API key and route it through one URL
NVIDIA hands out a free API key with credits and no card required. Attach it to AnyRouter as BYOK and every NVIDIA-hosted model runs through one OpenAI-compatible endpoint — at $0 markup. Here's the five-minute setup.
July 19, 2026
Set up a Hermes agent with AnyRouter
Run Nous Research's Hermes 3 405B as an agent in about three minutes: grab a free Hugging Face token, attach it as BYOK, mint an AnyRouter key, and point any OpenAI-compatible client at one URL. No markup, and donating idle quota earns 8% back.
July 18, 2026
Point Claude Code at a custom base URL
Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY, so pointing it at AnyRouter takes two environment variables — no plugin, no fork. You get every model in the catalog behind the same key, automatic failover when a provider is rate-limited, and one audit log shared with Codex, Cursor, and every other agent you run.
July 12, 2026
Use the OpenAI SDK with any model
The official openai package for Python and TypeScript doesn't have to mean OpenAI models. Override base_url and api_key, keep every other call the same, and address 170+ models across 28+ providers as provider/model strings — including OpenAI's own.
July 12, 2026
Cheapest LLM API: how to actually shop for cost per token
The cheapest LLM API isn't the one with the lowest sticker price — it's the one with no markup added on top of it, a free tier that covers real usage, and a path to route on provider keys you already pay for. Here's how to actually compare cost instead of a headline number.
July 12, 2026
Free LLM API access for students and side projects
You don't need a company card to build with real models. Between a no-spend free tier, a $2/mo plan if you outgrow it, and routing on free-tier keys you may already have from providers like Google AI Studio, there's a durable way to stay at $0 while a class project or side hustle is still finding its shape.
July 12, 2026
MCP servers for AI agents: what they are and how to connect one
An MCP server lets an AI agent call a workspace's tools — keys, credits, models, status — over one standard interface instead of custom glue code per service. Here's what MCP is and how to connect AnyRouter's managed MCP server to Claude Desktop, Claude Code, Cursor, or your own agent.
July 12, 2026
One API for every LLM
One OpenAI-compatible endpoint reaches every model in the catalog — 170+ models addressed as provider/model, with automatic failover across upstreams, routing presets, and streaming. Point your existing client at AnyRouter and change a model with a string, not a rewrite.
July 12, 2026
BYOK: bring your own keys to every provider
Attach the OpenAI, Anthropic, Google, and 60+ other provider keys you already pay for, route them through one OpenAI-compatible URL at $0 markup, cap spend per key, and — if you donate idle quota to the shared pool — earn up to 8% back and unlock Go for free while a donated key stays active.
July 12, 2026
Run coding agents through one gateway
Point Claude Code, Codex, OpenCode, Cursor, or any OpenAI-compatible tool at AnyRouter and get one key for every model, unified billing, per-request audit logs, and app attribution. Two environment variables — or one npx command with the anyr CLI launcher.
July 12, 2026
An MCP gateway with managed server access
AnyRouter runs a Model Context Protocol server that exposes your workspace — models, keys, presets, credits, and status — as JSON-RPC tools, with OAuth 2.1 auth and a dashboard MCP Gateway for managed access. One endpoint any MCP client can connect to.
July 12, 2026
A unified AI API: one endpoint, every provider dialect
OpenAI ships /chat/completions, Anthropic ships /messages, OpenAI's newer surface is /responses. A unified AI API speaks all of them at one URL, so the client library you already use keeps working — you swap the base URL, not the code.
July 12, 2026
The top website for free LLM models — and how they're actually free
AnyRouter serves a real free LLM API across 170+ catalog models. Here's what people actually route to for free, and the three honest mechanisms that make it free: the anyrouter/free daily tier, the donated shared pool, and self-hosted on-device models.
July 12, 2026
Free models, just $2 a month
AnyRouter's Go plan is $2/mo: a $4 monthly credit plus free-model access. Or go free three ways — donate a provider key and Go costs nothing, use the anyrouter/free daily tier, or run models on your own device via local relay.
July 12, 2026