Skip to main content

What is Claude Code?

Claude Code is a terminal-based AI development assistant created by Anthropic. It enables developers to accelerate coding workflows by using natural language to generate code, troubleshoot issues, refactor existing implementations, and perform a wide range of engineering tasks directly from the command line.
AGCloud provides a fully Anthropic-compatible API endpoint. Claude Code will display model names like claude-sonnet-4-6, but the actual model running behind the scenes is your chosen model (e.g., GLM-5, Kimi-K2.5, etc.).
With AGCloud, you can use 160+ AI models from top providers (Claude, OpenAI, Gemini, GLM, Kimi, MiniMax, DeepSeek, and more) directly in Claude Code — all with a single API key and no code changes required.

Two Ways to Use Claude Code

Step 1: Install Claude Code CLI

Requires Node.js 20+
Install Claude Code via NPM package manager:
npm install -g @anthropic-ai/claude-code
Check if the installation was successful.
claude --version # display version, e.g.: 2.x.x (Claude Code)
After installation, you can start with Claude Code AI.
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.

Step 2: Configure AGCloud API

Option A: Quick Setup (Environment Variables)

The fastest way to get started. Set these environment variables before launching Claude Code:
To make this permanent, add the following lines to your shell profile (~/.bashrc, ~/.zshrc, or ~/.profile).
export ANTHROPIC_BASE_URL=https://aiandgpu.com
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS='1'
export ANTHROPIC_AUTH_TOKEN=<YOUR_API_KEY>
export ANTHROPIC_MODEL='claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5-20251001'
export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'
It is recommended to set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS='1' for AWS Bedrock protocol compatibility, otherwise your requests may be slower. For more environment variables, refer to: Claude Code Env Vars
Make configuration effective:
# bash users
source ~/.bashrc

# zsh users
source ~/.zshrc
Edit the Claude Code settings file at ~/.claude/settings.json:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://aiandgpu.com",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_API_KEY>",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}
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 AGCloud, 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-6Complex reasoning, architecture
Sonnet (Main)ANTHROPIC_DEFAULT_SONNET_MODELclaude-sonnet-4-6Primary coding model
Haiku (Light tasks)ANTHROPIC_DEFAULT_HAIKU_MODELclaude-haiku-4-5-20251001Quick completions, small edits

Model Configuration Examples

Add the following to ~/.claude/settings.json:

Use Claude Models

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://aiandgpu.com",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_API_KEY>",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001"
  }
}

Use GLM Models

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://aiandgpu.com",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_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

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://aiandgpu.com",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_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

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://aiandgpu.com",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_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

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://aiandgpu.com",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_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://aiandgpu.com",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_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 with 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 AGCloud model (e.g., GLM-5, Kimi-K2.5, etc.). This is expected behavior.

Available Models

Below are the recommended coding models provided by AGCloud:
Model NameUse ForSpeed
claude-opus-4-6Complex reasoning, full-stack development🌟🌟🌟🌟🌟
claude-sonnet-4-6Balanced coding, debugging🌟🌟🌟🌟🌟
claude-haiku-4-5-20251001Quick completions, lightweight tasks🌟🌟🌟🌟
AGCloud supports 160+ models. You can use any model from the model list as long as it supports the chat completions API.

FAQ

1. 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

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

This behavior is intentional. Claude Code relies on Anthropic’s native model identifiers internally. AGCloud functions as a passthrough layer—it accepts requests using Claude model names and forwards them to the model you’ve configured. The underlying capabilities remain the same; only the displayed model name changes.

3. 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

5. Connection issues?

If you encounter connection errors:
  1. Verify your API key is valid: visit AGCloud Dashboard
  2. Check that ANTHROPIC_BASE_URL is set to https://aiandgpu.com (no trailing slash)
  3. Test connectivity:
curl https://aiandgpu.com/v1/messages \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5","max_tokens":20,"messages":[{"role":"user","content":"Hi"}]}'