How do I use Claude Code with an API key?
Claude Code takes an API key in place of a subscription login: ANTHROPIC_API_KEY for a key from the Claude Console, or ANTHROPIC_BASE_URL with ANTHROPIC_AUTH_TOKEN (or an apiKeyHelper script) for another endpoint. MartLLM is such an endpoint: on November 20, 2026, one MartLLM key reached 16 Claude models, billed per token from prepaid credit. The installer at martllm.com/claude-code writes the settings and stores the key in a file readable only by you. A request that fails is not billed.
Prices as of November 20, 2026, 11:00 UTC. This page is rebuilt every hour.