What is the GLM API and how do I use it?
The GLM API is Z.ai’s API for its GLM models: a key is created at z.ai/manage-apikey/apikey-list, and the base URL is https://api.z.ai/api/paas/v4/. The same models are also served through MartLLM’s OpenAI-compatible API at https://api.martllm.com/v1: on November 20, 2026, 17 GLM models were taking requests there. Z.ai: GLM 5.3 FlashX cost $0.0407 per million input tokens and $0.1375 per million output tokens. A request that fails is not billed. Credit is prepaid, from $5, with no subscription.
Prices as of November 20, 2026, 11:00 UTC. This page is rebuilt every hour.