Skip to main content
GET
Get chat messages

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

completion_id
string
required

The ID of the chat completion to retrieve messages from.

Query Parameters

after
string

Identifier for the last message from the previous pagination request.

limit
integer
default:20

Number of messages to retrieve.

order
enum<string>
default:asc

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

Available options:
asc,
desc

Response

200 - application/json

A list of messages

An object representing a list of chat completion messages.

object
enum<string>
default:list
required

The type of this object. It is always set to "list".

Available options:
list
data
object[]
required

An array of chat completion message objects.

first_id
string
required

The identifier of the first chat message in the data array.

last_id
string
required

The identifier of the last chat message in the data array.

has_more
boolean
required

Indicates whether there are more chat messages available.