# GLM 5.1

> #1 SWE-Bench Pro open-weight. 8-hour agentic runs.

Human version: https://kymaapi.com/models/glm-5.1
Live JSON: `GET https://kymaapi.com/v1/models` (no auth required)

## Facts

- **Model ID**: `glm-5.1` — pass this as `model` in the request body
- **Creator**: Zhipu AI
- **Released**: 2026-04-07
- **Context window**: 203K tokens
- **Max output**: 66K tokens per response — a hard ceiling, not a default
- **Price**: $1.89 in / $5.94 out per 1M, cached input 10%
- **Capabilities**: tools, reasoning, caching

## Call it

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

## Positioning

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.

## About

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.

## Use cases

- **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.

## Pick something else when

- You want the safest general-purpose default → `qwen-3.6-plus`
- You need multimodal agent behavior → `kimi-k2.6`
- You need the cheapest long-context option → `glm-4.7-flash`, `gemini-2.5-flash`
- You only need fast coding loops rather than long-horizon execution → `qwen-3-32b`

## See also

- All models: https://kymaapi.com/models.md
- Pricing: https://kymaapi.com/pricing.md
- Other models by Zhipu AI: https://kymaapi.com/models?q=Zhipu%20AI
