GLM model family documentation
GLM API: 5.4, 5.3, Flash & 4.6V rates and code
Call the GLM API on AngelAPI to access GLM 5.4, GLM 5.3, GLM 5.3 Flash, and multimodal GLM 4.6V from one prepaid key. Whether you are building bilingual Bahasa Melayu/English assistants, structured tool-use agents, or budget coding loops, GLM models offer massive 200K–1M context windows at transparent per-token rates.
Live GLM models, context windows, and multipliers
All four GLM endpoints listed below read attached images natively and offer cache-reduced coding estimates when connected to repetitive agent workflows:
| Model ID | Status | Context / Max out | Input mult (MYR / 1M) | Output mult (MYR / 1M) | Est. coding (MYR / 1M) |
|---|---|---|---|---|---|
glm-4.6v | online | 200K / 128K | ×2.8764 (RM0.322) | ×8.6291 (RM0.966) | ×1.3519 (RM0.151) |
glm-5.3 | online | 1M / 128K | ×1.245 (RM0.139) | ×3.9129 (RM0.438) | ×0.5708 (RM0.0639) |
glm-5.3-flash | online | 1M / 128K | ×0.2766 (RM0.0310) | ×0.922 (RM0.103) | ×0.1316 (RM0.0147) |
glm-5.4 | online | 1M / 128K | ×1.55 (RM0.174) | ×4.8715 (RM0.546) | ×0.9008 (RM0.101) |
Comparing GLM 5.3 Flash, 5.3, 5.4, and 4.6V
- GLM 5.3 Flash: Built for ultra-low-cost throughput at RM0.0310 per million input tokens with a full 1M context window.
- GLM 5.3 & GLM 5.4: Balanced general reasoning and coding models (up to 128K output), ideal as cost-conscious Claude Code alternatives (GLM 5.4 runs at RM0.101/1M est. coding tokens).
- GLM 4.6V (200K context): Specialized vision-language model tailored for UI screenshot analysis, OCR extraction, and document parsing.
Code examples: curl, Python, and Node.js
Want Malaysian DuitNow QR & FPX billing walkthroughs? Read our GLM API Malaysia payment and starter guide for ringgit checkout instructions. Below are drop-in API templates using standard OpenAI SDK headers:
curl https://api.angelapi.cc/v1/chat/completions \
-H "Authorization: Bearer $ANGELAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.6v",
"messages": [{"role": "user", "content": "Explain optimistic locking in SQL with one concise example."}]
}'from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.angelapi.cc/v1",
api_key=os.environ["ANGELAPI_KEY"],
)
response = client.chat.completions.create(
model="glm-4.6v",
messages=[{"role": "user", "content": "Explain optimistic locking in SQL with one concise example."}],
)
print(response.choices[0].message.content)const res = await fetch("https://api.angelapi.cc/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ANGELAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "glm-4.6v",
messages: [{ role: "user", content: "Explain optimistic locking in SQL with one concise example." }],
}),
})
const data = await res.json()
console.log(data.choices[0].message.content)Real GLM token math across MYR and USD packs
Because AngelAPI prices every prepaid pack linearly at RM0.112 per million base tokens (from 10M at RM1.12 to 1B at RM111.77), translating GLM multipliers into exact budget estimates is straightforward:
- GLM 5.3 Flash (×0.2766 in / ×0.922 out): Costs approximately RM0.0310 per million uncached input tokens and RM0.103 per million output tokens—or roughly RM0.0147 per million repeated coding-tool tokens.
- GLM 5.4 (×1.55 in / ×4.8715 out): Runs around RM0.174 per million input tokens and RM0.546 per million output tokens, with cached coding usage averaging near RM0.101/1M.
Structured outputs, CLI tooling, and workflow choices
Beyond single-turn chat completions, developers frequently wire GLM models into agentic coding loops and JSON extraction scripts. Because AngelAPI forwards standard OpenAI-compatible fields cleanly at https://api.angelapi.cc/v1/chat/completions alongside Anthropic Messages formatting at https://api.angelapi.cc, the exact same prepaid pack balance supports Python FastAPI services, TypeScript workers, OpenCode terminals, Cline inside VS Code, and Claude Code CLI sessions. When extracting structured invoice tables or bilingual English/Malay summaries from screenshots using glm-4.6v or glm-5.4, pass clear JSON schema instructions inside the system message and specify modest max_tokens bounds to minimize unnecessary output billing. Compare alternative routes in our Claude Code alternative guide or inspect live pricing formulas in AI API pricing.
Production reliability, vision routing, and troubleshooting
All four GLM variants read uploaded images natively, making them practical single-model choices for apps needing both structured JSON replies and invoice or screenshot analysis. Pair glm-4.6v with a secondary online model checked on model status for automated resilience, use explicit max_tokens bounds inside scripts, and compare packs anytime on Pricing. If requests fail with 401 or 402, verify your Bearer key header targets https://api.angelapi.cc/v1/chat/completions and check remaining balance inside your account dashboard.
Teams deploying GLM inside production API servers should also log per-request usage tokens alongside upstream model identifiers so latency or response quality regressions can be caught cleanly. Because GLM routes on AngelAPI follow standard OpenAI streaming frames via Server-Sent Events (stream: true), switching between GLM 5.3 Flash for responsive chat streams and GLM 5.4 for background document synthesis requires altering only the configured model string without rewriting client parsers or token-counting middleware.
Frequently asked questions
What is the cheapest GLM model for coding loops on AngelAPI?
GLM 5.3 Flash charges ×0.2766 input, ×0.922 output, and roughly ×0.1316 in repeated coding-tool context—under RM0.031 per million raw input tokens.
Which GLM model supports multimodal vision directly?
GLM 4.6V, GLM 5.3 Flash, GLM 5.3, and GLM 5.4 are verified for direct image input inside the gateway inventory.
Can I call GLM models using Malaysian Ringgit?
Yes. Follow our dedicated GLM Malaysia billing guide for DuitNow QR and FPX checkout steps in MYR.
Does GLM work inside Claude Code CLI and OpenCode?
Yes. Both OpenCode (/v1) and custom Anthropic-compatible CLI sessions work with AngelAPI keys when targeting live GLM model IDs.