Skip to main content
GET
/
v1
/
chat
/
completions
/
{completion_id}
Get a Chat Completion
curl --request GET \
  --url https://api.example.com/v1/chat/completions/{completion_id}
{
  "choices": [
    {
      "finish_reason": "<string>",
      "index": 1,
      "message": {
        "role": "<string>",
        "annotations": "<unknown>",
        "audio": "<unknown>",
        "content": "<string>",
        "refusal": "<string>",
        "tool_calls": [
          {
            "function": {
              "arguments": "<string>",
              "name": "<string>"
            },
            "id": "<string>",
            "type": "<string>"
          }
        ]
      },
      "logprobs": "<unknown>"
    }
  ],
  "created": 1,
  "id": "<string>",
  "model": "<string>",
  "object": "<string>",
  "usage": {
    "completion_tokens": 1,
    "prompt_tokens": 1,
    "total_tokens": 1,
    "completion_tokens_details": "<unknown>",
    "prompt_tokens_details": "<unknown>"
  },
  "service_tier": "<string>",
  "system_fingerprint": "<string>"
}

Path Parameters

completion_id
string
required

ID of the chat completion

Response

Chat completion gotten successfully

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

choices
object[]
required

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

created
integer<int64>
required

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

Required range: x >= 0
id
string
required

A unique identifier for the chat completion.

model
string
required

The model used for the chat completion.

object
string
required

The object type, which is always chat.completion.

usage
object
required

Usage statistics for the completion request.

service_tier
string | null

The service tier used for processing the request. This field is only included if the service_tier parameter is specified in the request.

system_fingerprint
string | null

This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.