Skip to content

GLM 5.4 ​

This page lists parameters from the ModelFold model catalog.

GLM-5.4 works with text and images in the same conversation. Send an image with a question about what it shows, or supply a function schema in tools. With stream enabled, read text from delta.content and assemble tool-call arguments before using them.

Overview ​

FieldValue
Model IDglm-5-4
Family slugglm-5-4
ModalityChat Models (chat)
EndpointPOST /v1/chat/completions

Request parameters ​

modelstringRequired
Use glm-5-4.
messagesarray<object>Required
Conversation messages, at least one.
  messages[].rolestringRequired
Allowedsystemuserassistant
  messages[].contentstringRequired
Message text. Vision models also accept a content array ({"type":"image_url","image_url":{"url":"data:image/png;base64,..."}}).
max_tokensintegerOptional
Maximum tokens to generate.
Default1024
temperaturenumberOptional
Randomness; higher is more varied.
top_pnumberOptional
Nucleus sampling; usually tune this or temperature, not both.

Request example ​

bash
export API_BASE="https://modelfold.ai/v1"
export MODELFOLD_API_KEY="mf-..."   # 在控制台 API Key 页面创建
curl -X POST "$API_BASE/chat/completions" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5-4","messages":[{"role":"user","content":"Explain what a diffusion model does in two sentences."}],"max_tokens":1536}'

ModelFold — one API for all the best AI models.