Integrations

Configure your favorite AI coding tools — from CLI agents to IDE plugins — to use WisGate models in minutes.

Claude Code

Anthropic's official CLI coding agent, supporting WisGate as the Anthropic-compatible endpoint.

Claude Code

Claude Code is an intelligent coding agent that runs in the terminal. By connecting Claude Code to WisGate, developers can use WisGate's Anthropic-compatible endpoint for code generation, debugging, refactoring, project analysis, and automated development workflows.

Step 1: Install Claude Code

Prerequisites:

  • Node.js 18 or later
  • MacOS users are recommended to use nvm to install Node.js
  • Windows users also need Git for Windows

Install Claude Code:

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

Verify installation:

claude --version

Step 2: Configure WisGate

1. Sign Up

Visit the WisGate platform and complete the registration process.

2. Get Your API Key

Create and obtain your API Key from the WisGate dashboard.

3. Configure Claude Code Environment Variables

Edit or create the settings.json file:

  • MacOS & Linux: ~/.claude/settings.json
  • Windows: User Directory/.claude/settings.json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your_wisgate_api_key",
    "ANTHROPIC_API_KEY": "",
    "ANTHROPIC_BASE_URL": "https://api.wisgate.cn",
    "API_TIMEOUT_MS": "3000000",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1
  }
}

Use https://api.wisgate.cn as the WisGate Anthropic-compatible endpoint. Do not use the OpenAI-compatible endpoint https://api.wisgate.cn/v1 for Claude Code. Setting ANTHROPIC_API_KEY to an empty string helps prevent Claude Code from picking up an old Anthropic API key.

Edit or create .claude.json:

  • MacOS & Linux: ~/.claude.json
  • Windows: User Directory/.claude.json
{
  "hasCompletedOnboarding": true
}

If you previously logged in to Claude Code with an Anthropic account, run /logout once inside Claude Code, then quit the session and reopen your terminal. This prevents cached login state from conflicting with your WisGate API key.

Step 3: Start Using Claude Code

Navigate to your code directory and run claude to start using Claude Code.

If prompted with "Do you want to use this API key", select Yes. After entering Claude Code, run /status to verify that the auth token is ANTHROPIC_AUTH_TOKEN and the base URL is https://api.wisgate.cn.

WisGate Use Cases

  • Code generation: Describe a feature and let Claude Code generate functions, pages, scripts, or configuration files through WisGate.
  • Debugging: Ask Claude Code to inspect errors, identify causes, and use WisGate models to help fix issues.
  • Project refactoring: Split modules, improve naming, organize dependencies, and reduce duplicate logic in larger codebases.
  • Test creation: Generate unit tests, integration tests, and edge cases from existing business logic.
  • Team access management: Standardize WisGate API key and model configuration across team members for easier model and cost management.

FAQ

How to Switch Models

Adjust the configuration file (~/.claude/settings.json) to assign different WisGate models for Claude Code tasks:

{
  "env": {
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8"
  }
}

Claude Code has the best compatibility with Anthropic-family models. Prefer Claude models on WisGate that support the Anthropic Messages format.

How to Verify the WisGate Connection

Run this command inside Claude Code:

/status

If the status shows ANTHROPIC_AUTH_TOKEN and https://api.wisgate.cn, Claude Code is connected through WisGate.

Configuration Changes Not Taking Effect

  • Close all Claude Code windows, reopen a new terminal, and run claude again
  • If you previously logged in with an Anthropic account, run /logout to clear cached login state
  • Make sure there is no real ANTHROPIC_API_KEY left in your shell environment, or set it to an empty string in settings.json
  • Verify the JSON format is correct
# Check current version
claude --version

# Upgrade to latest version
claude update