GLM API Pricing Calculator
Estimate your monthly and annual Zhipu AI GLM API costs based on token volume, model tier, context length, and workload type. Built for developers working with GLM-4, GLM-4-Flash, GLM-4-Long, and multimodal GLM models.
Estimate Your GLM API Cost
Configure your expected monthly usage below
Ideal balance of speed and capability for most everyday developer and application workloads.
Affects estimated input token volume per request.
Your prompts, system messages, conversation history, and documents sent to the API.
Text, code, or answers generated by the GLM model in response.
Enable if using GLM-4V for image understanding, visual Q&A, or OCR tasks.
Used to calculate average cost per API call.
Cost Estimate
Monthly & annual GLM API spend
Select your GLM model, configure your expected token volumes, and click Calculate to see your estimated API cost.
GLM-4 Model Rates & Specs
Indicative per-token rates and specifications for Zhipu AI GLM API model tiers in 2026. All prices in USD per million tokens (MTok).
| Model | Input ($/MTok) | Output ($/MTok) | Context Window | Best For |
|---|---|---|---|---|
| GLM-4-Flash | $0.01 | $0.01 | 128K tokens | High-volume automation, simple completions |
| GLM-4-Air | $0.14 | $0.14 | 128K tokens | Everyday apps, chat, code review, RAG |
| GLM-4 | $1.00 | $1.00 | 128K tokens | Complex reasoning, bilingual tasks |
| GLM-4-Long | $0.14 | $0.14 | Up to 1M tokens | Full document analysis, large codebase context |
| GLM-4V (Vision) | $0.50 | $0.50 | 8K tokens | Image understanding, visual Q&A, OCR |
* Rates are indicative estimates for planning purposes. Refer to the official Zhipu AI open platform for current confirmed pricing.
GLM API Pricing FAQ
Everything developers need to know about GLM API costs, token usage, and model selection for 2026.
The GLM API is provided by Zhipu AI and gives developers access to the GLM-4 family of large language models. GLM models are optimised for bilingual Chinese–English tasks including reasoning, code generation, long-context understanding, and multimodal inputs. The API follows an OpenAI-compatible interface, making integration straightforward for existing projects.
Costs are based on the total number of tokens processed per request — both input tokens (your prompt, system message, and context) and output tokens (the model’s generated response). Rates are denominated per million tokens (MTok) and vary by model tier. Unlike some providers, GLM models often apply the same rate for input and output tokens, making cost estimation more straightforward.
Zhipu AI offers several GLM model tiers: GLM-4-Flash for lightweight and high-throughput tasks, GLM-4-Air for balanced everyday use, GLM-4 for advanced reasoning and complex bilingual tasks, GLM-4-Long for extended context windows up to 1M tokens, and GLM-4V for multimodal image-plus-text tasks. Each tier targets a different cost-capability tradeoff.
A token is roughly 3–4 characters of English text or approximately 1.5–2 Chinese characters. One thousand tokens is approximately 750 English words. Because GLM is optimised for Chinese and English, token counts for Chinese text are slightly higher per character than for English. Plan your budgets with this in mind if your workload is primarily Chinese-language.
Yes. GLM-4-Long supports context windows up to 1 million tokens, making it suitable for full document analysis, entire codebase context, or very long conversation histories. GLM-4, GLM-4-Air, and GLM-4-Flash each support up to 128K tokens. Longer context inputs naturally increase per-request token costs, so use the extended context tier only when the task genuinely requires it.
Key strategies: 1) Route high-volume, simple tasks to GLM-4-Flash, the lowest-cost tier. 2) Keep system prompts concise and avoid duplicating context across requests. 3) Set max_tokens to cap output length. 4) For chat applications, truncate conversation history to only the most recent relevant turns. 5) Use GLM-4-Long only when extended context is genuinely needed. 6) Batch requests where the API allows.
Zhipu AI typically offers free trial credits for new API accounts, and GLM-4-Flash has historically been available at a near-zero rate for low-volume usage. Free tier terms and limits change frequently — always refer to the official Zhipu AI open platform for the latest free quota and trial credit information.
Yes. GLM-4V supports image inputs alongside text, enabling tasks such as image understanding, visual question answering, diagram analysis, and OCR-style extraction. Multimodal requests carry additional token costs based on image content. If your workload is text-only, standard GLM-4 tiers are more cost-effective.
