Claude Code Third Party API Setup: Run GLM, Kimi, and DeepSeek for a Fraction of the Cost
Blog post from Atlas Cloud
Claude Code is a powerful but costly agentic coding tool, with expenses reaching up to $13 per active developer-day for heavy users, yet it offers a flexible backend model that can be swapped to more affordable open-weight models like GLM, Kimi, and DeepSeek through a simple configuration change. By editing the ANTHROPIC_BASE_URL environment variable, users can redirect Claude Code to a third-party API setup, which significantly reduces costs, as some open-weight models cost only $0.14 per million input tokens compared to several dollars for frontier models. This setup not only allows for substantial savings but also provides access to Claude Code in regions not directly served by Anthropic. The process involves editing a settings file to point to a different backend, with the potential to switch models easily by changing a single line, thus maintaining the desired Claude Code experience while managing costs effectively. Additionally, this approach centralizes model usage across various tools, like Codex and OpenClaw, under one key and budget, easing management and enhancing flexibility.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| OpenClaw | 3 | 322 | 53 | 28 | -2% |
| AI Coding Assistant | 1 | 1,586 | 431 | 148 | -12% |