How to Use Claude Code for Free in 2026: OpenRouter Free Models, Ollama & Free GPU Credits
Описание и применение
Используйте Claude Code бесплатно в 2026 году, подключив его к бесплатным моделям OpenRouter, локальным моделям Ollama или бесплатным GPU‑кредитам, чтобы избежать расходов на API Anthropic.
Задача
Using Claude Code with Anthropic’s Claude models normally costs money, limiting developers’ ability to experiment and iterate freely.
Результат
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.
Рабочий процесс
- 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/freerouter 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=ollamaandANTHROPIC_BASE_URL=http://localhost:11434 - Run Claude Code with the local model using
claude --model gpt-oss:20bor launch viaollama launch claude
Доказательства
OpenRouter’s Free plan lists more than 25 free models and allows up to 50 requests per day for free accounts.
In January 2026, Ollama added Anthropic Messages API compatibility, enabling tools such as Claude Code to use Ollama models.
- Дата записи: 2026-09-05T18:15:30.033Z