---
title: Z.ai: GLM 4.5 API | Text Generation | ModelsLab
description: Powerful open-source MoE LLM with 355B total/32B active params excels in reasoning, coding & agentic tasks; 131K context, hybrid modes, runs on 8x H100.
url: https://modelslab.com/models/z-ai/z-ai-glm-4.5.md
canonical: https://modelslab.com/models/z-ai/z-ai-glm-4.5.md
type: product
component: Playground/LLM/Index
generated_at: 2026-06-03T20:23:05.476620Z
---

Z.ai: GLM 4.5
---

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

Z.ai: GLM 4.5
---

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.5

z-ai z-ai-glm-4.5

Copy model ID

PricingInput $0.60 / 1M tokens

Output $2.20 / 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/ReMM SLERP 13B

undi95-remm-slerp-l2-13b

From $0.55/M tokens](https://modelslab.com/models/open_router/undi95-remm-slerp-l2-13b)

[#### 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/Amazon: Nova Micro 1.0

amazon-nova-micro-v1

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

[#### 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)

[#### openai/GPT 5.1

gpt5.1

From $5.63/M tokens](https://modelslab.com/models/openai/gpt5.1)

[#### open\_router/Z.ai: GLM 4.5 Air

z-ai-glm-4.5-air

From $0.49/M tokens](https://modelslab.com/models/open_router/z-ai-glm-4.5-air)

[#### open\_router/Cohere: Command R (08-2024)

cohere-command-r-08-2024

From $0.38/M tokens](https://modelslab.com/models/open_router/cohere-command-r-08-2024)

[#### open\_router/Google: Gemma 4 26B A4B 

google-gemma-4-26b-a4b-it

From $0.20/M tokens](https://modelslab.com/models/open_router/google-gemma-4-26b-a4b-it)

[#### open\_router/Meta: Llama Guard 4 12B

meta-llama-llama-guard-4-12b

From $0.18/M tokens](https://modelslab.com/models/open_router/meta-llama-llama-guard-4-12b)

[#### open\_router/Anthropic Claude Haiku Latest

anthropic-claude-haiku-latest

From $3.00/M tokens](https://modelslab.com/models/open_router/anthropic-claude-haiku-latest)

[#### modelslab/Modelslab: Uncensored Chat 

uncensored-chat

From $0.75/M tokens](https://modelslab.com/models/modelslab/uncensored-chat)

[#### open\_router/Google: Gemini 3.1 Flash Lite Preview

google-gemini-3.1-flash-lite-preview

From $0.88/M tokens](https://modelslab.com/models/open_router/google-gemini-3.1-flash-lite-preview)

[#### open\_router/Anthropic: Claude 3 Haiku

anthropic-claude-3-haiku

From $0.75/M tokens](https://modelslab.com/models/open_router/anthropic-claude-3-haiku)

[#### open\_router/Google: Gemini 2.5 Flash

google-gemini-2.5-flash

From $1.40/M tokens](https://modelslab.com/models/open_router/google-gemini-2.5-flash)

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

amazon-nova-pro-v1

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

[#### open\_router/Morph: Morph V3 Large

morph-morph-v3-large

From $1.40/M tokens](https://modelslab.com/models/open_router/morph-morph-v3-large)

[#### open\_router/Nex AGI: DeepSeek V3.1 Nex N1

nex-agi-deepseek-v3.1-nex-n1

From $0.32/M tokens](https://modelslab.com/models/open_router/nex-agi-deepseek-v3.1-nex-n1)

[#### open\_router/Mistral: Mistral Large 3 2512

mistralai-mistral-large-2512

From $1.00/M tokens](https://modelslab.com/models/open_router/mistralai-mistral-large-2512)

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.5
---

GLM-4.5 is our latest flagship foundation model, purpose-built for agent-based applications. It leverages a Mixture-of-Experts (MoE) architecture and supports a context length of up to 128k tokens. GLM-4.5 delivers significantly...

### Technical Specifications

Model IDz-ai-glm-4.5

CategoryLLM Models

TaskText Generation

Price$1.4 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.5 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.5",
        "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.5 API costs $1.400000 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.5 FAQ
---

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

GLM-4.5 is our latest flagship foundation model, purpose-built for agent-based applications. It leverages a Mixture-of-Experts (MoE) architecture and supports a context length of up to 128k tokens. GLM-4.5 delivers significantly...

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

You can integrate Z.Ai: GLM 4.5 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.5" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

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

Z.Ai: GLM 4.5 costs $1.400000 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.5 model ID?

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

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

Yes, ModelsLab offers a free tier that lets you try Z.Ai: GLM 4.5 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*