glm-5.3

Chat

From Z.AI, supports Chat and more—call it via the standard API.

Giá đầu vào

$1.0682Giảm 10%

Thị trường: $1.1869

/ M

Giá đầu ra

$3.7389Giảm 10%

Thị trường: $4.1543

/ M

Đọc cache

$0.2671Giảm 10%

Thị trường: $0.2968

/ M

Đầu vào

Văn bản

Đầu ra

Văn bản

API

Bắt đầu nhanh

Mã sẵn sàng để gọi mô hình này qua API tương thích OpenAI của EasyAPI.

1

Lấy API key

Tạo API token trong console và đặt làm biến môi trường:

Thay sk-xxxxxxxx bằng mã API từ console (Bearer Token).

Tạo API token
shell
export EASYAPI_API_KEY=sk-xxxxxxxx
2

Gửi yêu cầu đầu tiên

Dùng zai/glm-5.3 với API EasyAPI:

cURL
curl https://token.easyapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EASYAPI_API_KEY" \
  -d '{"model":"zai/glm-5.3","messages":[{"role":"user","content":"Hello!"}]}'
3

Bật streaming

Thêm "stream": true vào body để nhận phản hồi qua SSE:

curl
curl -N https://token.easyapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EASYAPI_API_KEY" \
  -d '{"model":"zai/glm-5.3","messages":[{"role":"user","content":"Hello!"}],"stream":true}'

Endpoint

Gửi yêu cầu chat completion. Hỗ trợ streaming và non-streaming.

POSThttps://token.easyapi.com/v1/chat/completions
Authorization
Bearer $EASYAPI_API_KEY
Content-Type
application/json
Model
zai/glm-5.3

发送对话补全请求,支持流式与非流式。 Tài liệu

GEThttps://token.easyapi.com/v1/models
Authorization
Bearer $EASYAPI_API_KEY

获取当前账户可用模型列表。 Tài liệu

Tham số

TênKiểuMặc địnhMô tả
modelstring模型 ID,如 openai/gpt-4o、anthropic/claude-3-5-sonnet
messagesarray对话消息列表,每项含 role 与 content
streambooleanfalse设为 true 时以 SSE 流式返回
temperaturefloat1采样温度,越高越随机
max_tokensinteger单次回复最大生成 Token 数
top_pfloat1核采样,限制候选词累积概率
frequency_penaltyfloat0频率惩罚,降低重复用词
presence_penaltyfloat0存在惩罚,鼓励新话题

Dùng SDK bên thứ ba

SDK chính thức OpenAI và khác hoạt động khi đổi base URL. Xem hướng dẫn tích hợp