Skip to content

GLM 5.1

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

Per 1M tokens
$1.01 · $3.19
Context
205Ktokens
Supports
  • Calls tools
  • Thinks before it answers
opencode.json
{
  "provider": {
    "deference": {
      "npm": "@ai-sdk/openai-compatible",
      "options": { "baseURL": "https://deference.si/v1", "apiKey": "{env:DEFERENCE_API_KEY}" },
      "models": { "z-ai/glm-5.1": { "limit": { "context": 204800, "output": 128000 } } }
    }
  }
}
Needs an API keyGet one

Pricing and limits

  • Cache read$0.1884per 1M tokens
  • Max output128,000tokens

OpenRouter's price plus OpenRouter's 5% platform fee. Deference adds no markup.