API 参考文字对话
对话补全
Chat Completions 接口的基础调用方式。
接口路径
POST /chat/completions示例
curl https://tokennova.cc/v1/chat/completions \
-H "Authorization: Bearer $TOKENNOVA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"messages": [
{ "role": "user", "content": "你好" }
]
}'常见字段
| 字段 | 类型 | 说明 |
|---|---|---|
model | string | 模型 ID |
messages | array | 对话消息列表 |
temperature | number | 输出随机性 |
stream | boolean | 是否流式返回 |