Claude Code CLI runs free via OpenRouter
- A YouTube tutorial from Web Tech Knowledge shows developers routing Anthropic’s Claude Code command-line tool through OpenRouter instead of Anthropic’s own paid endpoint. - OpenRouter’s official guide says Claude Code can be repointed with environment variables, including `ANTHROPIC_BASE_URL` and an OpenRouter auth token, after logout. - The setup turns Claude Code into a front end for other models, not just Claude. (openrouter.ai)
A new YouTube tutorial shows Claude Code running through OpenRouter, letting Anthropic’s coding command-line tool send requests somewhere other than Anthropic’s default API. (youtube.com) (openrouter.ai) The video, published by Web Tech Knowledge and showing about 3,300 views when indexed, walks through installing Claude Code and connecting it to OpenRouter for “free” model access. (youtube.com) OpenRouter’s own documentation confirms the basic method: set `ANTHROPIC_BASE_URL` to ` pass an OpenRouter API key as the auth token, and explicitly blank `ANTHROPIC_API_KEY`. (openrouter.ai) The same guide says users previously logged into Claude Code with Anthropic may need to run `/logout` before the new routing takes effect. It also says the native installer does not read a project `.env` file for this setup. (openrouter.ai) Claude Code is Anthropic’s official terminal tool, and its docs say configuration can live in `~/.claude/settings.json` for user-wide settings or in project and local settings files with different precedence. (code.claude.com) That means the terminal interface and the model behind it are more separable than the branding suggests. The shell commands, file access flow, and prompt loop can stay the same while the backend model changes. (openrouter.ai) (code.claude.com) OpenRouter is also explicitly positioning this as an official integration, though with a limit: its docs say Claude Code is “only guaranteed to work” with Anthropic’s first-party provider and recommends prioritizing Anthropic 1P for maximum compatibility. (openrouter.ai) The tutorial’s “free” angle depends on OpenRouter’s catalog of zero-cost models, not on Anthropic making Claude Code itself free. OpenRouter currently lists a free-model router and free MiniMax variants, including MiniMax M2.5 (free). (openrouter.ai 1) (openrouter.ai 2) (openrouter.ai 3) OpenRouter’s model pages describe MiniMax M2.5 as a productivity model that builds on earlier coding-focused work, while its coding collection ranks models using real usage data updated in April 2026. (openrouter.ai 1) (openrouter.ai 2) The result is less a hack than a reminder that many AI coding tools are becoming shells around interchangeable APIs. Claude Code still looks like Claude Code in the terminal; the model answering behind it no longer has to be Claude. (openrouter.ai) (code.claude.com)