# GLM-4.6

> GLM-4.6 achieves comprehensive enhancements in real-world coding, long-context processing, reasoning, searching, writing, and agentic applications. The context window has been expanded from 128K to 200K tokens with a 128K max output. Delivers stronger performance in tool use, search-based agents, and real-world coding benchmarks. Available via Z-AI API, DeepInfra, and Hugging Face.

**ID**: `z-ai/glm-4.6`  
**Creator**: Zhipu AI  
**Category**: text  
**Context**: 200K tokens  
**Pricing**: $0.14 / $0.28 per 1M · billed by your provider (BYOK)  
**Released**: 2025-10-01  
**Web page**: https://anyrouter.dev/model/z-ai/glm-4.6

**Input modalities**: text  
**Output modalities**: text  

**Tokenizer**: GLM

**Capabilities**: chat, reasoning, streaming, function-calling, coding, thinking

**Aliases**: `zai-org/GLM-4.6`

## Usage

**Endpoint**: `POST https://anyrouter.dev/api/v1/chat/completions`

```bash
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "z-ai/glm-4.6",
  "messages": [
    {
      "role": "user",
      "content": "Say hi in 3 words."
    }
  ]
}'
```

## Providers

| Provider | Input | Output |
| --- | --- | --- |
| aihubmix-byok | $0.14/M (list) | $0.28/M (list) |
| z-ai-byok | $0.14/M (list) | $0.28/M (list) |
| Z-AI Coding Plan | $0.14/M (list) | $0.28/M (list) |
| deepinfra-byok | $0.14/M (list) | $0.28/M (list) |
| huggingface-byok | $0.14/M (list) | $0.28/M (list) |
| cline-byok | $0.14/M (list) | $0.28/M (list) |

BYOK routes are billed by your own provider key — AnyRouter charges $0. Rates marked (list) are the provider's published list price.
