# Claude Code Integration Guide

You can now use Claude series models through the UModelverse platform.

## **System Requirements**

| Platform | Requirements |
| --- | --- |
| Windows | Windows 10 or Windows 11 |
| macOS | macOS 10.15 (Catalina) or later |
| Linux | Ubuntu 18.04+, CentOS 7+, Debian 9+ |

All platforms require:

-   Node.js 18+

-   Network connection

## **1. Install Claude Code**

### macOS

1.  Install or update [Node.js](https://nodejs.org/en/download/) (v18.0 or later).

2.  Run the following command in Terminal to install Claude Code.

    ```
    npm install -g @anthropic-ai/claude-code
    ```

3.  Verify the installation. A version number in the output means success.

    ```
    claude --version
    ```

### Windows

1.  To use Claude Code on Windows, first install WSL or [Git for Windows](https://git-scm.com/install/windows).

2.  Run the following command in WSL or Git Bash to install Claude Code.

    ```
    npm install -g @anthropic-ai/claude-code
    ```

3.  Verify the installation. A version number in the output means success.

    ```
    claude --version
    ```

> See the [Windows setup guide](https://docs.anthropic.com/en/docs/claude-code/setup#windows-setup) in the official Claude Code documentation for details.

### Linux

1.  Install or update [Node.js](https://nodejs.org/en/download/) (v18.0 or later).

2.  Run the following command in Terminal to install Claude Code.

    ```
    npm install -g @anthropic-ai/claude-code
    ```

3.  Verify the installation. A version number in the output means success.

    ```
    claude --version
    ```

## **2. Configure the UModelverse API**

### 2.1 Get an API Key

Visit the [UModelverse Console](https://console.ucloud.cn/modelverse/api) to obtain your API key.

### 2.2 Configure Environment Variables

> **Important:** Replace `ANTHROPIC_AUTH_TOKEN` below with your actual API Key from the UModelverse platform!

> ⚠️ **Note:** Some experimental features have API compatibility issues. It is recommended to disable them with `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` for stable operation.

Create `settings.json` with the following content (the file path differs by platform).

#### macOS

File path: `~/.claude/settings.json`

```
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your-umodelverse-api-key",
    "ANTHROPIC_BASE_URL": "https://api-us-ca.umodelverse.ai",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}
```

#### Windows

File path: `C:\Users\<username>\.claude\settings.json`

```
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your-umodelverse-api-key",
    "ANTHROPIC_BASE_URL": "https://api-us-ca.umodelverse.ai",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}
```

#### Linux

File path: `~/.claude/settings.json`

```
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your-umodelverse-api-key",
    "ANTHROPIC_BASE_URL": "https://api-us-ca.umodelverse.ai",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
  }
}
```

After saving the configuration, open a new terminal window and run `claude "hello"`. If the model responds normally, the configuration is working. To verify further, run `/status` inside Claude Code and check that `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN` point to the UModelverse address.

**Configuration parameters:**

| Parameter | Description |
| --- | --- |
| `ANTHROPIC_MODEL` | Specifies the default model to use |
| `ANTHROPIC_DEFAULT_*_MODEL` | Maps Haiku, Sonnet, etc. to models supported by the platform |
| `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` | Disables experimental features to avoid API compatibility issues |

## **3. Start Claude Code**

After configuration, navigate to your project directory:

```
cd your-project-folder
```

Then run:

```
claude
```

On first launch, complete the initial setup:

1.  Choose your preferred theme (Enter)

2.  Acknowledge the safety notice (Enter)

3.  Use the default Terminal configuration (Enter)

4.  Trust the workspace directory (Enter)

You're ready to start coding! 🚀

## **Claude Code IDE Extensions**

After completing the CLI configuration above, install the Claude Code extension in your IDE to reuse the `settings.json` configuration directly.

### VS Code

1.  Search for `Claude Code for VS Code` in the Extensions Marketplace and install it.

    ![Claude Code VS Code Extension](https://cdnv2-cache.udelivrs.com/2026/06/603a340e6f8a23ef14aac0660a7a9440_1781261163287.png)

2.  Restart VS Code and click the icon in the top-right corner to open Claude Code.

3.  Type `/` in the chat box, select **General config**, then set the model under **Selected Model**.

### JetBrains

1.  Search for `Claude Code` in the Extensions Marketplace and install it.

2.  Restart the IDE and click the icon in the top-right corner to start using it.

## **Claude Code Desktop App**

1.  Install the Claude Code desktop app from the [Claude download page](https://claude.ai/download).

2.  In the top menu, go to **Help** → **Troubleshooting** → **Enable Developer Mode**. After restarting, a **Developer** menu appears at the top.

3.  Go to **Developer** → **Configure Third-Party Inference**, set **Connection** to **Gateway**, fill in the fields below, then click **Apply locally**:

    | **Field** | **Value** |
    | --- | --- |
    | Gateway base URL | `https://api-us-ca.umodelverse.ai` |
    | Gateway API key | Your UModelverse API Key |
    | Gateway auth scheme | bearer |
    | Model list | Model IDs must follow the Anthropic format, e.g. `claude-opus-4-8`. Leave empty to use the default model. Display name only affects the dropdown label. |

4.  Select your configured model from the model dropdown in the desktop app.

## **FAQ**

### After launching Claude Code, the interface shows "Unable to connect to Anthropic services. Failed to connect to api.anthropic.com: ERR\_BAD\_REQUEST"

This error means Claude Code is trying to reach the official Anthropic service instead of UModelverse. This is usually caused by environment variables not being configured correctly or not taking effect. Troubleshoot as follows:

1.  **Check the configuration.** Run `/status` after launching Claude Code and confirm that `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN` point to the UModelverse address. If the output is empty or points to a non-UModelverse address, check whether `settings.json` is correctly configured.

2.  **Reopen the terminal.** After modifying the configuration file, you must open a new terminal window and run `claude` again for the changes to take effect.
