# GLM 4.7 Flash

The middle tier in Z.AI's GLM-4.7 lineup, positioned between the full GLM-4.7 and the ultra-fast GLM-4.7-FlashX. It brings the 4.7 generation's coding and tool-usage improvements to latency-sensitive production workloads.

- **Model ID:** `zai/glm-4.7-flash`
- **Type:** chat
- **Providers:** zai, bedrock
- **Context window:** 200,000
- **Maximum output tokens:** 131,000
- **Pricing:** $0.07/1M input tokens, $0.4/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/glm-4.7-flash

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

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

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

## About

GLM 4.7 Flash was released January 19, 2026 as the middle tier in Z.AI's GLM-4.7 generation, sitting between the full GLM-4.7 and the ultra-fast GLM-4.7-FlashX. It inherits the 4.7 generation's gains in coding assistance, tool usage, multi-step reasoning, and natural conversational tone while trading peak capability for faster inference.

The GLM-4.7 generation focused on closing coding and tool-use gaps with competing models. GLM 4.7 Flash carries those gains forward at a cost-and-latency profile that fits high-volume coding assistance, real-time chat, and production pipelines with strict response time budgets. If the full GLM-4.7 is too slow and GLM-4.7-FlashX strips too much capability, GLM 4.7 Flash is the compromise.

Through AI Gateway, switching between GLM-4.7 tiers requires only changing the model identifier. The API surface and request format stay the same.

## What to consider

GLM 4.7 Flash sits in the middle of the 4.7 generation. Test it against both GLM-4.7 (higher capability) and GLM-4.7-FlashX (higher speed) on your specific tasks to find the right tradeoff.

All GLM-4.7 variants share the same API. You can A/B test across tiers without changing your integration.

The reduced per-token cost makes GLM 4.7 Flash practical for high-volume deployments where GLM-4.7's per-request cost would be prohibitive.

## When to use

### Best For

- **High-volume coding assistance** where fast response times improve developer productivity across many concurrent sessions
- **Real-time conversational applications** that need the 4.7 generation's natural tone with latency under strict thresholds
- **Production API backends** processing high request volumes where cost per token directly impacts margins
- **Agentic pipelines** where most steps need good capability at speed, with the option to route complex steps to the full GLM-4.7
- **Interactive prototyping and development** where fast iteration cycles depend on quick model responses

### Consider Alternatives When

- Maximum capability on complex tasks is required. The full GLM-4.7 provides the deepest reasoning and coding quality
- You need the absolute fastest inference. GLM-4.7-FlashX offers the lowest latency in the 4.7 generation
- Vision capabilities are needed. Evaluate GLM-4.6V or GLM-4.5V for multimodal input
- Advanced reasoning with multiple thinking modes is the priority. GLM-5 provides multiple thinking modes and an expanded reasoning architecture

## Best for

- **High-volume coding assistance:** Fast response times improve developer productivity across many concurrent sessions
- **Real-time conversational applications:** The 4.7 generation's natural tone under strict latency thresholds
- **Production API backends:** High request volumes where cost per token directly impacts margins
- **Agentic pipelines:** Most steps need good capability at speed, with the option to route complex steps to the full GLM-4.7
- **Interactive prototyping and development:** Fast iteration cycles depend on quick model responses

## Consider alternatives

- **Maximum complex-task capability:** The full GLM-4.7 provides the deepest reasoning and coding quality
- **Absolute fastest inference:** GLM-4.7-FlashX offers the lowest latency in the 4.7 generation
- **Vision capabilities needed:** Evaluate GLM-4.6V or GLM-4.5V for multimodal input
- **Advanced reasoning modes:** GLM-5 provides multiple thinking modes and an expanded reasoning architecture

## Frequently asked questions

### How does GLM 4.7 Flash compare to the full GLM-4.7?

GLM 4.7 Flash shares the same foundational improvements (coding, tool usage, multi-step reasoning, natural tone) but is optimized for faster inference at lower cost. Peak capability on complex tasks will be lower than GLM-4.7.

### What is the difference between GLM 4.7 Flash and GLM-4.7-FlashX?

GLM 4.7 Flash provides more capability with moderate speed optimization. GLM-4.7-FlashX is the fastest tier in the generation, trading more capability for the lowest possible latency.

### Can I switch between GLM-4.7 variants easily?

Yes. All variants share the same API surface. Change the model identifier to switch between GLM-4.7, GLM-4.7-Flash, and GLM-4.7-FlashX.

### What is the context window for GLM 4.7 Flash?

200K tokens.

### How do I authenticate with GLM 4.7 Flash through AI Gateway?

AI Gateway provides a unified API key. No separate Z.AI account is needed. Use the model identifier to route requests. BYOK is supported for direct provider accounts.

### Is GLM 4.7 Flash suitable for frontend development?

Yes. It inherits the frontend development improvements from GLM-4.7, though the full GLM-4.7 may produce slightly better results on complex UI generation tasks.

### What is the pricing for GLM 4.7 Flash?

See the pricing section on this page for today's rates. AI Gateway exposes each provider's pricing for GLM 4.7 Flash.

## Links

- [Model page](https://vercel.com/ai-gateway/models/glm-4.7-flash)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.z.ai/guides/llm/glm-4.7#glm-4-7-flash)
- [Provider pricing](https://docs.z.ai/guides/overview/pricing)
