GLM-5.1

Zhipu AIMCP Tool CallReasoning
zhipuai/glm-5.1Open Weights

Strong GLM coding model for agentic engineering, terminals, and repository generation

Benchmark Pricing$0.90 / 1M in$3.59 / 1M out$0.19 cache read
Context: 200,000 tokens•Max Output: 131,072 tokens•Released: 2026-04-07

TECHNICAL SPECIFICATIONS

Context Window200,000200K tokens
Max Output131,072131.1K tokens
LicenseOpen SourceSelf-hostable
Input Modalities
Text
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ GLM-5.1 natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 200,000 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

STANDARDIZED BENCHMARKS & EVALS

Artificial Analysis Coding Agent Indexaverage pass@1
52.7
SWE-Atlas Codebase QnApass@1
73.2
SWE-Bench Propass@1
19.8
Terminal-Benchpass@1
65.1

API CALL INVOCATION EXAMPLE

// Example: Calling GLM-5.1 via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ZHIPUAI_API_KEY,
});

const response = await client.chat.completions.create({
  model: "zhipuai/glm-5.1",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

15 providers
Zhipu AIglm-5.1
$0.90 / $3.59$0.19 cache
Cortecsglm-5.1
$1.38 / $4.35$0.35 cache
DInferenceglm-5.1
$1.25 / $3.89
NanoGPTz-ai/glm-5.1:thinking
$0.70 / $2.50$0.18 cache
GreenPTglm-5.1
$1.76 / $5.52
EBCloudGLM-5.1
$0.86 / $3.43
TokenGoz-ai/glm-5.1
$1.40 / $4.40$0.26 cache
Jalapeno CloudGLM-5.1
$1.38 / $4.40$0.26 cache
CrossModelz-ai/glm-5.1
$1.00 / $3.80$0.20 cache
Novita AIzai-org/glm-5.1
$1.38 / $4.40$0.26 cache
302.AIglm-5.1
$1.40 / $4.40$0.26 cache
LLM Gatewaynovita/glm-5.1
$1.38 / $4.40$0.26 cache
Friendlizai-org/GLM-5.1
$1.40 / $4.40$0.26 cache
Tempr Gatewayzai/glm-5.1
$1.40 / $4.40$0.26 cache
HPC-AIzai-org/glm-5.1
$0.61 / $2.46$0.13 cache

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.19 / 1M tokens, saving up to 78% on repetitive MCP tool definitions and system instructions.