This guide explains how to configure Claude Code to connect to custom Anthropic-compatible endpoints, addressing common 401 and 404 errors. It details the necessary environment variables, ANTHROPIC_BASE_URL and API keys (either ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY), emphasizing the correct URL format for Claude Code. The guide uses SuJin AI as a practical example and provides instructions for persisting these settings in zsh and bash shells for continuous use. AI
IMPACT Enables developers to integrate custom or self-hosted LLM endpoints with the Claude Code client.
RANK_REASON Guide on configuring a specific tool (Claude Code) to work with custom endpoints.
Read on dev.to — Claude Code tag →
- Anthropic
- ANTHROPIC_API_KEY
- ANTHROPIC_AUTH_TOKEN
- ANTHROPIC_BASE_URL
- Claude Code
- Cline
- Cursor+
- SuJinAI
- Su Jin AI
- SuJin AI
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →