GLM-5.3
Connect to GLM-5.3 through the OpenAI Chat Completions compatible API.
GLM-5.3 uses HopBase's OpenAI Chat Completions compatible protocol. Use https://api.hop-base.com/v1 and set the model to glm-5.3.
GLM-5.3 is Zhipu's latest flagship: 1M context window with thinking-length control, served through the official direct channel.
Group selection and billing
- When creating an API key in the console, set the key's group to GLM 5.3 官方直连 (Official Direct). That key can then call
glm-5.3; your effective rate is shown in the signed-in model catalog. - One key is bound to one group. Keys bound to other groups get a clear 404 when calling
glm-5.3— create a new key on this group, or rebind an existing key in the console. glm-5.2remains available on the overseas GLM group (~55% of list); see the GLM-5.2 guide.
Client fields
| Field | Value |
|---|---|
| API address / Base URL | https://api.hop-base.com/v1 |
| API Key | sk-your-key |
| Model | glm-5.3 |
| API format | OpenAI Chat Completions (routing required) |
In Claude Code, CC Switch, and other clients that support routing, GLM-5.3 does not use the Anthropic protocol. In advanced settings, select OpenAI Chat Completions (routing required).
Use GLM-5.3 in Claude Code with CC Switch
Use CC Switch 3.17.0 or later. GLM-5.3 uses OpenAI Chat Completions, so CC Switch must translate requests through its local router into the Anthropic Messages protocol used by Claude Code.
Add a HopBase GLM provider
Open CC Switch, select the Claude Code tab, select + in the upper-right corner, then choose Custom configuration. Enter:
- Provider name:
HopBase GLM - API Key: your
sk-key - Request URL:
https://api.hop-base.com/v1
Set the API format and model mapping
Expand Advanced options, apply these settings, then save:
- API format: OpenAI Chat Completions (routing required)
- Authentication field: keep the default ANTHROPIC_AUTH_TOKEN
- Default fallback model:
glm-5.3
To force the Sonnet, Opus, and Haiku roles to use GLM-5.3, also map all three roles to glm-5.3. After saving, the provider card shows Routing required.
Enable local routing
Open Settings → Routing → Local routing. Enable the main routing switch, then enable Claude Code under application routing. Confirm the first-run message and leave CC Switch running in the background.
Enable and verify the provider
Return to the Claude Code provider list and select Enable on the HopBase GLM card. After enabling routing takeover for the first time, close and reopen the terminal, run claude, and send a short prompt.
Return to Settings → Routing. The setup works when Current Provider shows HopBase GLM and the request count increases. Once routing is active, later provider switches are hot-swapped without another terminal restart.
Codex CLI
# ~/.codex/config.toml
model_provider = "hopbase-glm"
model = "glm-5.3"
[model_providers.hopbase-glm]
name = "HopBase GLM"
base_url = "https://api.hop-base.com/v1"
wire_api = "chat"export OPENAI_API_KEY=sk-your-key
codexOpenAI SDK / Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.hop-base.com/v1",
api_key="sk-your-key",
)
resp = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Explain where GLM-5.3 works best"}],
)
print(resp.choices[0].message.content)curl
curl https://api.hop-base.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [{"role": "user", "content": "Hello, introduce yourself"}]
}'