Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How to Use Claude Code for Free in 2026: OpenRouter Free Models, Ollama & Free GPU Credits

Description and use

Run Claude Code for free in 2026 by routing it through OpenRouter free models, locally via Ollama, or using free GPU credits, eliminating Anthropic API costs.

Problem

Using Claude Code with Anthropic’s Claude models normally costs money, limiting developers’ ability to experiment and iterate freely.

Outcome

By routing Claude Code through OpenRouter free models or running it locally with Ollama, developers can use the full coding‑agent experience without incurring Anthropic API costs, enabling free experimentation and small‑scale automation.

Workflow

  • Install Claude Code via the official installer
  • Create an OpenRouter account and obtain an API key
  • Install OpenRouter’s Ori CLI and authenticate with ori login
  • Start Claude Code through OpenRouter with ori claude
  • Select a free model using the openrouter/free router or a specific free model ID
  • (Optional) Install Ollama and pull a coding model such as gpt-oss:20b
  • Configure environment variables ANTHROPIC_AUTH_TOKEN=ollama and ANTHROPIC_BASE_URL=http://localhost:11434
  • Run Claude Code with the local model using claude --model gpt-oss:20b or launch via ollama launch claude

Evidence

OpenRouter’s Free plan lists more than 25 free models and allows up to 50 requests per day for free accounts.

Source

In January 2026, Ollama added Anthropic Messages API compatibility, enabling tools such as Claude Code to use Ollama models.

Source

  • Record date: 2026-09-05T18:15:30.033Z