> ## Documentation Index
> Fetch the complete documentation index at: https://friendli.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use GLM-5.2 with FriendliAI

> Use Z.ai's GLM-5.2 on FriendliAI. Review the model ID, context window, and pricing, then choose a feature to start building.

GLM-5.2 is Z.ai's flagship open-weight model. It's built for coding agents and long-horizon tasks. Its one-million-token context window can process an entire codebase in a single request. And you can balance response quality and cost by editing the model's reasoning parameters.

To use GLM-5.2, see the following model properties:

| Model Property    | Value             |
| ----------------- | ----------------- |
| Model ID          | `zai-org/GLM-5.2` |
| Input Modalities  | Text              |
| Output Modalities | Text              |
| Context Window    | 1,048,576 tokens  |
| Max Output        | 131,072 tokens    |

To estimate costs, see how tokens are priced:

| Pricing      | Cost per 1M tokens |
| ------------ | ------------------ |
| Input        | \$1.40             |
| Cached Input | \$0.26             |
| Output       | \$4.40             |

## Choose a Model Feature

Choose what you'd like to do with the model:

<Card title="Send Requests" icon="arrow-left-arrow-right" href="/docs/examples/models/zai-glm-5-2/send-requests">
  Connect to GLM-5.2 with the OpenAI-compatible Chat Completions API.
</Card>

<Card title="Control Reasoning" icon="brain" href="/docs/examples/models/zai-glm-5-2/control-reasoning">
  Edit GLM-5.2's reasoning parameters.
</Card>

## Other Resources

<CardGroup cols={3}>
  <Card title="FriendliAI Models" icon="https://mintcdn.com/friendliai/XeTFvlau9QViw0uB/static/images/model-providers/friendliai.svg?fit=max&auto=format&n=XeTFvlau9QViw0uB&q=85&s=466b0a104b441d83d3742ce60c8c2a99" href="https://friendli.ai/models/zai-org/GLM-5.2" width="16" height="16" data-path="static/images/model-providers/friendliai.svg" />

  <Card title="Z.ai Docs" icon="https://mintcdn.com/friendliai/XeTFvlau9QViw0uB/static/images/model-providers/zai.svg?fit=max&auto=format&n=XeTFvlau9QViw0uB&q=85&s=0e59d2daee9e670622fb06169d4e4750" href="https://docs.z.ai/guides/llm/glm-5.2" width="16" height="16" data-path="static/images/model-providers/zai.svg" />

  <Card title="Hugging Face Models" icon="https://mintcdn.com/friendliai/XeTFvlau9QViw0uB/static/images/model-providers/hugging-face.svg?fit=max&auto=format&n=XeTFvlau9QViw0uB&q=85&s=bc3d036a5f064b9b7b2087ca2528729a" href="https://huggingface.co/zai-org/GLM-5.2" width="16" height="16" data-path="static/images/model-providers/hugging-face.svg" />
</CardGroup>
