Overview

GLM-4-32B-0414-128K is a highly cost-effective foundation language model. It can efficiently perform complex tasks and has significantly enhanced capabilities in tool use, online search, and code-related intelligent tasks.

Price

$0.1 per million tokens

Input Modality

Text

Output Modality

Text

Context Length

128K

Maximum Output Tokens

16K

Usage

Resources

Introducting GLM-4-32B-0414-128K

GLM-4-32B-0414-128K was pre-trained on 15T of high-quality data, including abundant synthetic reasoning data to lay a solid foundation for subsequent reinforcement learning. In the post-training phase, besides aligning with human preferences in dialogue scenarios, we also applied techniques like rejection sampling and reinforcement learning to enhance instruction following, engineering code generation, and function calling, strengthening the model’s fundamental capabilities for intelligent tasks.The model performs comparably to much larger domestic and international mainstream models, with some benchmark indicators approaching or even exceeding models like GPT-4o and DeepSeek-V3-0324 (671B).

Capability

Streaming Output

Structured Output

Function Calling

Knowledge Base Retrieval

Web search

the search engine supports Jina AI, with a price of $0.01 per use.

Quick Start

Basic Call
curl -X POST "https://api.z.ai/api/paas/v4/chat/completions" \
     -H "Authorization: Bearer your-api-key" \
     -H "Content-Type: application/json" \
     -d '{
       "model": "glm-4-32b-0414-128k",
       "messages": [
         {
           "role": "user",
           "content": "As a marketing expert, please create an attractive slogan for my product."
         }
       ]
     }'
Streaming Call
curl -X POST "https://api.z.ai/api/paas/v4/chat/completions" \
     -H "Authorization: Bearer your-api-key" \
     -H "Content-Type: application/json" \
     -d '{
       "model": "glm-4-32b-0414-128k",
       "messages": [
         {
           "role": "user",
           "content": "As a marketing expert, please create an attractive slogan for my product."
         }
       ],
       "stream": true
     }'