Skip to main content
GET
List Chat Completions

Authorizations

Authorization
string
header
required

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

Query Parameters

model
string

The model used to generate the Chat Completions.

metadata
object | null

A list of metadata keys to filter the Chat Completions by. Example:

metadata[key1]=value1&metadata[key2]=value2

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.

after
string

Identifier for the last chat completion from the previous pagination request.

limit
integer
default:20

Number of Chat Completions to retrieve.

order
enum<string>
default:asc

Sort order for Chat Completions 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 Chat Completions

An object representing a list of Chat Completions.

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 objects.

first_id
string
required

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

last_id
string
required

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

has_more
boolean
required

Indicates whether there are more Chat Completions available.