---
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-frontend-v2-927501783998.us-east4.run.app/models/z-ai/z-ai-glm-4.5/api.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/z-ai/z-ai-glm-4.5/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-13T09:44:33.304664Z
---

Z.ai: GLM 4.5
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-4.5/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/z-ai/z-ai-glm-4.5.md)

z-ai-glm-4.5 z-ai Closed Source Model $1.400000 / call

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-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/MiniMaxAI-MiniMax-M1-40k)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Minimax M1 40K

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/MiniMaxAI-MiniMax-M1-40k)

[OO](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-o3-deep-research)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: o3 Deep Research

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-o3-deep-research)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-m2.7)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [MiniMax: MiniMax M2.7

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-m2.7)

[Q3](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-3B-Instruct)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen2.5 3B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-3B-Instruct)

[Q1](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-1.5B-Instruct)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen2.5 1.5B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-1.5B-Instruct)

[US](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/upstage-solar-pro-3)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Upstage: Solar Pro 3

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/upstage-solar-pro-3)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4o-2024-11-20)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-4o (2024-11-20)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4o-2024-11-20)

[SL](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/sao10k-l3.1-euryale-70b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Sao10K: Llama 3.1 Euryale 70B v2.2

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/sao10k-l3.1-euryale-70b)

[N3](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nim-nvidia-llama-3.3-nemotron-super-49b-v1)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [nim/nvidia/llama-3.3-nemotron-super-49b-v1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nim-nvidia-llama-3.3-nemotron-super-49b-v1)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-5.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.1)

[DR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [DeepSeek R1 Distill Qwen 14B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B)

[OO](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-o3-mini-high)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: o3 Mini High

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-o3-mini-high)

[Q7](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen-2.5-72b-instruct)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen2.5 72B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen-2.5-72b-instruct)

[AA](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/aion-labs-aion-rp-llama-3.1-8b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [AionLabs: Aion-RP 1.0 (8B)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/aion-labs-aion-rp-llama-3.1-8b)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-coder)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3 Coder 480B A35B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-coder)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3.5-plus-20260420)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3.5 Plus 2026-04-20

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3.5-plus-20260420)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-235b-a22b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3 235B A22B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-235b-a22b)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/openai-gpt-oss-120b)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [OpenAI GPT-OSS 120B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/openai-gpt-oss-120b)

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.5CategoryLLM ModelsTaskText GenerationPrice$1.400000 per million tokensAddedFebruary 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-frontend-v2-927501783998.us-east4.run.app/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>
```

View the [full API documentation](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/z-ai/z-ai-glm-4.5/api) for SDKs, code examples in Python, JavaScript, and more.

### 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-frontend-v2-927501783998.us-east4.run.app/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-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Z Ai](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/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-05-13*