My App
Api reference

POST /v1/chat/completions

Create a chat completion with GLM 5.2 on Drise.

POST https://platform.drise.ai/v1/chat/completions

OpenAI-compatible chat completion endpoint. Returns a chat completion JSON response.

Headers

HeaderRequiredDescription
AuthorizationyesBearer <your_drise_key>
Content-Typeyesapplication/json

Body

FieldTypeRequiredDescription
modelstringyesOne of the Drise GLM 5.2 model IDs (see below).
messagesarrayyesOpenAI-style messages array.
streambooleannoSet to true for SSE streaming.
temperaturenumbernoSampling temperature.
max_tokensintegernoMaximum tokens to generate.

Model IDs

IDContextReasoning
drise-glm-5.21,000,000 tokensyes
drise-glm-5.2-fast1,000,000 tokensno
drise-glm-5.2-short200,000 tokensyes
drise-glm-5.2-short-fast200,000 tokensno
drise-visionGLM 5.2 with visionyes

All variants are FP8-quantised. See Models for the full breakdown.

Example request

curl https://platform.drise.ai/v1/chat/completions \
  -H "Authorization: Bearer $DRISE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "drise-glm-5.2",
    "messages": [
      {"role": "system", "content": "You are a helpful coding assistant."},
      {"role": "user", "content": "Write a Python function that reads a CSV file."}
    ]
  }'

For fast, no-reasoning throughput:

curl https://platform.drise.ai/v1/chat/completions \
  -H "Authorization: Bearer $DRISE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "drise-glm-5.2-fast",
    "messages": [{"role": "user", "content": "Summarise this file in 3 lines."}]
  }'

Example response

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "drise-glm-5.2",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "import csv\n..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 12, "completion_tokens": 48, "total_tokens": 60 }
}

See also Streaming, Models, and Errors.

On this page