Skip to main content
Claude Code is Anthropic’s official command-line coding assistant. This page shows how to point it at Global AI instead of the official API. Official docs: docs.anthropic.com/en/docs/claude-code.
Pick one of the two methods: CC Switch for a desktop GUI, manual setup if you are comfortable with terminals and config files.

Install Claude Code

Use the official native installer. No manual Node.js install is needed. Pick the command for your OS:
npm install -g @anthropic-ai/claude-code is officially marked deprecated. Use one of the native installs above. On Windows, also install Git for Windows so Claude Code can use the Bash tool.
After installation, verify with:
Verify install
CC Switch is a desktop tool for switching providers with one click. It supports both Claude Code and ChatGPT(Codex). Download: github.com/farion1231/cc-switch/releases. Global AI supports one-click import into CC Switch. Steps:
1

Create an API key

Sign in to Global AI, open API keys in the left menu (or go to globalai.vip/keys), and create a sk- key in the Claude group.
2

Open the CC Switch import menu

On the row of the new key, click the button on the far right and choose CC Switch.
3

Fill in the import details

In the dialog:
  • App: choose Claude Code
  • Name: customize as needed
  • Main model: choose claude-sonnet-5 (or a stronger model such as Opus)
Confirm and click Open CC Switch at the bottom.
4

Confirm opening CC Switch

Confirm in the browser prompt to open the CC Switch application.
5

Import the configuration

In CC Switch, click Import and wait for the success message.
6

Start Claude Code

In your project directory, run claude to get started. In the chat, type /model to switch between Sonnet, Opus, and other models.
7

Verify the integration

Open Usage logs. A call that matches your test timestamp confirms it works.

Option 2: Manual setup

1

Edit settings.json

Locate the config file for your OS (create if missing):
  • Windows: %USERPROFILE%\.claude\settings.json
  • macOS / Linux: ~/.claude/settings.json
Write the following (replace ANTHROPIC_AUTH_TOKEN with your sk- key):
settings.json
2

Set environment variables

In your terminal:
Environment variables
To make these persistent, add the two export lines to ~/.zshrc or ~/.bashrc.
3

Restart and verify

Restart your terminal, run claude in a project directory, send a test message, and confirm the call in Usage logs.

Verify configuration

In your terminal, run the commands below. Seeing https://globalai.vip in the output confirms the environment variables are set:
After changing configuration, restart your terminal for it to take effect.

Use inside an IDE

Once either method is working, install the UI extension to chat with Claude Code directly in VS Code, Cursor, or Trae.
1

Install the extension

Search Claude Code in the VS Code, Cursor, or Trae extension marketplace and install the official extension.
2

Open the chat panel

Open any project file, click the Claude icon in the top right of the editor, and the chat dialog appears.
Cursor and Trae cannot accept a Global AI key directly in their model configuration, but you can install Claude Code to integrate and use Agent features.

Troubleshooting

Confirm you are using a sk- key from Global AI and that it has not expired. Edit or regenerate at globalai.vip/keys.
After editing ~/.zshrc, ~/.bashrc, or system environment variables, restart your terminal. Use the commands in the “Verify configuration” section to check.
Model IDs change over time. Use the current Claude model IDs shown on globalai.vip/pricing.

References