卡密兑换 · 接口调用 · 用量统计
兼容 OpenAI Chat Completions 接口,使用 Bearer Token 鉴权。
curl https://card.classby.cn/v1/chat/completions \
-H "Authorization: Bearer 你的卡密" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.1",
"messages": [
{"role": "user", "content": "你好"}
],
"max_tokens": 1024
}'
兼容 Anthropic Messages 接口,使用 x-api-key 鉴权。
curl https://card.classby.cn/v1/messages \
-H "x-api-key: 你的卡密" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.1",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "你好"}
]
}'