# GLM 5.4

GLM-5.4 is Z.ai's flagship model and the first built on its Loop Transformer architecture, which runs a shared block of GLM-5 base layers for two passes to reason more deeply without adding parameters. It is built for coding and agentic work, accepts text and image input, and supports thinking mode, tool calling, structured output, and context caching with a 1M-token context window and up to 128K output tokens.

- **Model ID:** `zai/glm-5.4`
- **Type:** chat
- **Providers:** zai, baseten
- **Context window:** 1,048,576
- **Maximum output tokens:** 262,144
- **Pricing:** $1.4/1M input tokens, $4.4/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/zai/glm-5.4

## 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.4',
  prompt: 'Why is the sky blue?'
})
```

## Links

- [Model page](https://vercel.com/ai-gateway/models/zai/glm-5.4)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.z.ai/guides/llm/glm-5.4)
- [Provider pricing](https://docs.z.ai/guides/overview/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.
