Z.ai API by Z.ai (Zhipu AI)
API for GLM language, vision, image, video and speech models with built-in web search.
Model hosting and inference Official MCP server
+ Build a stack with Z.ai API Website Official pricing GitHub
Price
Free plan
then from $18/mo
Free tier
Yes
GLM-4.7-Flash, GLM-4.5-Flash and GLM-4.6V-Flash are free
SDK downloads
—
PyPI zai-sdk
Status
—
no public status page
Pricing
| Free tier | GLM-4.7-Flash, GLM-4.5-Flash and GLM-4.6V-Flash are free |
|---|---|
| Cheapest paid plan | $18 a month |
| Usage price | $0.15/1M input, $0.50/1M output (GLM-5.3-Flash); $1.4/1M input, $4.4/1M output (GLM-5.3); Web Search $0.01/use |
| Good to know | API is pay-per-token; the $18/month figure is the GLM Coding Plan subscription for coding tools. |
From the official pricing page, checked Oct 10, 2026. Prices change: confirm before you buy.
Use it from an agent
| MCP server | Official: @z_ai/mcp-server |
|---|---|
| PyPI | pip install zai-sdk |
Alternatives to Z.ai API
| API | Free | Price | SDK downloads / wk | GitHub stars | MCP |
|---|---|---|---|---|---|
| Fireworks Serverless inference API with per-token pricing for running open and proprietary models. |
— | per token for inference; per GPU second for on-demand deployments | — | — | |
| Replicate Run and deploy machine learning models with pay-per-use pricing for inference. |
— | Varies by model and hardware; examples: $0.04/output image,... | — | — | |
| AI21 API access to foundation models for text generation and chat tasks. |
$10 credits for 7 days | Free plan then $0.2 per 1M input tokens, $0.4 per 1M output tokens... |
— | — | |
| Baseten Deploy and run custom, fine-tuned, and open-source AI models with GPU compute. |
Free credits for new accounts | Free plan then Price per 1M tokens for Model APIs; price per minute for... |
— | — | |
| DeepInfra API for running various AI models including text generation, embeddings, image generation, and speech recognition. |
— | Per token pricing varies by model; e.g., $0.06 per 1M input tokens... | — | — | |
| Together AI API for inference on open-source and third-party language models, vision, audio, video, and embeddings. |
— | varies by model and task; e.g., $0.30 per 1M input tokens (MiniMax... | — | — |