Back to models
Z.ai

GLM 5.1

glm-5.1
Z.ai203K context$0.88 / 1M tokens (input)$3.53 / 1M tokens (output)

GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. Unlike previous models built around minute-level interactions, GLM-5.1 can work independently and continuously on a single task for more than 8 hours, autonomously planning, executing, and improving itself throughout the process, ultimately delivering complete, engineering-grade results.

Total Context203K
Input Price$0.88
Output Price$3.53

Providers for GLM 5.1

AnyInt routes requests to the best providers that are able to handle your prompt size and parameters, with fallbacks to maximize uptime.

Z.ai
Total Context203K
Input Price$0.88
Output Price$3.53

Sample code and API for GLM 5.1

AnyInt generates a quickstart from this model's declared API operations, including complete polling flows for asynchronous media.

Create API key

Choose an operation and language that match this model.

ResponsesOpenAI compatible

Call the standard operation supported by this model.

/v1/responses
curl 'https://api.anyint.ai/v1/responses' \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -d '{
  "model": "glm-5.1",
  "input": "Describe a calm futuristic city at sunrise."
}'