v32

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-07-312881,4162.7 MB
Chat

List Chat Completions

List stored Chat Completions. Only Chat Completions that have been stored with the store parameter set to true will be returned.

get/chat/completions

Query parameters

modelstring

The model used to generate the Chat Completions.

metadataobject nullable

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.

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

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

afterstring

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

limitinteger

Number of Chat Completions to retrieve.

order'asc' | 'desc'

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

Response

A list of Chat Completions

object'list' required

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

first_idstring required

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

last_idstring required

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

has_moreboolean required

Indicates whether there are more Chat Completions available.