Skip to content

Represents a completion response object from the API. Note: streaming and non-streaming response objects have the same structure (unlike the chat endpoint).

ParameterTypeDescription
idstringA unique identifier for the completion
choicesarrayA list of completion choices generated by the model for the input prompt
createdintegerUnix timestamp (in seconds) of when the completion was created
modelstringThe model used for the completion
system_fingerprintstringThis fingerprint represents the backend configuration on which the model ran
objectstringThe object type, always "text_completion"
usageobjectUsage statistics for the completion request
completion_tokensintegerNumber of tokens in the generated completion
prompt_tokensintegerNumber of tokens in the prompt
total_tokensintegerTotal 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
  }
}