The official Claude API bills per token and wants a foreign card. A quicker way to try Claude Code for free: third-party relay stations that mirror the API and give you signup credit. Here's the AgentRouter setup.
Two environment variables:
export ANTHROPIC_BASE_URL="https://agentrouter.org"
export ANTHROPIC_AUTH_TOKEN="sk-****your-key****"
claude
Notes:
- Anthropic endpoint — base URL has no
/v1(Claude Code appends/v1/messagesitself). - Use
ANTHROPIC_AUTH_TOKEN(sent asAuthorization: Bearer), notANTHROPIC_API_KEY. - Can't fetch the model list? Copy the exact model string from the station and set
ANTHROPIC_MODEL. - To make it stick, put it in
~/.claude/settings.jsonunderenv. Don't commit your key.
Several of these stations exist — all free, with signup + daily check-in credit, so you can just register the ones you want. Full list (models, credits, tested dates): AI relay station list
The signup links on that page carry my referral param; strip
?aff=if you'd rather not.
Top comments (0)