Model guidesBeginnersUpdated

How to use DeepSeek-V4.1-Flash with Claude Code

Set your I Code Easy API Key, the root URL https://api.icodeeasy.cc, and model deepseek-flash in Claude Code to use DeepSeek-V4.1-Flash through this service. This guide covers macOS, Linux, Windows, verification, and common errors.

Model names and the client are different

DeepSeek-V4.1-Flash is the model; Claude Code is Anthropic’s coding client. This guide uses your I Code Easy API Key and URL, rather than a DeepSeek official Key or subscription. The Claude Code client name does not mean a Claude model handles the request: these settings select DeepSeek.

The display name is DeepSeek-V4.1-Flash; the recommended canonical model ID is deepseek-flash. This service also accepts deepseek-v4.1-flash as an alias; the examples consistently use the canonical ID. Do not paste the display label into model variables or borrow generic model names from other DeepSeek guides.

Before you start

  1. If the client is not installed, follow the Claude Code installation guide first, then return here. Follow Anthropic’s current instructions for Windows terminals and Git Bash requirements.
  2. Register and copy your service Key from API Keys. Select an applicable endpoint as described in Getting started.
  3. Check current prices on the pricing page and supported features in the model capability catalog. DeepSeek’s official prices, quotas, and subscriptions do not describe this service.
  4. Keep the Key in your local configuration. Do not put it in a repository, screenshot, chat, or support ticket.

Configuration reference

VariableValue / purpose
ANTHROPIC_AUTH_TOKENYour I Code Easy API Key
ANTHROPIC_BASE_URLhttps://api.icodeeasy.cc, a root URL without /v1
ANTHROPIC_MODELdeepseek-flash, the model for the current session
ANTHROPIC_DEFAULT_HAIKU_MODELdeepseek-flash, mapping for the Haiku alias
ANTHROPIC_DEFAULT_SONNET_MODELdeepseek-flash, mapping for the Sonnet alias
ANTHROPIC_DEFAULT_OPUS_MODELdeepseek-flash, mapping for the Opus alias
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC1, disables nonessential traffic

The three default variables also point the Haiku, Sonnet, and Opus aliases at deepseek-flash; they do not turn DeepSeek into a Claude model. These environment variables configure Claude Code CLI. For Desktop, use the general guide.

DeepSeek’s official Anthropic-compatible URL includes /anthropic and uses an official DeepSeek Key. This guide connects through I Code Easy: use only the root URL above, without /anthropic, /v1, or /v1/messages. Put only your site Key in ANTHROPIC_AUTH_TOKEN, without a Bearer prefix.

Do not set CLAUDE_CODE_ATTRIBUTION_HEADER=0; retain native client attribution metadata. See the general Claude Code guide for service restrictions.

Linux / MacOS

Paste this configuration into the terminal where you will run Claude Code. Replace the placeholder with your service Key. These values initially apply to the current terminal session:

export ANTHROPIC_AUTH_TOKEN="your I Code Easy API Key"
export ANTHROPIC_BASE_URL="https://api.icodeeasy.cc"
export ANTHROPIC_MODEL="deepseek-flash"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-flash"
export ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-flash"
export ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-flash"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"

To persist the settings, add the same export lines to your shell startup file: ~/.zshrc for zsh or ~/.bashrc for bash, then reopen the terminal. See Claude Code setup for more persistence and Windows guidance.

You can also open a new terminal. An existing Claude Code process will not pick up changed environment variables; exit it and launch it again from the configured terminal.

Windows

To configure only the current PowerShell session, run:

$env:ANTHROPIC_AUTH_TOKEN = "your I Code Easy API Key"
$env:ANTHROPIC_BASE_URL = "https://api.icodeeasy.cc"
$env:ANTHROPIC_MODEL = "deepseek-flash"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = "deepseek-flash"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL = "deepseek-flash"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL = "deepseek-flash"
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"

For persistence at user level, run this code in the same window after setting the variables above. It saves those seven values to your user environment:

$names = @(
  "ANTHROPIC_AUTH_TOKEN",
  "ANTHROPIC_BASE_URL",
  "ANTHROPIC_MODEL",
  "ANTHROPIC_DEFAULT_HAIKU_MODEL",
  "ANTHROPIC_DEFAULT_SONNET_MODEL",
  "ANTHROPIC_DEFAULT_OPUS_MODEL",
  "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC"
)
foreach ($name in $names) {
  $value = [Environment]::GetEnvironmentVariable($name, "Process")
  [Environment]::SetEnvironmentVariable($name, $value, "User")
}

User environment values are read by processes launched later. Open a new PowerShell window after saving. If you use VS Code or another integrated terminal, restart its host application too, then launch Claude Code.

Verify locally, then send a real request

First confirm the client is installed. This command prints its version without making a model request:

claude --version

Check whether the Key exists using a boolean result; do not print the Key itself:

macOS / Linux:

test -n "$ANTHROPIC_AUTH_TOKEN" && echo true || echo false

PowerShell:

[bool]$env:ANTHROPIC_AUTH_TOKEN

Run claude from the configured terminal, then enter /status in the client to inspect the model and connection settings. The status screen is a configuration clue. Seeing Claude Code, Haiku, Sonnet, or Opus in the interface alone does not prove that a Claude model handled a request.

Next, send a short prompt yourself in Claude Code, such as “Reply only OK.” This makes a real request and is billed under current rules. Check request logs for success, the recorded model, and charges. Do not rely on the model’s self-identification in its reply.

Common errors and troubleshooting

SymptomFirst checks
401 / authentication failedUse your service Key without extra spaces; check whether it was rotated and whether the URL and Key belong to the same service. Do not share the Key for inspection.
403 / access deniedCheck account status, endpoint selection, and current model access. Send support the error text and time, without the Key.
429 / request limitedRead the full error and dashboard status; reduce concurrency and retry later. A 429 does not always mean insufficient balance.
Claude names still appearCheck ANTHROPIC_MODEL and all three default variables. Client names, model aliases, and the request model are distinct; cross-check request logs.
Settings do not applyExit the old client and launch from a new terminal. Check startup files, user environment, and client settings for conflicting values; ensure you edited the shell you actually use.
Timeout / network errorCheck your local proxy and connection. Try the JP/SG URLs below, then see connection troubleshooting.

If the main domain is slow, replace only ANTHROPIC_BASE_URL; keep other variables unchanged. The backup URLs also omit /v1:

https://jp.icodeeasy.cc
https://sg.icodeeasy.cc

Restart Claude Code after switching, then repeat verification. For troubleshooting, share the error code, time, and redacted logs, never the raw Key.

The official references explain compatible interfaces and client settings. Their direct-service Keys, URLs, prices, and subscriptions are separate from this service.