POST
/
completion-messages
{
  "id": "0b089b9a-24d9-48cc-94f8-762677276261",
  "message_id": "0b089b9a-24d9-48cc-94f8-762677276261",
  "mode": "chat",
  "answer": "how are you?",
  "metadata": {},
  "created_at": 1679586667
}

Authorizations

Authorization
string
header
required

API-Key 鉴权。所有 API 请求都应在 Authorization HTTP Header 中包含您的 API-Key,格式为 Bearer {API_KEY}强烈建议开发者把 API-Key 放在后端存储,而非分享或者放在客户端存储,以免 API-Key 泄露,导致财产损失。

Body

application/json

创建完成消息的请求体。

The body is of type object.

Response

200
application/json

成功响应。内容类型和结构取决于请求中的 response_mode 参数。

  • response_modeblocking,返回 application/jsonChatCompletionResponse 对象。
  • response_modestreaming,返回 text/event-streamChunkChatCompletionResponse 流式序列。

阻塞模式下的完整 App 结果。