AI Coding Agents · Claude Code CLI · ANTHROPIC_BASE_URL & LiteLLM

Claude Code Free API Setup & ANTHROPIC_BASE_URL Generator (2026)

Anthropic has no permanent $0 API tier for claude CLI—but you can still run Claude Code for free using either OpenRouter's native Anthropic-compatible endpoint (zero local proxy) or a LiteLLM fallback router combining Google AI Studio, Groq, NVIDIA NIM, and Mistral Codestral.

1. Two Ways to Run Claude Code at $0 (Zero-Proxy vs. LiteLLM)

Select Free Provider for Claude Code Default & Fast Model ID Verified Limits & Privacy Best Claude Code Role
Direct + LiteLLM
google/gemma-4-31b-it:free
Fast tier: baidu/ernie-5.5-flash-preview:free
20 RPM · 50 RPD (<10 credits purchased) or 1,000 RPD (>=10 credits purchased)
No Card · Varies by upstream (:free logs prompts)
Zero-proxy native ANTHROPIC_BASE_URL support (set ANTHROPIC_API_KEY="")
Via LiteLLM Proxy
gemini-3.8-flash
Fast tier: gemini-3.5-flash-lite
Free tier (No Card · per-project RPM/TPM/RPD shown in AI Studio)
No Card · Free tier may train models
Large 1M context window for multi-file Claude Code sessions via LiteLLM
Via LiteLLM Proxy
openai/gpt-oss-120b
Fast tier: openai/gpt-oss-20b
30 RPM · 1,000 RPD · 8K TPM · 200K TPD (No Card)
No Card · No data training by default
High daily RPD (1,000/day) and ultra-fast responses via LiteLLM
Via LiteLLM Proxy
meta/llama-3.3-70b-instruct
Fast tier: deepseek-ai/deepseek-r1
1,000 Starter Credits · ~40 RPM cap (Phone SMS, No Card)
No Card · No training on API payloads
High 40 RPM burst capacity & zero-training starter credits via LiteLLM
Via LiteLLM Proxy
codestral-latest
Fast tier: mistral-small-latest
1 RPS (~60 RPM) · Experiment Plan (Phone SMS, No Card)
No Card · Trains on Free Experiment tier
Dedicated code editing model (codestral-latest) via LiteLLM
Via LiteLLM Proxy
gpt-oss-120b
Fast tier: gemma-4-31B-it
20 RPM · 20 RPD · 200K TPD (No Card)
No Card · Zero data retention
Zero-data-retention fallback slot in LiteLLM router

2. Interactive Claude Code Config Generator

Uses https://openrouter.ai/api directly — no local proxy required.

Shell Export Commands (.zshrc / terminal)


          

Project-Scoped .claude/settings.local.json


          

3. Need Higher RPM or Zero-Data-Training for Commercial Repos?

Free tiers on OpenRouter :free and Google AI Studio may log prompts for model improvement and cap out at 20–50 RPD/RPM during heavy multi-file agent loops. For commercial codebases, swap in a pay-as-you-go or self-hosted endpoint in the same config:

Disclosure: The Novita AI and RunPod links above are referral/affiliate links that help support FindAITier at no extra cost to you.