> ## Documentation Index
> Fetch the complete documentation index at: https://liaobots.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate ClaudeCode

<img src="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/ClaudeCode/claudecode-icon.png?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=3f2f308258a619fd942e927eef45ea8d" alt="ClaudeCode" width="793" height="411" data-path="images/API/ClaudeCode/claudecode-icon.png" />

## Preparation

Claude Code billing method is synchronized with official. For price ratio, please refer to [Models & Pricing](/Aggregation/Model-Price). For API addresses and backup URLs, see [API Call Examples](/Getting-Started/en/API)

## Process

<Steps>
  <Step title="Step 1">
    <Card title="Verify Node.js Installation" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/ClaudeCode/step-1.png?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=b0fc3c368ebf529188afeb00fef69b94" width="2032" height="1330" data-path="images/API/ClaudeCode/step-1.png">
      Open terminal and enter `node --version` and `npm --version` to verify Node.js installation
      If you see a version number like `v22.16.0`, proceed to the next step. Otherwise, please download from the official website [https://nodejs.org/en/download/](https://nodejs.org/en/download/)
    </Card>
  </Step>

  <Step title="Step 2">
    <Card title="Install ClaudeCode" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/ClaudeCode/step-2.png?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=441de2eb4013e36354d83d86b9f9cea4" width="2032" height="1330" data-path="images/API/ClaudeCode/step-2.png">
      Open terminal and enter `npm install -g @anthropic-ai/claude-code` to install ClaudeCode globally
      If you see the prompt as shown in the image, it means installation is successful
    </Card>
  </Step>

  <Step title="Step 3">
    <Card title="Create Configuration File">
      Create the `~/.claude/settings.json` file with the following content, replace `Your Authcode` with your actual auth code:

      ```json theme={null}
      {
        "env": {
          "ANTHROPIC_AUTH_TOKEN": "Your Authcode",
          "ANTHROPIC_BASE_URL": "https://ai.liaobots.work/claudecode"
        },
        "hasCompletedOnboarding": true,
        "permissions": {
          "allow": [],
          "deny": []
        }
      }
      ```

      After saving, ClaudeCode is ready to work
    </Card>
  </Step>

  <Step title="Step 4">
    <Card title="Start ClaudeCode" img="https://mintcdn.com/liaobots/pAzQwH2vlz1d7UuQ/images/API/ClaudeCode/step-4.png?fit=max&auto=format&n=pAzQwH2vlz1d7UuQ&q=85&s=fc959db721fc58e651134969246af9d7" width="1068" height="672" data-path="images/API/ClaudeCode/step-4.png">
      Use the cd command to enter the project folder you want to edit, enter `claude` to start ClaudeCode, and then you can start chatting
    </Card>
  </Step>
</Steps>

## Switching Models (Claude / GLM-5.2)

This line currently supports Claude models and GLM-5.2. By default ClaudeCode uses Claude models. To switch to GLM-5.2, simply add `ANTHROPIC_MODEL` (main model) and `ANTHROPIC_SMALL_FAST_MODEL` (background lightweight tasks) to the `env` in `settings.json`:

```json theme={null}
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "Your Authcode",
    "ANTHROPIC_BASE_URL": "https://ai.liaobots.work/claudecode",
    "ANTHROPIC_MODEL": "glm-5.2",
    "ANTHROPIC_SMALL_FAST_MODEL": "glm-5.2"
  },
  "hasCompletedOnboarding": true,
  "permissions": {
    "allow": [],
    "deny": []
  }
}
```

<Note>
  `ANTHROPIC_SMALL_FAST_MODEL` is used for background lightweight tasks such as title generation; keep it the same as the main model, otherwise the background will still call the default Claude model. GLM-5.2 is billed at its own price, consistent with the main site — see [Models & Pricing](/Aggregation/Model-Price).
</Note>
