Claude Code is the most agentic coding CLI Anthropic ships — but it does not have to talk to Anthropic. Because Claude Code speaks the standard Anthropic Messages API, you can point it at any compatible endpoint with a single environment variable. That means OpenRouter, your local Ollama server, a private LiteLLM proxy, or a self-hosted model behind your own router all work without forking the source.
This guide walks through the three setup paths, which models actually deliver usable tool-use at each tier, what breaks, and when you should stop and switch back to the official API.
...