The chat completion object

Represents a chat completion response returned by model, based on the provided input.source

A unique identifier for the chat completion.source

A list of chat completion choices. Can be more than one if n is greater than 1.source

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

The model used for the chat completion.source

The service tier used for processing the request. This field is only included if the service_tier parameter is specified in the request.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 chat.completion.source

Usage statistics for the completion request.source

OBJECT The chat completion object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  "id": "chatcmpl-123456",
  "object": "chat.completion",
  "created": 1728933352,
  "model": "gpt-4o-2024-08-06",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hi there! How can I assist you today?",
        "refusal": null
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 19,
    "completion_tokens": 10,
    "total_tokens": 29,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0,
      "accepted_prediction_tokens": 0,
      "rejected_prediction_tokens": 0
    }
  },
  "system_fingerprint": "fp_6b68a8204b"
}