GET
/
v1
/
chat
/
completions
/
{completion_id}
/
messages
{
  "data": [
    {
      "content": "<string>",
      "content_parts": [
        {
          "file": null,
          "image_url": null,
          "text": "<string>",
          "type": "<string>"
        }
      ],
      "id": "<string>",
      "name": "<string>",
      "role": "<string>"
    }
  ],
  "first_id": "<string>",
  "has_more": true,
  "last_id": "<string>",
  "object": "<string>"
}

Path Parameters

completion_id
string
required

ID of the chat completion

Query Parameters

after
string

Identifier for the last message from the previous pagination request.

limit
integer

Number of messages to retrieve.

Required range: x >= 0
order
string

Sort order for messages by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc.

Response

200
application/json

Chat completion messages gotten successfully

The response is of type object.