HomeCoding agents
Coding agents
A coding agent edits files and runs tools. OpenRouter does not replace the agent. It supplies the model and, through MCP, live catalog data.
Updated 2026-09-27
The apps category at openrouter.ai/apps/category/coding lists clients that send code traffic through OpenRouter. Two with first-party cookbooks are Claude Code and OpenCode. Cursor, Codex, and others appear in the same docs section.
- Claude Code: set ANTHROPIC_BASE_URL to https://openrouter.ai/api and put the OpenRouter key in ANTHROPIC_AUTH_TOKEN. Blank ANTHROPIC_API_KEY.
- OpenCode: install the CLI or desktop app and run /connect. It already knows OpenRouter as a provider.
- Any MCP client: add https://mcp.openrouter.ai/mcp so the agent can read live prices and your credit balance.
- OpenClaw: a separate collection of models people use with that agent. Pick the slug there, then the same key.
“Best” depends on whether you need Anthropic’s tool format (Claude Code) or an open client that can point at any slug (OpenCode). The model ranking is on the coding-models page. An agent on a weak slug still fails tests. An expensive slug in a loop still spends the loop.
Questions
What coding agents work with OpenRouter?
Claude Code and OpenCode have OpenRouter cookbooks. The coding apps category lists more clients that send traffic through the API.
Do I pay for the agent and the model?
Open-source clients such as OpenCode have no model fee of their own. You pay OpenRouter for the slug. Claude Code may also follow Anthropic’s product terms. The tokens still hit your OpenRouter balance when the base URL is OpenRouter.
Where is the category?
https://openrouter.ai/apps/category/coding
Related
- Claude Code on OpenRouter
Point Claude Code at https://openrouter.ai/api, put the OpenRouter key in ANTHROPIC_AUTH_TOKEN, and set ANTHROPIC_API_KEY to an empty string.
- OpenCode and OpenRouter
OpenCode is an open-source coding agent. Connect OpenRouter with /connect in the terminal, or the same credentials in the desktop app.
- Coding models
Coding-model choice on OpenRouter is price, context, and tool-call reliability. DeepSeek V4, Qwen3.7 Max, GLM 5.2, and Sonnet 5 are the slugs to price first.
- OpenRouter MCP
The OpenRouter MCP server is https://mcp.openrouter.ai/mcp. It lets a coding agent read models, prices, and your credits after an OAuth login.