← All models
Online

GLM-5

Z.ai · OpenAI-compatible API

z-ai/glm-5

USD / 1M tokens

Input$0.89
Cached Input$0.11
Output$3.14
Context
200K
Tool Calling
✓
Reasoning
✓
Vision
✗
Streaming
✓
OpenAI-compatible API
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.iteracompute.com/v1",
    api_key=os.environ["ITERACOMPUTE_API_KEY"],
)
response = client.chat.completions.create(
    model="z-ai/glm-5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Catalog snapshot: 2026-10-16. Live prices have not been verified yet.

Overview

GLM-5 is available through the IteraCompute OpenAI-compatible API, with 200K context, streaming and reasoning.

Tasks and selection tradeoffs

System design review

Supply the constraints and ask for failure modes with testable mitigations.

Code generation trials

Generate one module against an existing interface and run its tests.

Task suggestions based on catalog features and price, not model quality benchmarks.

Choose your tool

Choose a model and tool for your task →

Model capabilities

Features available through this model interface. Updated October 16, 2026.

CapabilityModel developer documentationRoute test
Tool callingSupportedSupported
ReasoningSupportedSupported
Image inputText onlyText only
StreamingSupportedSupported
JSON mode (json_object)SupportedSupported

Context: 200K · Output limit: 128K

Model developer documentation

Set thinking controls per model. Use one control style per request.

For JSON responses, validate your application schema before use. Input and requested output share the context budget.

Pricing

Prices in USD per 1M tokens.

Input$0.89
Cached Input$0.11
Output$3.14

Example task: Review system constraints

Assume 16,000 aggregate input tokens and 2,000 billable output tokens across all calls. No cache hit.

16,000 × $0.89 / 1M + 2,000 × $3.14 / 1M = $0.020520

If usage actually reports 12,000 of those input tokens as cached, replace that portion at the cached-input rate ($0.11/1M): $0.011160. Cached tokens are part of total input, never added on top.

Illustrative calculation using the 2026-10-16 catalog snapshot. Include every agent call and retry, repeated history and billable reasoning output; settle against actual usage and current Console prices.

Usage limits

  • Input and requested maximum output share the context budget. Keep both within the model limits.
  • Split long workflows into bounded steps and handle tool errors and retries in your application.
  • Reasoning tokens are billable output. Reserve enough generation budget to obtain a final text reply.
  • View current availability and prices in the Console.

API parameters

Parameter / protocol fieldUsage
model / messagesUse the exact model ID and chat message list
stream=true / stream_options.include_usage=trueReceive SSE chunks, [DONE] and final usage
tools / tool_calls / role=toolDefine functions in tools, execute tool_calls and return results with role=tool
response_format.type=json_objectRequest valid JSON; validate the required structure in your application
reasoning_contentReasoning output is separate from the final reply and counts toward output usage
{"enable_thinking":false}Supported; use one thinking-control style per request
{"enable_thinking":true}Supported; use one thinking-control style per request

API

Base URL
https://api.iteracompute.com/v1
Endpoint
POST /v1/chat/completions
Model ID
z-ai/glm-5
Authentication
Authorization: Bearer ITERACOMPUTE_API_KEY

View Docs

FAQ

How do I use GLM-5 with the OpenAI SDK?

Set base_url to https://api.iteracompute.com/v1 and model to z-ai/glm-5. Authenticate with your IteraCompute API key.

What does GLM-5 cost?

See the pricing section for current input, cached-input and output rates in USD per 1M tokens. Check the refresh time before use.

What context length is available?

200K. Input and requested maximum output share the context budget.

Ready for your first request?

Create your key, choose a tool and get a non-empty first reply.