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.).Two Ways to Use Claude Code
Step 1: Installation
Requires Node.js 20+
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
Quick Jump:
macOS/Linux Setup
Environment Variables (Quick Setup)
Append the commands below to
~/.bashrc, ~/.zshrc, or ~/.profile so they load automatically on every login.Activate the Configuration
Model Configuration (settings.json)
On macOS/Linux, Claude Code stores its config in~/.claude/settings.json. Use it to persist all model mappings at once:
Windows Setup
Environment Variables (Quick Setup)
Run these commands in PowerShell. To persist them, add the lines to
$PROFILE or configure them via System Properties → Environment Variables.Activate the Configuration
Model Configuration (settings.json)
On Windows the config file lives atC:\\Users\\<USERNAME>\\.claude\\settings.json:
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 Tier | Environment Variable | Default Model | Description |
|---|---|---|---|
Opus (Heavy tasks) | ANTHROPIC_DEFAULT_OPUS_MODEL | claude-opus-4-6 | Complex reasoning, architecture |
Sonnet (Main) | ANTHROPIC_DEFAULT_SONNET_MODEL | claude-sonnet-4-6 | Primary coding model |
Haiku (Light tasks) | ANTHROPIC_DEFAULT_HAIKU_MODEL | claude-haiku-4-5-20251001 | Quick completions, small edits |
Model Configuration Examples
Add the following to~/.claude/settings.json:
Use Claude Models
Step 4: Start with Claude Code
After configuration, start Claude Code in your project directory: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 Name | Use For | Speed |
|---|---|---|
claude-opus-4-6 | Complex reasoning, full-stack development | 🌟🌟🌟🌟🌟 |
claude-sonnet-4-6 | Balanced coding, debugging | 🌟🌟🌟🌟🌟 |
claude-haiku-4-5-20251001 | Quick completions, lightweight tasks | 🌟🌟🌟🌟 |
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:
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:
- Close Claude Code completely (not just the current session)
- If using the IDE plugin, restart the IDE
- Verify the JSON syntax is valid
- Re-launch Claude Code
4. Recommended Claude Code version?
We recommend using the latest stable version of Claude Code for the best compatibility:5. Connection issues?
If you encounter connection errors:- Verify your API key is valid: visit AGCloud Dashboard
- Check that
ANTHROPIC_BASE_URLis set tohttps://aiandgpu.com(no trailing slash) - Test connectivity:
Resources Links
- AGCloud Dashboard: developer.aiandgpu.com
- Claude Code Official Docs: docs.anthropic.com/claude-code
- VS Code Claude Code Docs: code.claude.com/docs/en/vs-code
- Node.js Download: nodejs.org