GLM 5.1

by Z.ai

Zero data retention−31%
z-ai/glm-5.1
Input
$1.96/1M tokens
Output
$6.16/1M tokens
Context
205Ktokens
Max output
131Ktokens
Knows to
-
Released
7 Apr 2026

About

GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks.

Pricing

Input$1.96 from $1.26per 1M prompt tokens
Output$6.16 from $4.06per 1M generated tokens, reasoning included
Cached input$0.36per 1M tokens read back from the prompt cache

31% off right now. The provider is running a promotion, and the developer API bills what the provider actually charged for your call plus our flat markup, so it reaches your bill with nothing to claim. The “from” figure is the cheapest endpoint serving the model; which one answers is the provider’s routing decision, so treat it as a floor. Promotions can end at any time.

What a request costs

Typical requestEachPer 1,000
Short chat reply1,500 in · 400 out$0.0054$5.40
Question over a long document40,000 in · 800 out$0.083$83.33
Agent tool step20,000 in · 1,200 out$0.047$46.59

At the developer-API rate, before any provider promotion or prompt-cache saving. In the app, the model picker shows what a message costs on your plan before you send it.

Benchmarks

Coding55.8#81 of 167
Agentic23.9#64 of 137

Head-to-head rankings

  1. #2Data vizModel arenaElo 136667% wins
  2. #2SlidesAgent arenaElo 124554% wins
  3. #4spreadsheetAgent arenaElo 131572% wins
  4. #113DModel arenaElo 133663% wins
  5. #13pdfAgent arenaElo 121154% wins
  6. #19WebsitesModel arenaElo 129055% wins
  7. #19Game devAgent arenaElo 110949% wins
  8. #20UI componentsModel arenaElo 129255% wins
  9. #20Android appsAgent arenaElo 118352% wins
  10. #24SVGModel arenaElo 121455% wins

Scores from Artificial Analysis; bars are scaled to the best model on our list. Rankings from Design Arena head-to-head votes. Published by OpenRouter alongside its catalogue.

Call it from code

OpenAI-compatible: point any OpenAI SDK at https://api.privateer.pro/v1 and set model. Keys are created in the app under Settings.

cURL
curl https://api.privateer.pro/v1/chat/completions \
  -H "Authorization: Bearer $PRIVATEER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.1",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
Python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.privateer.pro/v1",
    api_key=os.environ["PRIVATEER_API_KEY"],
)
reply = client.chat.completions.create(
    model="z-ai/glm-5.1",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)
JavaScript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.privateer.pro/v1",
  apiKey: process.env.PRIVATEER_API_KEY,
});
const reply = await client.chat.completions.create({
  model: "z-ai/glm-5.1",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(reply.choices[0].message.content);

Parameters this model accepts

frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_ppresence_penaltyreasoningrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_p

API reference → · How API billing works →

Prices are USD at the developer-API rate, as of 9 Nov 2026, rebuilt daily from the providers’ live catalogues. ← All models