快速开始
通过一次简单的请求,了解鉴权、输入、响应和用量。以下示例调用当前站点的本地演示接口。
01
使用演示鉴权标识
固定值 demo-only 仅用于原型,不能接入真实模型。
02
选择演示模型
模型 ID 为 demo-text-a,回复由固定逻辑生成。
03
发送请求并检查响应
响应包含 demo: true,用量字段为模拟数据。
发送第一个请求
curl http://127.0.0.1:3100/api/demo/chat \
-H 'Authorization: Bearer demo-only' \
-H 'Content-Type: application/json' \
-d '{
"model": "demo-text-a",
"messages": [
{
"role": "user",
"content": "你好,AI之门!"
}
],
"stream": false
}'检查响应
{
"demo": true,
"model": "demo-text-a",
"choices": [{ "message": { "role": "assistant", "content": "…" } }],
"usage": { "prompt_tokens": 38, "completion_tokens": 145, "simulated": true }
}上面的响应是结构示意,具体模拟 Token 数随输入与演示回复变化。
原型文档 · 更新于 2026-10-10在 Playground 体验