GLM-4.5 API

zhipu/glm-4.5
GLM-4.5 by Zhipu AI is a high-capacity text-to-text language model featuring a massive 128,000-token context window.
Context
128K tokens
Input
$0.6 / 1M tokens
Output
$2.2 / 1M tokens
Released
Sep 9, 2025

Overview

Zhipu AI's GLM-4.5 is a versatile text-to-text large language model designed for diverse natural language processing tasks. Featuring a 128,000-token context window, it supports understanding and generating very long-form text with high coherence and contextual awareness.

‍

Technical Specification

Performance Benchmarks

  • Context Window: 128K tokens
  • Optimized for a wide range of text-to-text applications, including complex document understanding, summarization, and generation.

Performance Metrics

GLM-4.5 aims to close the gap by integrating diverse capabilities within a single framework. Across 12 benchmarks spanning agentic tasks (3), reasoning (7), and coding (2), GLM-4.5 achieves an overall third-place ranking. Its variant, GLM-4.5 Air, ranks sixth, showing competitive yet slightly lower results compared to top models from OpenAI, Anthropic, Google DeepMind, xAI, Alibaba, Moonshot, and DeepSeek.

__wf_reserved_inherit

Key Capabilities

  • Advanced Text Generation: Produces fluent, contextually relevant, and accurate longform text outputs.
  • Comprehensive Understanding: Strong grasp of semantics allowing for nuanced text manipulations such as summarization, paraphrasing, and dialogue.

API Pricing

  • Input: $0.78
  • Output: $2.86

Optimal Use Cases

  • Long-Form Content Creation: Books, reports, and articles requiring deep consistency over many tokens.
  • Complex Document Analysis: Legal texts, scientific papers, and business documents.
  • Conversational AI: Chatbots capable of maintaining long context and generating relevant replies.
  • Text Summarization and Transformation: Effective for generating abstracts, paraphrased content, and multi-turn dialogue synthesis.

Code Sample

‍

Comparison with Other Models

Vs. Claude 4 Sonnet: GLM-4.5 shows close performance in agentic coding and reasoning tasks but still has optimization potential compared to Claude Sonnet 4, which achieves excellent coding success and state-of-the-art reasoning outputs, often favored for autonomous multi-feature app development.

Vs. OpenAI GPT-4.5: GLM-4.5 ranks overall competitive with top models including GPT-4.5 in reasoning and agent benchmarks, though GPT-4.5 generally leads in raw task accuracy on some professional benchmarks like MMLU and AIME.

Vs. Qwen3-Coder and Kimi K2: GLM-4.5 dominates Qwen3-Coder with an 80.8% success rate and wins 53.9% of tasks against Kimi K2, highlighting its superior coding and agentic capabilities for complex programming scenarios.

Vs. Gemini 2.5 Pro: GLM-4.5 holds its ground on reasoning and coding benchmarks but detailed exact percentages are less public; Gemini 2.5 stands stronger in certain coding and reasoning tests but GLM-4.5 balances large context and agentic tools well.

‍

Limitations

The full GLM-4.5 model requires substantial computational resources and GPU memory, potentially limiting deployment feasibility for organizations with constrained infrastructure. The lighter GLM-4.5 Air variant addresses this but with fewer active parameters and slightly reduced capabilities.

Uptime and performance

  • Uptime (24h): 100%
  • Uptime (7d): 100%
  • Availability (24h): 100%
  • Error rate (24h): 0%

Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.

Use cases

  • Long-Form Content Creation: Books, reports, and articles requiring deep consistency over many tokens.
  • Complex Document Analysis: Legal texts, scientific papers, and business documents.
  • Conversational AI: Chatbots capable of maintaining long context and generating relevant replies.
  • Text Summarization and Transformation: Effective for generating abstracts, paraphrased content, and multi-turn dialogue synthesis.

‍

How to use GLM-4.5 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to zhipu/glm-4.5.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/chat/completions",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "zhipu/glm-4.5",
      "messages": [
        {
          "role": "user",
          "content": "Hello!"
        }
      ]
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "zhipu/glm-4.5",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"zhipu/glm-4.5","messages":[{"role":"user","content":"Hello!"}]}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

GLM-4.5 API Pricing

TypePrice
Input
$0.6 / 1M tokens
Output
$2.2 / 1M tokens
Cached input
$0.11 / 1M tokens

GLM-4.5 Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
Terminal-Bench
37.5%
Autonomous shell/terminal task completionSourceJuly 8, 2026
SWE-bench Verified
64.2%
Resolving verified real GitHub issuesSourceJuly 8, 2026
Intelligence
12.8
Composite score across standardised reasoning, knowledge and problem-solving evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026
Math
73.7
Composite score across standardised mathematics evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026

GLM-4.5 vs other models

ModelInputOutputContextBest for
GLM-4.5
This page
$0.6 / 1M tokens
$2.2 / 1M tokens
128K tokens
Reasoning + agents
$5 / 1M tokens
$30 / 1M tokens
1M tokens
Reasoning + agents
$2 / 1M tokens
$10 / 1M tokens
1M tokens
Balanced coding + agents
$3 / 1M tokens
$15 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$1.5 / 1M tokens
$9 / 1M tokens
1M tokens
Reasoning + agents

Frequently asked questions

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

GLM-4.5 takes text as input and returns text.

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

GLM-4.5 became available on September 9, 2025.

GLM-4.5 is priced at input $0.78 / 1M tokens, output $2.86 / 1M tokens, cached input $0.143 / 1M tokens.

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

GLM-4.5 was built by Zhipu AI.

Start building with GLM-4.5

Get API Key
1000+ models, one API.