Skip to main content
POST
/
v1
/
chat
/
completions
/
{completion_id}
Update Chat Completion
curl --request POST \
  --url https://api.example.com/v1/chat/completions/{completion_id} \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "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

Body

application/json

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

{key}
string

Response

Chat completion updated 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.