Z.ai · Text

OpenClaw x GLM

GLM models from Z.ai are MIT-licensed MoE LLMs spanning 128K–200K context. GLM-5.1 leads open-weight models on SWE-bench Pro. Through RunAPI they share a single API key with pay-as-you-go token billing, callable from the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages surfaces.

10 variants from $0.12 / 1M tokens Commercial OK

Prerequisite: npx runapi mcp install

Prompt

Prompt models

Use glm-4.5 when it matches the task: 355B / 32B active; 128K context; flagship open-weight MoE baseline.

You have access to RunAPI chat models for GLM.

Available GLM models:
- glm-4.5: 355B / 32B active; 128K context; flagship open-weight MoE baseline
  chat endpoints: /v1/chat/completions
- glm-4.5-air: Lighter GLM-4.5 tier for fast, lower-cost everyday work
  chat endpoints: /v1/chat/completions
- glm-4.6: 200K context; first GLM on Cambricon chips; sharper code generation
  chat endpoints: /v1/chat/completions
- glm-4.7: 200K context; 73.8% SWE-bench; persistent thinking across turns
  chat endpoints: /v1/chat/completions
- glm-5: 744B / 40B active; 200K context; 77.8% SWE-bench Verified
  chat endpoints: /v1/chat/completions
- glm-5-turbo: Speed-optimized GLM-5 tier for lower latency
  chat endpoints: /v1/chat/completions
- glm-5.1: 754B / 40B active; 58.4% SWE-bench Pro — top open-weight score
  chat endpoints: /v1/chat/completions
- glm-5.2: Current flagship foundation model for text generation
  chat endpoints: /v1/chat/completions
- glm-5.3: Latest GLM text model for OpenAI-compatible Chat Completions
  chat endpoints: /v1/chat/completions
- glm-5.3-flash: Lower-cost GLM-5.3 tier; 1M context, always-on thinking; text requests through OpenAI and Anthropic SDKs
  chat endpoints: /v1/chat/completions

Use the model ID and chat endpoint that match the user's request.
Example request: Read this multi-file repository, find the failing integration test, and propose a patch with an explanation of the root cause.
Verify the active model with: openclaw models status;openclaw models set runapi/<model-id>

Public Versions and Endpoints

Model ID Endpoints Price Catalog
glm-4.5
/v1/chat/completions
$0.48 / 1M tokens Model detail
glm-4.5-air
/v1/chat/completions
$0.16 / 1M tokens Model detail
glm-4.6
/v1/chat/completions
$0.48 / 1M tokens Model detail
glm-4.7
/v1/chat/completions
$0.48 / 1M tokens Model detail
glm-5
/v1/chat/completions
$0.80 / 1M tokens Model detail
glm-5-turbo
/v1/chat/completions
$0.96 / 1M tokens Model detail
glm-5.1
/v1/chat/completions
$1.12 / 1M tokens Model detail
glm-5.2
/v1/chat/completions
$1.12 / 1M tokens Model detail
glm-5.3
/v1/chat/completions
$1.12 / 1M tokens Model detail
glm-5.3-flash
/v1/chat/completions
$0.12 / 1M tokens Model detail

Verify

Poll until the task reaches a terminal status

Select <model-id> to generate verification commands.

Configuration

Guide endpoint: <endpoint>

Select <model-id> to generate a request with the endpoint's public input contract.
How it works

Get Started in 3 Steps

  1. Choose a model ID

    Select a public catalog model ID and review its endpoint and current starting price.

  2. Configure RunAPI

    Add the provider configuration for this agent.

  3. Verify the result

    Run the agent status and model-selection commands shown below.

What to Build with OpenClaw + GLM

  • Agent coding and reasoning

    Let your agent plan, write, and review code or work through multi-step problems with the model's reasoning.

  • Long document analysis and extraction

    Summarize reports, contracts, or codebases and pull structured fields out of long documents.

  • Tool-calling workflows

    Connect the model to functions and APIs so your agent can look up data and take actions between replies.

Why Use GLM Through RunAPI + OpenClaw

  • 10 variants, one API key

    Use one RunAPI connection to choose among the live model variants without changing your integration.

  • Clear usage pricing

    See current catalog pricing before you send a request, with no subscription or minimum spend required.

  • Direct responses

    Synchronous calls return the result in the same response, so your agent can use it immediately without task polling.

OpenClaw + GLM Questions

What are the GLM models good at?

Coding and agentic tool use. GLM-5.1 leads open-weight models on SWE-bench Pro (58.4%) and scores 95.3% on AIME 2026. The full line is strong at multi-step tool calling, code generation across large codebases, and mathematical reasoning.

What is the difference between glm-4.5 and glm-4.5-air?

glm-4.5 is the 355B flagship (32B active parameters) with 128K context; glm-4.5-air is a lighter 106B MoE (12B active) for faster, lower-cost everyday work.

How does GLM-5 compare to GLM-4.7?

GLM-5 scales to 744B total / 40B active with 256 experts, versus GLM-4.7's 358B / 32B. SWE-bench Verified jumps from 73.8% to 77.8%. Both share 200K context.

Which SDKs can call GLM through RunAPI?

Point the OpenAI SDK (Chat Completions or Responses) or the Anthropic Messages SDK at RunAPI and pass the GLM model id; the proxy adapts the protocol for you.

How is GLM billed?

Per token, pay-as-you-go, at RunAPI's published input and output rates for each GLM model — no subscription.

Which model ID should I use?

Choose a public model ID from the version table. Each ID exposes the endpoints shown for that version.

Does this guide configure a chat model?

Yes. This Model Line supports a client-facing LLM protocol.

Start using GLM with OpenClaw

Building with a team?

We're here to help with enterprise setup, integrations, and technical questions.

Contact Us