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

# GLM Coding Plan

## GLM Coding Plan

Choose a subscription plan to access Claude Code based on your location.

<Tabs>
  <Tab title="Global (except China)">
    Subscribe to [GLM Coding Plan](https://z.ai/subscribe) for a subscription that includes Claude Code.
    Edit the configuration file `~/.claude/settings.json` as follow:

    ```json theme={null}
    {
        "env": {
            "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
            "ANTHROPIC_AUTH_TOKEN": "<YOUR_GLM_API_KEY>",
            "API_TIMEOUT_MS": "3000000",
            "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1,
            "ANTHROPIC_MODEL": "GLM-4.7",
            "ANTHROPIC_DEFAULT_SONNET_MODEL": "GLM-4.7",
            "ANTHROPIC_DEFAULT_OPUS_MODEL": "GLM-4.7",
            "ANTHROPIC_DEFAULT_HAIKU_MODEL": "GLM-4.7",
            "CLAUDE_CODE_SUBAGENT_MODEL": "GLM-4.7"
        }
    }
    ```
  </Tab>

  <Tab title="China">
    Subscribe to [GLM Coding Plan - China](https://bigmodel.cn/glm-coding) for a subscription that includes Claude Code.
    Edit the configuration file `~/.claude/settings.json` as follow:

    ```json theme={null}
    {
        "env": {
            "ANTHROPIC_BASE_URL": "https://open.bigmodel.cn/api/anthropic",
            "ANTHROPIC_AUTH_TOKEN": "<YOUR_GLM_API_KEY>",
            "API_TIMEOUT_MS": "3000000",
            "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1,
            "ANTHROPIC_MODEL": "GLM-4.7",
            "ANTHROPIC_DEFAULT_SONNET_MODEL": "GLM-4.7",
            "ANTHROPIC_DEFAULT_OPUS_MODEL": "GLM-4.7",
            "ANTHROPIC_DEFAULT_HAIKU_MODEL": "GLM-4.7",
            "CLAUDE_CODE_SUBAGENT_MODEL": "GLM-4.7"
        }
    }
    ```
  </Tab>
</Tabs>

## References

* [https://docs.z.ai/devpack/tool/claude](https://docs.z.ai/devpack/tool/claude)
* [https://docs.bigmodel.cn/cn/coding-plan/tool/claude](https://docs.bigmodel.cn/cn/coding-plan/tool/claude)
