Skip to main content
GET
List Thread events

Headers

kimi-api-version
enum<string>

API version for this request, in YYYY-MM-DD form. Send 2026-09-01-beta for the version documented here. Required outside /v1/files*: a missing header there is rejected with 400 invalid_request_error; on /v1/files* its absence selects the compatibility behavior. An unknown value is rejected with 400 invalid_request_error on every endpoint. API versions served by the platform. New dated versions are added as they ship; a version is removed after its announced Sunset date.

Available options:
2026-09-01-beta

Path Parameters

id
string
required

Session ID.

thread_id
string
required

Thread ID.

Query Parameters

order
enum<string>

Listing order; omitted, asc (oldest first). desc returns pages newest first, and page_token continues to older pages. Order used when listing events: asc (default, oldest first) or desc (newest first). processed_at_asc and processed_at_desc are the explicit forms of the same two directions. Events are append-only, so only processing order applies.

Available options:
asc,
desc,
processed_at_asc,
processed_at_desc
page_size
integer<int32>
default:50

How many items to return (1–1000; default 50).

Required range: 1 <= x <= 1000
page_token
string

Pass the next_page_token from a previous response to fetch the next page.

Response

Thread events are returned oldest first.

One page of Session event history in the requested order.

items
(User message · object | User interrupt · object | User tool confirmation · object | Custom tool result · object | Agent message · object | Agent thinking · object | Agent tool use · object | Agent tool result · object | Agent model started · object | Agent thinking started · object | Agent message started · object | Agent tool started · object | Custom tool use · object | Thread message received · object | Thread message sent · object | Thread context compacted · object | Agent delta · object | Session status · object | Session error · object | Thread created · object | Thread status · object | Session title updated · object | Session updated · object | Session usage · object)[]
required

Events in the current page, in the requested order.

A user message was delivered to the Agent. data carries the ordered content blocks; when the message came from the input queue, the event reuses that input's event_id as its own id.

Example:
next_page_token
string

Pass as page_token to fetch the next history page in the requested order. Absent when history is exhausted; never use it as a live stream cursor.

Example:

"next-page-token"

stream_cursor
string

Pass as cursor to the matching Session or Thread live stream. Every page includes this position, including empty pages and the final page without next_page_token. It is independent of the history pagination token and must be used with the same Session or Thread.

With ascending history, finish pagination and use the final page's stream_cursor. With descending history, keep the first (newest) page's stream_cursor; subsequent pages go further into the past and must not replace it. Once streaming, use the latest received SSE event ID for reconnects; loading older history must not overwrite that position.

Resuming may replay events; deduplicate by event id. Pages without a suitable anchor use an earlier replay position, or 0 to replay from the beginning. If the cursor has expired, backfill history again rather than switching to now, which could skip unread events.

Example:

"4096"