GLM 5

Models

Model details

Model
zai-org/GLM-5
Provider
baseten
API
openai-completions
Base URL
https://inference.baseten.co/v1
Input
text
Reasoning
Yes
Context window
202,800
Max tokens
202,800
Show configuration
{
  "providers": {
    "baseten": {
      "apiKey": "YOUR_API_KEY",
      "models": [
        {
          "id": "zai-org/GLM-5",
          "name": "GLM 5",
          "reasoning": true,
          "input": [
            "text"
          ],
          "thinkingLevelMap": {
            "off": "off",
            "minimal": null,
            "low": null,
            "medium": null,
            "high": "high",
            "xhigh": null,
            "max": null
          },
          "contextWindow": 202800,
          "maxTokens": 202800,
          "cost": {
            "input": 0.95,
            "output": 3.15,
            "cacheRead": 0.2,
            "cacheWrite": 0
          },
          "compat": {
            "supportsStrictMode": true,
            "supportsStore": false,
            "supportsDeveloperRole": false,
            "supportsReasoningEffort": false,
            "supportsUsageInStreaming": true,
            "maxTokensField": "max_tokens",
            "sendSessionAffinityHeaders": true,
            "supportsLongCacheRetention": false,
            "thinkingFormat": "baseten",
            "chatTemplateArgs": {
              "enable_thinking": {
                "$var": "thinking.enabled"
              }
            }
          }
        }
      ],
      "api": "openai-completions",
      "baseUrl": "https://inference.baseten.co/v1"
    }
  }
}

Pricing

USD per million tokens. A tier is selected from the total input tokens in each request and applies to that entire request.

Pricing rates for GLM 5
Request inputInputOutputCache readCache write
All requests$0.95$3.15$0.2$0

Session cost calculator

Estimate the requests made during an agent session. A user turn can make several model calls while using tools, so costs are calculated per model request.

Session shape
Rounded median shapes from recent Pi agent sessions.
Warm-request cache reuse
Effective token reuse combines partial hits and occasional complete misses.
Estimated session$0.00
Uncached input
—
Cache reads
—
Uncached prefixes
—
Cache writes
—
Output
—
Without caching
—

The first request starts cold unless marked otherwise. Output is billed separately from context growth because reasoning tokens are not always retained. This remains a directional estimate: providers differ in eligibility, rounding, and retention.

Compatibility flags

Effective values after applying Pi's API defaults and model overrides.

Effective compatibility flags for GLM 5
FeatureValue
supportsStoreNo
supportsDeveloperRoleNo
supportsReasoningEffortNo
supportsUsageInStreamingYes
maxTokensFieldmax_tokens
requiresToolResultNameNo
requiresAssistantAfterToolResultNo
requiresThinkingAsTextNo
requiresReasoningContentOnAssistantMessagesNo
thinkingFormatbaseten
openRouterRoutingEmpty
vercelGatewayRoutingEmpty
chatTemplateKwargsEmpty
zaiToolStreamNo
supportsStrictModeYes
cacheControlFormatNone
sendSessionAffinityHeadersYes
supportsLongCacheRetentionNo
chatTemplateArgs{"enable_thinking":{"$var":"thinking.enabled"}}