---
title: Z.ai: GLM 4.7 API | Text Generation | ModelsLab
description: 355B total / 32B activated MoE LLM with 205K context, excels in coding, multi-step reasoning, tool calling, and agent tasks for developers and complex.
url: https://modelslab.com/models/z-ai/z-ai-glm-4.7.md
canonical: https://modelslab.com/models/z-ai/z-ai-glm-4.7.md
type: product
component: Playground/LLM/Index
generated_at: 2026-06-03T20:23:07.512773Z
---

Z.ai: GLM 4.7
---

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

Z.ai: GLM 4.7
---

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

z-ai z-ai-glm-4.7

Copy model ID

PricingInput $0.40 / 1M tokens

Output $1.75 / 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/ByteDance Seed: Seed-2.0-Lite

bytedance-seed-seed-2.0-lite

From $1.13/M tokens](https://modelslab.com/models/open_router/bytedance-seed-seed-2.0-lite)

[#### open\_router/Magnum v4 72B

anthracite-org-magnum-v4-72b

From $4.00/M tokens](https://modelslab.com/models/open_router/anthracite-org-magnum-v4-72b)

[#### open\_router/Meta: Llama 4 Scout

meta-llama-llama-4-scout

From $0.19/M tokens](https://modelslab.com/models/open_router/meta-llama-llama-4-scout)

[#### open\_router/Qwen: Qwen Plus 0728

qwen-qwen-plus-2025-07-28

From $0.52/M tokens](https://modelslab.com/models/open_router/qwen-qwen-plus-2025-07-28)

[#### open\_router/DeepSeek: R1 Distill Llama 70B

deepseek-deepseek-r1-distill-llama-70b

From $0.75/M tokens](https://modelslab.com/models/open_router/deepseek-deepseek-r1-distill-llama-70b)

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

qwen-qwen3-max

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

[#### 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/Mistral: Mistral Small 4

mistralai-mistral-small-2603

From $0.38/M tokens](https://modelslab.com/models/open_router/mistralai-mistral-small-2603)

[#### open\_router/Z.ai: GLM 5

z-ai-glm-5

From $1.26/M tokens](https://modelslab.com/models/open_router/z-ai-glm-5)

[#### open\_router/OpenAI: GPT-4o (2024-11-20)

openai-gpt-4o-2024-11-20

From $6.25/M tokens](https://modelslab.com/models/open_router/openai-gpt-4o-2024-11-20)

[#### open\_router/NVIDIA: Nemotron 3 Super

nvidia-nemotron-3-super-120b-a12b

From $0.27/M tokens](https://modelslab.com/models/open_router/nvidia-nemotron-3-super-120b-a12b)

[#### open\_router/MiniMax: MiniMax M3

minimax-minimax-m3

From $0.75/M tokens](https://modelslab.com/models/open_router/minimax-minimax-m3)

[#### open\_router/Sao10k: Llama 3 Euryale 70B v2.1

sao10k-l3-euryale-70b

From $1.48/M tokens](https://modelslab.com/models/open_router/sao10k-l3-euryale-70b)

[#### open\_router/Mistral: Mistral Medium 3.1

mistralai-mistral-medium-3.1

From $1.20/M tokens](https://modelslab.com/models/open_router/mistralai-mistral-medium-3.1)

[#### open\_router/Qwen: Qwen3.5 397B A17B

qwen-qwen3.5-397b-a17b

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

[#### scb10x/Typhoon 2 70B Instruct

scb10x-scb10x-llama3-1-typhoon2-70b-instruct

From $1.06/M tokens](https://modelslab.com/models/scb10x/scb10x-scb10x-llama3-1-typhoon2-70b-instruct)

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

[#### open\_router/Qwen: Qwen3 Next 80B A3B Instruct

qwen-qwen3-next-80b-a3b-instruct

From $0.59/M tokens](https://modelslab.com/models/open_router/qwen-qwen3-next-80b-a3b-instruct)

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

GLM-4.7 is Z.ai’s latest flagship model, featuring upgrades in two key areas: enhanced programming capabilities and more stable multi-step reasoning/execution. It demonstrates significant improvements in executing complex agent tasks while...

### Technical Specifications

Model IDz-ai-glm-4.7

CategoryLLM Models

TaskText Generation

Price$1.075 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.7 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.7",
        "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.7 API costs $1.075000 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

[Learn more about Z.Ai: GLM 4.7](https://modelslab.com/zai-glm-47) [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.7 FAQ
---

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

GLM-4.7 is Z.ai’s latest flagship model, featuring upgrades in two key areas: enhanced programming capabilities and more stable multi-step reasoning/execution. It demonstrates significant improvements in executing complex agent tasks while...

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

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

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

Z.Ai: GLM 4.7 costs $1.075000 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.7 model ID?

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

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

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