Sample - OpenAI API
GET/chat/completions

List Chat Completions

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

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
modelstringoptional
The model used to generate the Chat Completions.
metadataobjectoptional
A list of metadata keys to filter the Chat Completions by. Example: `metadata[key1]=value1&metadata[key2]=value2`
afterstringoptional
Identifier for the last chat completion from the previous pagination request.
limitintegeroptional
Number of Chat Completions to retrieve.
Default:20
orderstringoptional
Sort order for Chat Completions by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.
Allowed:ascdescDefault:asc

1 status code
200A list of Chat Completions
objectstringrequired
The type of this object. It is always set to "list".
Allowed:listDefault:list
dataarray<object>required
An array of chat completion objects.
first_idstringrequired
The identifier of the first chat completion in the data array.
last_idstringrequired
The identifier of the last chat completion in the data array.
has_morebooleanrequired
Indicates whether there are more Chat Completions available.