GLM-5 API

GLM-5 is Zhipu AI next-generation 745B MoE LLM for high-quality text generation and reasoning, optimized for chat, long-form content, and instruction-following tasks.

Modalities
TextText
In / Out price
$1/$3.2per 1M
Context window
200K tokens
Released
Feb 12, 2026

GLM-5 overview

GLM-5 by Zhipu AI

Designed to power modern AI products, GLM-5 API delivers strong performance across text generation, structured outputs, code understanding, and complex analytical tasks.

GLM-5 specs

Model ID
zhipu/glm-5
Developer
Zhipu AI
Context window
200,000 tokens
Max output
128,000 tokens
Input
Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

What Is GLM-5?

GLM-5 is an advanced LLM developed to support complex reasoning, long-context understanding, and multilingual text generation. It combines deep semantic comprehension with strong instruction following, enabling developers to build reliable AI assistants, automation workflows, coding copilots, and knowledge systems. The model is optimized for both conversational AI and structured outputs, making it suitable for chat interfaces, data extraction pipelines, agentic systems, and enterprise integrations.

Performance and Reliability

GLM-5 is optimized for stable inference and predictable behavior in production environments. It demonstrates strong instruction adherence, reduced hallucination patterns compared to earlier-generation models, and improved contextual retention in extended conversations.

Advanced Reasoning and Structured Output

GLM-5 is built to handle analytical tasks, multi-step reasoning, and structured data generation. It can reliably produce JSON outputs, formatted reports, and schema-aligned responses, making it ideal for backend integrations and automation tools.

Long Context Understanding

GLM-5 supports extended context windows, allowing it to process large documents, maintain conversation continuity, and reason over complex multi-paragraph inputs. This makes it well-suited for research assistants, legal document analysis, and enterprise knowledge management systems.

Code Generation and Technical Tasks

GLM-5 performs effectively in code completion, debugging assistance, and technical documentation generation. It supports modern programming workflows and can be integrated into developer tools, CI/CD pipelines, and AI-powered IDE assistants.

AI-Driven Content Generation

Create high-quality blog posts, technical documentation, marketing copy, and multilingual content with strong consistency and structure.

Use cases

GLM-5 is documented as suited to complex systems engineering and long-horizon agentic tasks. It is also described as strong for real-world coding and end-to-end software development tasks.

The model is documented for building agentic applications that use native tool calling, function execution, and long-horizon task planning. It is also suited to office workflows that require stable completion of complex, multi-step tasks across stages.

GLM-5 is documented for roleplay, with support for maintaining character settings consistently over time. It is also documented for text data extraction from complex documents such as contracts, announcements, and financial reports.

Capabilities

  • Function calling
  • Streaming
  • Structured outputs
  • Reasoning

GLM-5 benchmarks by Artificial Analysis

See how GLM-5 compares in generation speed and latency. Data retrieved Nov 3, 2026.

Speed

Output tokens / second

Benchmark results

Compare 13 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

GLM-5 API pricing

GLM-5 pricing in US dollars
UsagePriceUnit
Input$11M tokens
Output$3.21M tokens
Cached input$0.21M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

GLM-5 vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
GLM-5$1$3.2
GLM-5.3-Flash$0.15$0.5
GLM 5.3 FlashX$0.37$1.25
GLM-5.3$1.4$4.4
GLM 5.2 Fast Preview$3.5$11

How to use the GLM-5 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "zhipu/glm-5",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

GLM-5 FAQ

What is the context window of GLM-5?

GLM-5 has a 200,000 tokens context window and can return up to 128,000 tokens.

What inputs and outputs does GLM-5 support?

GLM-5 takes text as input and returns text.

What is the model ID for GLM-5?

Use zhipu/glm-5 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

When was GLM-5 released?

GLM-5 became available on February 12, 2026.

How much does GLM-5 cost?

GLM-5 costs $1 input and $3.2 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does GLM-5 support streaming?

Yes, GLM-5 can stream responses as they are generated.

Who created GLM-5?

GLM-5 was built by Zhipu AI.

How many parameters does GLM-5 have?

GLM-5 is a 745B parameter mixture-of-experts (MoE) model.

Start building with GLM-5

GLM-5 API

zhipu/glm-5

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "zhipu/glm-5",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'