This represents the completion response object from the API. Note: Both streaming and non-streaming response objects share the same structure (unlike the chat endpoint).| Parameter | Type | Description |
|---|
| id | string | A unique identifier for the completion. |
| choices | array | A list of completion options generated by the model for the input prompt. |
| created | integer | The Unix timestamp (in seconds) when the completion was created. |
| model | string | The model used to generate the completion. |
| system_fingerprint | string | A fingerprint representing the backend configuration of the model. |
| object | string | The object type, always "text_completion". |
| usage | object | Usage statistics for the completion request. |
| completion_tokens | integer | The number of tokens generated in the completion. |
| prompt_tokens | integer | The number of tokens in the input prompt. |
| total_tokens | integer | The total number of tokens used in the request (prompt + completion). |
{
"id": "cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7",
"object": "text_completion",
"created": 1589478378,
"model": "gpt-3.5-turbo",
"choices": [
{
"text": "\n\nThis is indeed a test",
"index": 0,
"logprobs": null,
"finish_reason": "length"
}
],
"usage": {
"prompt_tokens": 5,
"completion_tokens": 7,
"total_tokens": 12
}
}
Modified at 2025-02-19 11:38:54