Skip to main content

What is Claude Code?

Claude Code is an intelligent coding tool developed by Anthropic that runs in your terminal. It helps developers quickly complete code generation, debugging, refactoring, and other tasks through natural language commands.
With GPTProto, you can use 160+ AI models from top providers (GLM, Kimi, MiniMax, DeepSeek, and more) directly in Claude Code — all with a single API key and no code changes required.
GPTProto provides a fully Anthropic-compatible API endpoint. Claude Code will display model names like claude-sonnet-4-20250514, but the actual model running behind the scenes is your chosen model (e.g., GLM-5, Kimi-K2.5, etc.).

Step 1: Install Claude Code

Prerequisites: Node.js 18+ Install Claude Code globally via npm:
npm install -g @anthropic-ai/claude-code
After installation, navigate to your project directory and start Claude Code:
cd your-project
claude
During your first run, Claude Code will prompt you to log in to your Anthropic account. You can skip this step — we will configure GPTProto API in the next step.

Step 2: Configure GPTProto API

Option A: Quick Setup (Environment Variables)

The fastest way to get started. Set these environment variables before launching Claude Code:
export ANTHROPIC_BASE_URL=https://gptproto.com
export ANTHROPIC_API_KEY=sk-your-gptproto-api-key
claude
To make this permanent, add the export lines to your shell profile (~/.bashrc, ~/.zshrc, or ~/.profile).
Edit the Claude Code settings file at ~/.claude/settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://gptproto.com",
    "ANTHROPIC_API_KEY": "sk-your-gptproto-api-key"
  }
}
If you manually edit settings.json, you must restart Claude Code for the changes to take effect. If running inside an IDE plugin, restart the IDE as well.

Step 3: Choose Your Model

By default, Claude Code maps its internal model tiers to specific models. With GPTProto, you can customize which model powers each tier.

Default Model Mapping

Claude Code TierEnvironment VariableDefault ModelDescription
Opus (Heavy tasks)ANTHROPIC_DEFAULT_OPUS_MODELclaude-opus-4-20250514Complex reasoning, architecture
Sonnet (Main)ANTHROPIC_DEFAULT_SONNET_MODELclaude-sonnet-4-20250514Primary coding model
Haiku (Light tasks)ANTHROPIC_DEFAULT_HAIKU_MODELclaude-haiku-3-5-20241022Quick completions, small edits

Use GLM Models

To use Zhipu GLM models in Claude Code, add to ~/.claude/settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://gptproto.com",
    "ANTHROPIC_API_KEY": "sk-your-gptproto-api-key",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air"
  }
}

Use Kimi Models

To use Moonshot Kimi models:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://gptproto.com",
    "ANTHROPIC_API_KEY": "sk-your-gptproto-api-key",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k2.5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k2.5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k2.5"
  }
}

Use MiniMax Models

To use MiniMax models:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://gptproto.com",
    "ANTHROPIC_API_KEY": "sk-your-gptproto-api-key",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M2.5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2.5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M2.5"
  }
}

Use DeepSeek Models

To use DeepSeek models:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://gptproto.com",
    "ANTHROPIC_API_KEY": "sk-your-gptproto-api-key",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v3.2",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v3.2",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v3.2"
  }
}
The best approach is to assign different models to different tiers based on their strengths:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://gptproto.com",
    "ANTHROPIC_API_KEY": "sk-your-gptproto-api-key",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k2.5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v3.2"
  }
}
Mix and match for best results! Use a powerful model like GLM-5 for complex tasks (Opus), a balanced model like Kimi-K2.5 for main coding (Sonnet), and a fast model like DeepSeek-V3.2 for quick completions (Haiku).

Step 4: Start Using Claude Code

After configuration, start Claude Code in your project directory:
cd your-project
claude
You can now use natural language to interact with your codebase:
> Help me refactor the authentication module to use JWT tokens

> Find and fix the bug in the payment processing logic

> Write unit tests for the user service

> Explain the architecture of this project
Claude Code will show model names like claude-sonnet-4-20250514 in the UI, but the actual model running is your configured GPTProto model (e.g., GLM-5, Kimi-K2.5, etc.). This is expected behavior.

Available Models

Here are the recommended models available through GPTProto for coding tasks:
ModelProviderBest ForSpeed
glm-5ZhipuComplex reasoning, full-stack development⭐⭐⭐
glm-4.7ZhipuBalanced coding, debugging⭐⭐⭐⭐
glm-4.5-airZhipuQuick completions, lightweight tasks⭐⭐⭐⭐⭐
kimi-k2.5MoonshotLong context, code analysis⭐⭐⭐⭐
MiniMax-M2.5MiniMaxGeneral coding, creative tasks⭐⭐⭐⭐
deepseek-v3.2DeepSeekCode generation, math⭐⭐⭐⭐
qwen3-235bQwenMultilingual, reasoning⭐⭐⭐
GPTProto supports 160+ models. You can use any model from the model list as long as it supports the chat completions API.

FAQ

How to switch models?

You can switch models at any time by updating the environment variables in ~/.claude/settings.json and restarting Claude Code. Alternatively, set environment variables directly in your terminal before launching:
ANTHROPIC_DEFAULT_SONNET_MODEL=glm-5 claude

Why does the UI still show “Claude” model names?

This is by design. Claude Code internally uses Anthropic model identifiers. GPTProto acts as a transparent proxy — it receives requests with Claude model names and routes them to your configured model. The functionality is identical; only the display name differs.

Manual config changes not taking effect?

If you edited ~/.claude/settings.json manually:
  1. Close Claude Code completely (not just the current session)
  2. If using the IDE plugin, restart the IDE
  3. Verify the JSON syntax is valid
  4. Re-launch Claude Code
# Verify your config
cat ~/.claude/settings.json | python3 -m json.tool
We recommend using the latest stable version of Claude Code for the best compatibility:
npm update -g @anthropic-ai/claude-code

Connection issues?

If you encounter connection errors:
  1. Verify your API key is valid: visit gptproto.com dashboard
  2. Check that ANTHROPIC_BASE_URL is set to https://gptproto.com (no trailing slash)
  3. Test connectivity:
curl https://gptproto.com/v1/messages \
  -H "x-api-key: sk-your-api-key" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5","max_tokens":20,"messages":[{"role":"user","content":"Hi"}]}'

Resources