ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. Do not add /v1 to the Claude Code Base URL.
Prerequisites
- Claude Code installed (see Claude Code docs)
- LLMEasy API Key (register here)
Setup
- Automatic setup
- Configure via CC Switch
- Manual setup
You can run the LLMEasy automatic setup script directly. It only writes the LLMEasy provider configuration and does not replace the installation prerequisites above. The script requires
Node.js. If you do not pass an API Key or model explicitly, the script prompts for them when the tool supports interactive input.Follow the step for your operating system. You only need one of them.Use the VS Code extension
If you use the Claude Code VS Code extension:Set environment variables
If you use the Claude Key group, click Edit in settings.json and update
claudeCode.environmentVariables:Add model mappings for the GPT Key group
If your API Key belongs to the GPT Key group, use:
gpt-5.4 is only an example GPT Key group model ID. Copy the current model ID from the LLMEasy model plaza. When the extension uses the Opus tier by default, it will resolve through ANTHROPIC_DEFAULT_OPUS_MODEL.Related FAQ
- Not sure what Claude Code is or what it can do? Read: What is Claude Code and how does it work?
- Not sure whether Claude Code uses a Claude.ai account or an API Key? Read: Does Claude Code use a Claude.ai account or an API Key?
- Not sure how API Key, Base URL, and protocol fit together? Read: How to configure API Key and Base URL in Claude Code
- Not sure whether to use an OpenAI-compatible or Anthropic-compatible endpoint? Read: OpenAI-compatible API vs Anthropic-compatible API
- Want to control context and token cost? Read: What is CLAUDE.md in Claude Code? and Why Claude Code uses so many tokens and how to reduce cost
- Comparing tools? Read: Claude Code vs Cursor for local development and Claude Code vs Codex CLI
- Want to understand models, permissions, or MCP? Read: How to switch Sonnet and Opus in Claude Code, Claude Code permissions and hooks, and MCP vs API Key and Base URL
Verify the setup
Start Claude Code and send a message. A normal reply means the connection is working. If authentication fails, check:ANTHROPIC_AUTH_TOKENcontains the correct LLMEasy API KeyANTHROPIC_BASE_URLishttps://www.llmeasy.ru- The Claude Key group does not set model variables, while the GPT Key group includes the
ANTHROPIC_DEFAULT_*_MODELmappings - No old environment variables are overriding your config
FAQ
What should I do if I see API Error: Unable to connect to API (ConnectionRefused)?
What should I do if I see API Error: Unable to connect to API (ConnectionRefused)?
This usually means Claude Code cannot reach the LLMEasy API. It is normally a network, proxy, or firewall issue, not an API Key or model mapping problem.Check that your local network is working, then confirm your system proxy, company network, router, or security software is not blocking
https://www.llmeasy.ru. If you use a firewall, allow Claude Code to access that address.
