The completion object
Legacy

Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).source

A unique identifier for the completion.source

The list of completion choices the model generated for the input prompt.source

The Unix timestamp (in seconds) of when the completion was created.source

The model used for completion.source

This fingerprint represents the backend configuration that the model runs with.source

Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.source

The object type, which is always "text_completion"source

Usage statistics for the completion request.source

OBJECT The completion object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "id": "cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7",
  "object": "text_completion",
  "created": 1589478378,
  "model": "gpt-4-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
  }
}