Appearance
自动补全
POST
/v1/completions
Authorizations
bearer
TypeHTTP (bearer)
Request Body
JSON
{
"model": "string",
"prompt": "This is a test.",
"best_of": 1,
"echo": false,
"frequency_penalty": 0,
"logit_bias": {
"additionalProperties": 0
},
"logprobs": null,
"max_tokens": 16,
"n": 1,
"presence_penalty": 0,
"seed": 0,
"stop": "
",
"stream": false,
"stream_options": {
"include_usage": true
},
"suffix": "test.",
"temperature": 1,
"top_p": 1,
"user": "user-1234"
}
Responses
OK
application/json
JSON
{
"id": "string",
"choices": [
{
"finish_reason": "string",
"index": 0,
"logprobs": {
"text_offset": [
0
],
"token_logprobs": [
0
],
"tokens": [
"string"
],
"top_logprobs": [
{
"additionalProperties": 0
}
]
},
"text": "string"
}
],
"created": 0,
"model": "string",
"system_fingerprint": "string",
"object": "string",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0,
"rejected_prediction_tokens": 0
},
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
}
}
}