---
title: Z.ai: GLM 4.6 API | Text Generation | ModelsLab
description: Advanced LLM with 357B parameters (32B active MoE), 204K context, 29.5 coding index, 80 tok/s speed for superior coding, reasoning.
url: https://modelslab.com/models/z-ai/z-ai-glm-4.6.md
canonical: https://modelslab.com/models/z-ai/z-ai-glm-4.6.md
type: product
component: Playground/LLM/Index
generated_at: 2026-06-03T20:23:06.004465Z
---

Z.ai: GLM 4.6
---

 [LLMs.txt](https://modelslab.com/models/open_router/z-ai-glm-4.6/llms.txt) [.md](https://modelslab.com/models/z-ai/z-ai-glm-4.6.md)

Z.ai: GLM 4.6
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### Z.ai: GLM 4.6

z-ai z-ai-glm-4.6

Copy model ID

PricingInput $0.43 / 1M tokens

Output $1.74 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[#### open\_router/Qwen: Qwen3 VL 30B A3B Thinking

qwen-qwen3-vl-30b-a3b-thinking

From $0.84/M tokens](https://modelslab.com/models/open_router/qwen-qwen3-vl-30b-a3b-thinking)

[#### open\_router/Anthropic: Claude Opus 4.7

anthropic-claude-opus-4.7

From $15.00/M tokens](https://modelslab.com/models/open_router/anthropic-claude-opus-4.7)

[#### open\_router/WizardLM-2 8x22B

microsoft-wizardlm-2-8x22b

From $0.62/M tokens](https://modelslab.com/models/open_router/microsoft-wizardlm-2-8x22b)

[#### open\_router/AionLabs: Aion-2.0

aion-labs-aion-2.0

From $1.20/M tokens](https://modelslab.com/models/open_router/aion-labs-aion-2.0)

[#### open\_router/DeepSeek: DeepSeek V3 0324

deepseek-deepseek-chat-v3-0324

From $0.48/M tokens](https://modelslab.com/models/open_router/deepseek-deepseek-chat-v3-0324)

[#### open\_router/Qwen: Qwen3.7 Max

qwen-qwen3.7-max

From $2.50/M tokens](https://modelslab.com/models/open_router/qwen-qwen3.7-max)

[#### open\_router/Anthropic: Claude Opus 4.7 (Fast)

anthropic-claude-opus-4.7-fast

From $90.00/M tokens](https://modelslab.com/models/open_router/anthropic-claude-opus-4.7-fast)

[#### open\_router/Qwen: Qwen3.5-9B

qwen-qwen3.5-9b

From $0.10/M tokens](https://modelslab.com/models/open_router/qwen-qwen3.5-9b)

[#### open\_router/LiquidAI: LFM2-24B-A2B

liquid-lfm-2-24b-a2b

From $0.07/M tokens](https://modelslab.com/models/open_router/liquid-lfm-2-24b-a2b)

[#### open\_router/Amazon: Nova Premier 1.0

amazon-nova-premier-v1

From $7.50/M tokens](https://modelslab.com/models/open_router/amazon-nova-premier-v1)

[#### open\_router/Qwen2.5 72B Instruct

qwen-qwen-2.5-72b-instruct

From $0.38/M tokens](https://modelslab.com/models/open_router/qwen-qwen-2.5-72b-instruct)

[#### meta/Meta Llama 3 70B Instruct Turbo

meta-llama-Meta-Llama-3-70B-Instruct-Turbo

From $0.88/M tokens](https://modelslab.com/models/meta/meta-llama-Meta-Llama-3-70B-Instruct-Turbo)

[#### open\_router/Qwen: Qwen3 VL 32B Instruct

qwen-qwen3-vl-32b-instruct

From $0.26/M tokens](https://modelslab.com/models/open_router/qwen-qwen3-vl-32b-instruct)

[#### nous\_research/Nous Hermes 2 Mixtral 8X7B Dpo

NousResearch-Nous-Hermes-2-Mixtral-8x7B-DPO

From $0.60/M tokens](https://modelslab.com/models/nous_research/NousResearch-Nous-Hermes-2-Mixtral-8x7B-DPO)

[#### open\_router/NVIDIA: Nemotron 3 Nano 30B A3B

nvidia-nemotron-3-nano-30b-a3b

From $0.13/M tokens](https://modelslab.com/models/open_router/nvidia-nemotron-3-nano-30b-a3b)

[#### open\_router/Qwen: Qwen3.7 Plus

qwen-qwen3.7-plus

From $1.00/M tokens](https://modelslab.com/models/open_router/qwen-qwen3.7-plus)

[#### open\_router/OpenAI: GPT-4o-mini

openai-gpt-4o-mini

From $0.38/M tokens](https://modelslab.com/models/open_router/openai-gpt-4o-mini)

[#### open\_router/Google: Nano Banana Pro (Gemini 3 Pro Image Preview)

google-gemini-3-pro-image-preview

From $7.00/M tokens](https://modelslab.com/models/open_router/google-gemini-3-pro-image-preview)

Open Source Alternatives
---

Explore open-source models that offer similar capabilities with full transparency and flexibility

 [View all open source models](https://modelslab.com/models?feature=llm&provider=open-source-models)

[MU](https://modelslab.com/models/modelslab/uncensored-chat)[ModelsLab](https://modelslab.com/models/modelslab)

 [Modelslab: Uncensored Chat

Open Source Model](https://modelslab.com/models/modelslab/uncensored-chat)

About Z.Ai: GLM 4.6
---

Compared with GLM-4.5, this generation brings several key improvements: Longer context window: The context window has been expanded from 128K to 200K tokens, enabling the model to handle more complex...

### Technical Specifications

Model IDz-ai-glm-4.6

CategoryLLM Models

TaskText Generation

Price$1.085 per million tokens

AddedFebruary 20, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate Z.Ai: GLM 4.6 into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "z-ai-glm-4.6",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

### Pricing

Z.Ai: GLM 4.6 API costs $1.085000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from Z Ai](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

Z.Ai: GLM 4.6 FAQ
---

### What is Z.Ai: GLM 4.6?

Compared with GLM-4.5, this generation brings several key improvements: Longer context window: The context window has been expanded from 128K to 200K tokens, enabling the model to handle more complex...

### How do I use the Z.Ai: GLM 4.6 API?

You can integrate Z.Ai: GLM 4.6 into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "z-ai-glm-4.6" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does Z.Ai: GLM 4.6 cost?

Z.Ai: GLM 4.6 costs $1.085000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the Z.Ai: GLM 4.6 model ID?

The model ID for Z.Ai: GLM 4.6 is "z-ai-glm-4.6". Use this ID in your API requests to specify this model.

### Does Z.Ai: GLM 4.6 have a free tier?

Yes, ModelsLab offers a free tier that lets you try Z.Ai: GLM 4.6 and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-06-04*