Zhipu AI

Zhipu AI

GLM 5.1

#1 SWE-Bench

Zhipu's prior frontier-open flagship on Kyma — superseded by GLM 5.2 but still available by model ID — built for agentic coding and long-horizon work that runs for hours, not turns.

Modalities

Text → Text

Input

$1.89 /1M

Output

$5.94 /1M

Cached input

$0.189 /1M90% off

Context

203K

Speed

medium

Performance

Live production data from real requests on Kyma — not synthetic benchmarks.

Rank

#19

of 87 active models

Tokens served

14.7M

all-time

Success rate

100%

last 7 days

Median throughput63 tok/s
Total requests992
Platform share0.6%
Tokens · last 15 daysJul 19Aug 2

Pricing

Pay per token. Cached input is billed at 10% of the input rate.

$1.89 /1M input$5.94 /1M output
Hobby10 req/day · 2K in / 500 out
~$2.03/mo
Production1,000 req/day · 2K in / 500 out
~$203/mo
Scale20,000 req/day · 2K in / 500 out
~$4,050/mo
+ Estimate your workload
1,000
2,000
500
30%

Estimated monthly cost

$172

$5.73 / day on GLM 5.1

Same workload on:

GLM 5.2$162-6%
GLM 4.5 Air$27.78-84%

Estimates use list pricing with cached input billed at the 90%-discount rate. Actual bills depend on real token counts — every response includes its exact cost.

When to use GLM 5.1

Updated 2026-06-10

Where this model earns its cost — and where it doesn't.

GLM 5.1 is the prior flagship of Zhipu's GLM line on Kyma and sits in the frontier-open quality tier. It is the #1 open-weight model on SWE-Bench Pro and built for long-horizon agentic runs that stretch to eight hours. If your workload is an agent that plans, edits, runs, and retries, this is the model that tier was made for. Its successor, GLM 5.2, is now the GLM flagship on Kyma.

On Kyma it has served production traffic at a 100% success rate, with coding agents Cline and OpenClaw as its top apps by token volume. Every call gets automatic failover if a serving path degrades, and prompt caching bills repeated prompt prefixes at 10% of the input rate — which matters for agents that resend the same long system prompt on every step.

The 203K-token context window holds a serious slice of a codebase plus the agent's working history, and the 64K max output leaves room for large diffs and long reasoning chains. Function calling, structured outputs, and extended reasoning are all supported, so it slots into existing agent frameworks without workarounds.

Autonomous coding agents

Its core design target — multi-step SWE tasks where the agent reads, edits, tests, and iterates across a repository for hours.

Long-horizon workflows

Eight-hour agentic runs are the headline capability; use it for jobs that need sustained planning rather than one-shot answers.

Complex reasoning

Extended reasoning mode works through debugging, architecture decisions, and multi-constraint planning before committing to an answer.

Tool-calling pipelines

Function calling plus structured outputs keep multi-step agent loops parseable and on schema, step after step.

Not ideal for: Image inputs (it's text-only) or latency-sensitive chat UX — it's a medium-speed, premium-priced model that earns its cost on deep agentic work, not quick interactive replies.

How it compares

Against the peers people actually weigh it against.

SpecGLM 5.1GLM 5.2GLM 4.5 Air
Input /1M$1.89$1.459$0.176
Output /1M$5.94$4.984$1.148
Context203K1M131K
ToolsYesYesYes
ReasoningYesYesYes
Speedmediummediumfast

Quick start

Up and running in under two minutes.

  1. 1

    Create an API key

    Sign up and grab a key from the dashboard — $0.50 free credit, no card required.

    Get API key →
  2. 2

    Make your first request

    Drop in your key and send a chat completion — fully OpenAI-compatible.

    curl https://kymaapi.com/v1/chat/completions \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "glm-5.1",
        "messages": [
          {"role": "user", "content": "Explain prompt caching in one paragraph."}
        ]
      }'
  3. 3

    Stream responses

    Add "stream": true to receive tokens as they arrive.

    curl https://kymaapi.com/v1/chat/completions \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "glm-5.1",
        "stream": true,
        "messages": [{"role": "user", "content": "Hello!"}]
      }'

FAQ

Common questions about this model.

What is the context window of GLM 5.1?

GLM 5.1 has a 203K-token context window — roughly 299 pages of text in a single request.

How much does the GLM 5.1 API cost?

$1.89 per 1M input tokens and $5.94 per 1M output tokens, with cached input at $0.189/1M — a 90% discount on repeated prompt prefixes. No subscription; you pay only for what you use.

Does GLM 5.1 support function calling?

Yes — GLM 5.1 supports tool/function calling and structured outputs (JSON mode), so it works with agent frameworks out of the box.

How do I use GLM 5.1?

Kyma is OpenAI-compatible: point your SDK's base URL at https://kymaapi.com/v1, use your Kyma API key, and set the model to glm-5.1. Signing up is free and includes $0.50 of credit — no card required.

Is GLM 5.1 good for agentic coding?

That's exactly what it's built for — SWE-style coding tasks and long-horizon agentic runs — and on Kyma its top apps are coding agents like Cline and OpenClaw. The 203K context plus 64K output means an agent can carry a large working state and still emit full diffs without truncation.

Should I use GLM 5.1 or GLM 5.2?

GLM 5.2 is the newer flagship — it has a larger context window and tops the open-weight Intelligence Index, and glm-flagship resolves to it. Reach for GLM 5.1 only when you want to pin this exact version; send its model ID directly. The X-Kyma-Model header on every response tells you exactly which model ran.

Why run GLM 5.1 through Kyma?

One API key and one OpenAI-compatible endpoint cover this and every other model on the platform. You get automatic failover when a serving path degrades, prompt caching at a 90% discount on repeated prefixes — a big deal for agents resending long system prompts — exact per-request cost in usage.cost, and $0.50 free credit to try it with no card.

Start with $0.50 free credit — no card required.Create account →

More models by Zhipu AI

ModelContextInputOutput
Zhipu AIGLM 5.21M$1.459$4.984
Zhipu AIGLM 4.7 Flash203K$0.081$0.54
Zhipu AIGLM 4.5 Air131K$0.176$1.148