Third-party Platform SupportConfigure in Claude Code

Configuring Claude Code

Claude Code is an intelligent coding tool that runs in the terminal and helps developers quickly complete tasks such as code generation, debugging, and refactoring through natural language commands.

Use Claude Code through OriginRouter CLI

OriginRouter CLI provides a unified local entry point for Claude Code, connecting Cloud routes, model providers, session control, approvals, and cross-device collaboration. This path does not require manually installing Claude Code or maintaining account credentials and configuration files.

For OriginRouter CLI installation and initialization, see overview and install. If you prefer a graphical interface to start, view, and control Claude Code sessions, see Agent Control.

originrouter claude

Manually install Claude Code

Prerequisites

Open the command line interface and install Claude Code

npm i -g @anthropic-ai/claude-code

Run the following command to check the installation result. If a version number is displayed, the installation was successful.

claude --version

If Claude Code is not started through OriginRouter CLI, choose one of the following configuration methods.

Choose a configuration method

Quick setup is configured through environment variables and only takes effect in the current terminal session. The configuration will be lost after closing the terminal.

If you are on the pay-as-you-go API plan, use the configuration below (requests are served via the /beta endpoint and billed per request):

# 设置 OriginRouter 服务端点
export ANTHROPIC_BASE_URL=https://api.easytransnote.com/beta

# 设置 API 密钥(任选其一)
export ANTHROPIC_API_KEY=sk-v1-xxxxxx
# 或
export ANTHROPIC_AUTH_TOKEN=sk-v1-xxxxxx

# 设置主力模型
export ANTHROPIC_MODEL=claude-sonnet-4-6

# 设置快速响应模型
export ANTHROPIC_SMALL_FAST_MODEL=claude-haiku-4-5

# 跳过欢迎界面
export ANTHROPIC_HAS_COMPLETED_ONBOARDING=true

# 设置 API 请求的超时时间
export API_TIMEOUT_MS=3000000

# 禁用所有非必要的网络通信
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

If you have subscribed to the OriginRouter One coding plan, use the configuration below (requests are served via the /coding endpoint and consume your subscription quota):

# 设置 OriginRouter 服务端点
export ANTHROPIC_BASE_URL=https://api.easytransnote.com/coding

# 设置 API 密钥(任选其一)
export ANTHROPIC_API_KEY=sk-v1-xxxxxx
# 或
export ANTHROPIC_AUTH_TOKEN=sk-v1-xxxxxx

# 设置主力模型
export ANTHROPIC_MODEL=claude-sonnet-4-6

# 设置快速响应模型
export ANTHROPIC_SMALL_FAST_MODEL=claude-haiku-4-5

# 跳过欢迎界面
export ANTHROPIC_HAS_COMPLETED_ONBOARDING=true

# 设置 API 请求的超时时间
export API_TIMEOUT_MS=3000000

# 禁用所有非必要的网络通信
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

Start Claude Code

claude

Was this page helpful?