Skip to main content
POST
/
v1
/
completions
文本补全(旧版)
curl --request POST \
  --url https://api.qclawrouter.com/v1/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-3.5-turbo-instruct",
  "prompt": "<string>",
  "max_tokens": 16,
  "temperature": 1
}
'
{
  "id": "<string>",
  "object": "text_completion",
  "choices": [
    {
      "text": "<string>",
      "index": 123,
      "finish_reason": "<string>"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 15,
    "total_tokens": 35
  }
}

Authorizations

Authorization
string
header
required

使用您的 API Key 作为 Bearer Token。在控制台创建令牌获取。

Body

application/json
model
string
required
Example:

"gpt-3.5-turbo-instruct"

prompt
string
required

提示文本

max_tokens
integer
default:16
temperature
number
default:1

Response

200 - application/json

成功

id
string
object
string
Example:

"text_completion"

choices
object[]
usage
object