给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。 Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/json
{
"model": "gpt-3.5-turbo-instruct",
"prompt": "你好,",
"max_tokens": 30,
"temperature": 0
}
Request Code Samples
curl --location --request POST 'https://www.16api.com/v1/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "你好,",
"max_tokens": 30,
"temperature": 0
}'
Responses
application/json {
"id": "cmpl-ByvHP6AWeB1L5vWZSPNHsB12sU9db",
"object": "text_completion",
"created": 1753859563,
"model": "gpt-3.5-turbo-instruct",
"choices": [
{
"index": 0,
"logprobs": null,
"finish_reason": "length",
"text": "我是小冰,很高兴认识你。我是一个人工智能助手,可以回"
}
],
"usage": {
"prompt_tokens": 3,
"completion_tokens": 30,
"total_tokens": 33
}
}
Modified at 2026-02-01 07:33:56