跳转至

文本补全

本节列出该能力下当前已实现的接口。

创建文本补全

POST /v1/completions

基于给定提示创建文本补全

鉴权

  • Bearer Token (Authorization: Bearer <token>)

请求体

  • Content-Type: application/json
  • Schema: CompletionRequest
字段 类型 必填 说明
model string yes -
prompt - yes -
max_tokens integer no -
temperature number no -
top_p number no -
n integer no -
stream boolean no -
stop - no -
suffix string no -
echo boolean no -

返回

状态码 说明 Schema
200 成功创建响应 CompletionResponse