Documentation Index
Fetch the complete documentation index at: https://docs.agipower.ai/llms.txt
Use this file to discover all available pages before exploring further.
Guide to Using Claude Code CLI with AGIPower
Claude Code is Anthropic’s official Coding Agent. With AGIPower integration, you can access a broader set of model options instead of being limited to Anthropic’s official Claude models.For example, via AGIPower you can use GPT-5.2 series, Claude-4.5 series, Gemini-3 series, Grok 4.1 series, Doubao-Seed-Code, Kimi-K2, Minimax-M2, GLM-4.6, DeepSeek-V3.2, Qwen3-Coder-Plus, and more in Claude Code. For the full list of supported models, see the official model list.AGIPower fully supports the Anthropic API protocol and can be seamlessly integrated into tools like Claude Code and Cursor. You only need to change two parameters to use it.Note: the Anthropic-compatible
base_url="https://agipower.ai".Configuration Options
Install Claude Code
Recommended installation (native install):macOS/Linux/WSL
Windows PowerShell
Windows CMD
Homebrew (macOS)
WinGet (Windows)
Configure Claude Code
How the Configuration Works
By default, Claude Code connects directly to Anthropic’s official service. However, by configuring environment variables, we can redirect its requests to AGIPower. This provides several benefits:- No changes to Claude Code itself: Switch endpoints using only environment variables
- Authenticate with a AGIPower API Key: Replaces Anthropic’s official API key
- More model choices: In addition to Claude, you can use GPT, Gemini, Qwen, and more
ANTHROPIC_BASE_URL (the AGIPower endpoint) and ANTHROPIC_AUTH_TOKEN (your AGIPower API Key), so that all Claude Code requests are proxied through AGIPower.
Step 0: Get a AGIPower API Key
Before configuring Claude Code, you need a AGIPower API Key. AGIPower offers two billing options—choose based on your use case:Subscription API Key (Recommended)
Pay-as-you-go API Key
Step 1: Configure Shell Environment Variables (Recommended)
This step writes the AGIPower connection configuration into your shell config file so it automatically applies whenever you open a terminal.macOS/Linux
Windows PowerShell
Step 2: Launch Claude Code and Complete Authentication
After the environment variables are configured, you can start Claude Code. On first launch, it will automatically authenticate via AGIPower. Steps:- Open a new terminal window (to ensure the environment variables are loaded)
-
Go to your project directory:
-
Start Claude Code:
-
On first launch, Claude Code will:
- Automatically read
ANTHROPIC_AUTH_TOKENfrom your environment variables - Authenticate via the AGIPower endpoint specified by
ANTHROPIC_BASE_URL - Start working immediately, with no additional login steps
- Automatically read
Step 3: Verify the Connection
After launching successfully, it’s recommended to verify that Claude Code is correctly connected to AGIPower. In the Claude Code prompt, run/status and check whether the configuration is correct:
- ✅
Auth tokenshould displayANTHROPIC_AUTH_TOKEN(meaning it’s read from environment variables) - ✅
Anthropic base URLshould displayhttps://agipower.ai(the AGIPower endpoint)
Switch / Set Default Models
You’ve already configured the default models in your shell profile (required). If you want to switch to other models, just update the same set of environment variables:source ~/.bashrc / source ~/.zshrc or restart the terminal for changes to take effect.
Supported Models
Models compatible with the Anthropic protocol are being adapted in batches. You can filter currently supported models via the official model list and select the Anthropic Messages protocol:
Or you can check support on a specific model detail page:

Or you can check support on a specific model detail page:

Use the Claude Code Extension in VSCode
In addition to the CLI, Claude Code also provides a VSCode extension, allowing you to use Claude Code directly inside the VSCode editor for AI-assisted programming.Step 1: Install the Claude Code Extension
Search for and install Claude Code Extension from the VSCode Marketplace: <div style=“text-align: center;”>
</div>
Step 2: Open Settings
After installation, click the extension’s Settings icon to open the configuration page: <div style=“text-align: center;”>
</div>
Step 3: Configure the Model and Environment Variables
Click Edit in settings.json, then add or modify the following configuration: <div style=“text-align: center;”>
</div>
Step 4: Start Using It
After configuration, you can use the Claude Code extension in VSCode:- Click the Claude Code icon in the VSCode sidebar
- Enter your question or task in the chat panel
- Claude will automatically read project files and help you
What It Looks Like
After setup, you can use multiple AGIPower models in Claude Code: <div style=“text-align: center;”>
</div>
You can use the ‘/model’ command to confirm which model is currently in use:
<div style=“text-align: center;”>
</div>
Troubleshooting
Common Issues
API Key Error or Authentication Failure
Issue: You see messages like “invalid API key,” “unauthorized,” or authentication failed. Solution:-
Check the API Key format:
- Subscription API keys should start with
sk-ss-v1- - Pay-as-you-go API keys should start with
sk- - Ensure there are no extra spaces or newline characters
- Subscription API keys should start with
-
Validate the API Key:
- Subscription: visit the subscription management page to check subscription status and quota
- Pay-as-you-go: visit the pay-as-you-go page to confirm sufficient balance
-
Confirm environment variables are loaded:
If the output is empty, the environment variables were not loaded correctly. Re-run
source ~/.zshrcor restart the terminal. -
Check the API Key status:
- Confirm the API key is shown as “Enabled” in the console
- Check whether the API key has been deleted or disabled
- Get a new API Key:
Authentication Failure When Switching from Another Platform to AGIPower
Issue: You previously used a Claude Code official account or another platform (e.g., MiniMax, GLM, etc.). After switching to AGIPower, authentication fails or configuration conflicts occur. Solution: This usually happens because old config files cached prior authentication info, causing conflicts with the new AGIPower configuration. Clean up and reconfigure as follows:-
Delete the old config file:
[macOS/Linux][Windows PowerShell]
-
Confirm your shell environment variables are configured correctly:
Check whether your shell config file (
~/.zshrcor~/.bashrc) contains the full AGIPower configuration. Refer to the Step 1: Configure Shell Environment Variables section above, and ensure it includes these key variables: -
Reload environment variables:
[Using zsh][Using bash][Windows PowerShell]
-
Verify environment variables are applied:
[macOS/Linux][Windows PowerShell]
-
Restart Claude Code:
-
Verify the connection:
After starting, run
/statusin Claude Code and confirm it shows:
The Model Does Not Support the Anthropic Protocol
Issue: When using a model, you see a message saying it does not support the Anthropic protocol. Solution:- Use the AGIPower model list and filter by “Anthropic API Compatible” to see currently supported models
- Or open the model’s detail page to confirm Anthropic protocol support
- Choose a model from the supported list above
Connection Failures
Issue: Claude Code cannot connect to the AGIPower service. Solution:- Check that your network connection is working
- Verify
ANTHROPIC_BASE_URLis set tohttps://agipower.ai - Confirm your firewall is not blocking outbound connections
VSCode Claude Code Extension Configuration Issues
Issue: In the VSCode Claude Code extension, you encounter issues such as authentication failures or models not working. Solution:-
Confirm the environment variables are configured correctly:
- Open VSCode Settings (
Cmd/Ctrl + ,) - Search for “Claude Code”
- Click “Edit in settings.json”
- Confirm
claudeCode.environmentVariablesincludes correctANTHROPIC_BASE_URLandANTHROPIC_AUTH_TOKEN
- Open VSCode Settings (
-
Check the model configuration:
- Search for “claude-code.selectedModel” in Settings
- Confirm the model name format is correct (e.g.,
anthropic/claude-sonnet-4.5) - Confirm the model supports the Anthropic protocol (check via the model list)
-
Resolve environment variable conflicts:
- The VSCode extension’s
settings.jsonconfiguration has higher priority than system environment variables - If you previously set environment variables in your shell profile, it’s recommended to keep only one source of configuration
- Avoid setting
ANTHROPIC_AUTH_TOKENin multiple places, which can cause conflicts
- The VSCode extension’s
-
Restart VSCode:
- After changing configuration, fully quit and relaunch VSCode
- Reopen the project so the new configuration takes effect
-
Check extension logs:
- Open the Output panel in VSCode (
View > Output) - Select the “Claude Code” channel
- Review detailed error messages to help diagnose the issue
- Open the Output panel in VSCode (
-
Verify the connection:
- In the Claude Code chat UI, type
/status - Confirm the displayed API endpoint and authentication method are correct
- In the Claude Code chat UI, type
Windows PowerShell Script Execution Policy Issue
Issue: PowerShell shows: “Cannot load file xxx because running scripts is disabled on this system.” Solution: This is a Windows PowerShell security mechanism. You need to change the execution policy:- Run PowerShell as Administrator
-
Execute:
-
Type
Yto confirm - Reopen the PowerShell window
Restricted(default): no scripts can runRemoteSigned: local scripts can run; downloaded scripts require a digital signatureUnrestricted: all scripts can run (not recommended)
Windows: claude Command Not Found
Issue: After installing Claude Code, PowerShell cannot find the claude command.
Solution:
This is usually caused by the npm global package path not being added to the PATH environment variable.
-
Check the npm global prefix:
-
Check whether that path is in PATH:
-
If it isn’t, add it manually (choose one):
Option 1: Temporary (current session only)
Option 2: Permanent (recommended)
- Close and reopen PowerShell
-
Verify the installation:
Windows PowerShell Profile Not Taking Effect
Issue: You configured the PowerShell Profile, but the environment variables are not loaded. Solution:-
Confirm the Profile file path is correct:
-
Confirm the Profile file exists:
-
Confirm the Profile file content is correct:
-
Manually load the Profile (to test for syntax errors):
-
If errors occur, check:
- Whether the file encoding is UTF-8
- Whether the PowerShell syntax is correct (note the
$env:prefix) - Whether the execution policy allows scripts (see “PowerShell Script Execution Policy Issue” above)
-
Verify environment variables are loaded:
How to Enable the 1M Context Window
Issue: The 1M context window is not enabled when usinganthropic/claude-opus-4.6 or anthropic/claude-sonnet-4.6.
Cause: Claude Code determines whether to enable the extended context window based on the model name. Model names with the anthropic/ prefix are not recognized, causing it to fall back to the default context window size.
Solution:
Replace the model names with the format that Claude Code can recognize:
anthropic/claude-opus-4.6→claude-opus-4-6anthropic/claude-sonnet-4.6→claude-sonnet-4-6
source ~/.zshrc or source ~/.bashrc, then restart Claude Code.
Windows: Chinese Characters in Environment Variables
Issue: Garbled text appears when environment variables contain Chinese paths or values. Solution:- Ensure the PowerShell Profile file uses UTF-8 with BOM encoding
-
Set the correct encoding in PowerShell:
- If the issue persists, avoid using Chinese characters in environment variable values
See the AGIPower model list for all available models and detailed information.