nexusflow
Online
Zhipu AI / GLM

GLM Series Models API

Zhipu AI GLM series large models offer strong Chinese understanding and excellent overall capability. GLM text-type models can be called via OpenAI Chat Completions, Anthropic Messages, and Gemini-compatible GenerateContent — three public protocols.

POSThttps://nexusflow.vip/v1/chat/completions

This is the default example endpoint. For multi-protocol invocation methods, see Multi-Protocol Support, Anthropic Messages and Gemini-compatible.

Model List

Model IDDescriptionContextInput / 1M tokensOutput / 1M tokens
glm-5.1GLM-5.1 Enhanced flagship131K$6$24
glm-5GLM-5 flagship model131K$4$18
glm-4.7GLM-4.7 general-purpose model131K$3$14

Request Example

curl https://nexusflow.vip/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5",
    "messages": [
      {"role": "user", "content": "Explain the principles of quantum entanglement"}
    ],
    "stream": true
  }'

Three Protocol cURL Examples

GLM text-type models share the same NexusFlow model ID, API key, balance, usage, and billing records.

OpenAI Chat Completions/v1/chat/completions
curl -X POST 'https://nexusflow.vip/v1/chat/completions' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.1",
    "messages": [
      {"role": "user", "content": "Only reply OK"}
    ],
    "max_tokens": 8
  }'
Anthropic Messages/v1/messages
curl -X POST 'https://nexusflow.vip/v1/messages' \
  -H "x-api-key: $API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.1",
    "max_tokens": 8,
    "messages": [
      {"role": "user", "content": "Only reply OK"}
    ]
  }'
Gemini-compatible GenerateContent/v1beta/models/glm-5.1:generateContent
curl -X POST 'https://nexusflow.vip/v1beta/models/glm-5.1:generateContent' \
  -H "x-goog-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "Only reply OK"}]
      }
    ],
    "generationConfig": {
      "maxOutputTokens": 8
    }
  }'
Chat Completions
View full Chat API documentation
Quick Start
5-minute integration guide
Full Pricing
View pricing for all models