API Endpoints
POST
/v1/chat/completions
OpenAI-compatible chat (stream / non-stream, tool calling)
GET
/v1/models
Available model list
POST
/features
Toggle webSearch, thinking, imageGen, previewMode, persistHistory
POST
/prompt
Legacy: single text prompt
POST
/admin/session/clear
Clear all session history
GET
/status
Z.AI session status (public)
GET
/admin/health
Health check (public)
Test the OpenAI Endpoint
# Non-streaming
curl -X POST http://glm.fengcun.qzz.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer d3vin" \
-d '{"model":"glm-4.7","messages":[{"role":"user","content":"Hello!"}],"stream":false}'
# Streaming
curl -N -X POST http://glm.fengcun.qzz.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer d3vin" \
-d '{"model":"glm-4.7","stream":true,"messages":[{"role":"user","content":"Say hi"}]}'