# GLM-5 > An open-source foundation model from Z.ai for complex systems design and long-horizon agent workflows, served through RealRelay's OpenAI-compatible endpoint. ## Key facts - Model author: Z.ai - Input: $1.00 per 1M tokens - Output: $3.20 per 1M tokens - Cached input: $0.20 per 1M tokens - Context window: 200,000 tokens - Maximum output: 128,000 tokens - Input modalities: text - Output modalities: text - Capabilities: reasoning, structured_output, tools - Released: 2026-02-12 - Model IDs: `z-ai/glm-5` - Model page: https://www.realrelay.ai/model/z-ai/glm-5 ## Overview GLM-5 is an open-source foundation model from Z.ai, engineered for complex systems design and long-horizon agent workflows. It takes text in and returns text, and its weights are openly available. On RealRelay the model is called as z-ai/glm-5 through the OpenAI-compatible endpoint, so it fits into an existing OpenAI client setup. ## Capabilities GLM-5 accepts text input and returns text output. The context window is 200,000 tokens and the maximum output is 128,000 tokens. It supports reasoning, structured output and tool calling: a single request can reason over the prompt, invoke tools and return results in a defined structure. ## Pricing Input is $1.00 per 1M tokens and output is $3.20 per 1M tokens. Cached input reads are $0.20 per 1M tokens. Pricing is metered per 1M tokens, so the tokens a request sends and receives set the price of that request. ## Use cases Complex systems design work that needs reasoning across a long input, with a context window of 200,000 tokens. Long-horizon agent workflows where the model calls tools and returns structured output, with up to 128,000 output tokens per response. ## Call it OpenAI-compatible chat completions: ```bash curl https://www.realrelay.ai/v1/chat/completions \ -H "Authorization: Bearer $REALRELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "z-ai/glm-5", "messages": [{"role": "user", "content": "Hello"}]}' ``` ## FAQ ### What is GLM-5? GLM-5 is Z.ai's open-source foundation model, engineered for complex systems design and long-horizon agent workflows. It accepts text and returns text. ### How is GLM-5 priced? Input is $1.00 per 1M tokens and output is $3.20 per 1M tokens. Cached input reads are $0.20 per 1M tokens. ### What is the context window of GLM-5? The context window is 200,000 tokens and the maximum output is 128,000 tokens. ### What inputs and outputs does GLM-5 support? Text is the only input modality and text is the output modality. Requests and responses are text. ### Does GLM-5 support tool calling? It supports reasoning, structured output and tool calling, so a request can produce structured results and invoke tools. ### When was GLM-5 released? GLM-5 was released on February 12, 2026. ### How do I call GLM-5 through the API? Use the model ID z-ai/glm-5 on RealRelay's OpenAI-compatible endpoint with your existing OpenAI client code.