v27

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2193427579.9 KB
Inference

List chat completion messages.

Get the messages in a stored chat completion.

get/v1/chat/completions/{completion_id}/messages

Path parameters

completion_idstring required

The ID of the chat completion to retrieve messages from.

The ID of the chat completion to retrieve messages from.

Query parameters

afterstring nullable

Identifier for the last message from the previous pagination request.

Identifier for the last message from the previous pagination request.

limitinteger nullable

Number of messages to retrieve.

Number of messages to retrieve.

order'asc' | 'desc'

Sort order for paginated responses.

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

Response

A ChatCompletionMessageList.

has_moreboolean required

Whether more messages are available.

first_idstring required

ID of the first message in this page.

last_idstring required

ID of the last message in this page.

object'list'

The object type.