# GLM 5.2 Fast

The same GLM-5.2 weights on faster inference infrastructure. GLM 5.2 Fast targets interactive agents and latency-sensitive products where response speed compounds across every step.

- **Model ID:** `zai/glm-5.2-fast`
- **Type:** chat
- **Providers:** baseten, alibaba
- **Context window:** 1,000,000
- **Maximum output tokens:** 128,000
- **Pricing:** $2.10/1M input tokens, $6.60/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/glm-5.2-fast

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'zai/glm-5.2-fast',
  prompt: 'Why is the sky blue?'
})
```

## About

GLM 5.2 Fast was released June 23, 2026 as the faster-serving variant of GLM-5.2, Z.AI's flagship model for long-horizon coding and agentic engineering. GLM 5.2 Fast runs the same underlying weights, so output quality matches the standard `glm-5.2` endpoint. The difference is the serving stack: providers behind GLM 5.2 Fast run inference infrastructure tuned for higher throughput, and AI Gateway publishes live throughput and latency metrics on this page.

Everything that defines GLM-5.2 carries over. You get the 1M tokens context window, thinking on or off per request, selectable reasoning effort, tool calling, structured output, streaming, and implicit caching. Agent loops benefit the most: when a task chains dozens of model calls, faster serving shortens every step, and the savings compound across the whole run.

Speed comes at a higher per-token rate than the standard endpoint, so most teams split traffic. Interactive and user-facing paths route to GLM 5.2 Fast, while batch and background jobs stay on `glm-5.2`. Both share the same API surface through AI Gateway, so switching is a one-line model identifier change. The AI SDK, Chat Completions API, Responses API, Messages API, and other API formats all work.

## What to consider

Quality is identical to `glm-5.2` because the weights are the same. Choose between the two on serving characteristics and cost, not capability. Check the live throughput and latency metrics on this page and on the `glm-5.2` page before committing traffic.

Per-token rates run higher than the standard endpoint. Route interactive, latency-sensitive paths here and keep batch or overnight jobs on `glm-5.2` to control spend.

Reasoning effort still applies. A high effort setting spends more tokens and time regardless of serving speed, so tune effort per task instead of relying on fast infrastructure to absorb deep deliberation.

## When to use

### Best For

- **Interactive coding agents** in editors and terminals where users wait on every response
- **Multi-step agent loops** chaining tool calls where per-step speed compounds across the run
- **User-facing AI products** that need GLM-5.2-class quality without long pauses
- **Rapid iteration workflows** with tight edit-test-fix cycles that keep developers in flow

### Consider Alternatives When

- Your jobs run in batch or the background. `glm-5.2` delivers identical output quality at lower per-token cost
- You run high-volume lightweight tasks. GLM-5-Turbo handles extraction and classification economically
- You need vision or GUI input. GLM-5V-Turbo adds screenshot and image understanding to the GLM-5 generation
- Cost efficiency is the priority. GLM-4.7-Flash covers simple prompts when GLM-5.2-class capability is unnecessary

## Best for

- **Interactive Coding Agents:** Editor and terminal agents where users wait on every response
- **Multi-Step Agent Loops:** Chained tool calls where per-step speed compounds across the run
- **User-Facing AI Products:** Chat and assistant features that need GLM-5.2-class quality without long pauses
- **Rapid Iteration Workflows:** Tight edit-test-fix cycles that keep developers in flow

## Consider alternatives

- **Batch or Background Jobs:** `glm-5.2` delivers identical output quality at lower per-token cost
- **High-Volume Lightweight Tasks:** GLM-5-Turbo handles extraction and classification workloads economically
- **Vision or GUI Input:** GLM-5V-Turbo adds screenshot and image understanding to the GLM-5 generation
- **Maximum Cost Efficiency:** GLM-4.7-Flash covers simple prompts when GLM-5.2-class capability is unnecessary

## Frequently asked questions

### How does GLM 5.2 Fast differ from GLM 5.2?

GLM 5.2 Fast runs the same weights as `glm-5.2` on inference infrastructure tuned for higher throughput, at different per-token rates. Output quality is identical; serving speed and price are the differences. See the live metrics on this page for current numbers.

### How fast is GLM 5.2 Fast?

Throughput varies by provider and load, so check the live throughput and latency metrics on this page for current numbers. Providers behind GLM 5.2 Fast run serving stacks tuned specifically for speed.

### What is the context window for GLM 5.2 Fast?

1M tokens.

### Can I switch between GLM 5.2 Fast and GLM 5.2?

Yes. Both share the same API surface through AI Gateway. Swap the model identifier between the two endpoints and nothing else in your integration needs to change.

### Does GLM 5.2 Fast support reasoning?

Yes. GLM 5.2 Fast inherits GLM-5.2's thinking toggle and reasoning effort levels, along with tool calling, structured output, and implicit caching.

### What is the pricing for GLM 5.2 Fast?

Check the pricing panel on this page for today's numbers. AI Gateway tracks rates across every provider that serves GLM 5.2 Fast.

### Does GLM 5.2 Fast support Zero Data Retention?

Yes, Zero Data Retention is available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

### How do I access GLM 5.2 Fast through AI Gateway?

Use the `zai/glm-5.2-fast` model identifier with your AI Gateway API key via the AI SDK, the Chat Completions API, the Responses API, the Messages API, or other API formats. No separate Z.AI account is needed. BYOK is also supported.

## Links

- [Model page](https://vercel.com/ai-gateway/models/glm-5.2-fast)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://www.baseten.co/library/glm-52-fast/)
- [Provider pricing](https://www.baseten.co/pricing/)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
