Claude Code
Configure Claude Code with EasyAPI environment variables to access every supported model through the relay.
Prerequisites
- Claude Code CLI installed (https://docs.anthropic.com/en/docs/claude-code)
- An EasyAPI API token created in the console
Step 1: Get Your EasyAPI Token
Sign in to the EasyAPI console → Token Management and copy the API Key starting with sk-.
The token must have permission to call the target model.
Step 2: Configure Environment Variables
Use EasyAPI as an Anthropic-compatible endpoint by setting ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL (pointing to the EasyAPI site root, without the /v1 suffix).
$ export ANTHROPIC_API_KEY="sk-your-easyapi-token"
$ export ANTHROPIC_BASE_URL="https://token.easyapi.com"
$ claude
Claude Code ready — connected via EasyAPI
Step 3: Launch Claude Code
Run the claude command in your terminal and follow the prompts to sign in, or start a session directly with the configured environment variables.
If you already have Anthropic official settings, clear or override the relevant environment variables first to avoid conflicts.
Verification
- Running claude enters the interactive interface
- No 401 / 403 errors appear in the console when running a simple task