Skip to main content
POST
Send events to a Session

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
Idempotency-Key
string

Optional idempotency key. Reusing the same key with the same request target, API version, and body replays the first response for 24 hours. Reusing it with a different target, API version, or body, or while the first request is still being processed, returns 409.

Path Parameters

id
string
required

Session ID.

Body

application/json

Events to send, with optional settings to queue them for later turns.

User events to queue, or a single user.interrupt to stop the Session.

events
(User message · object | User interrupt · object | User tool confirmation · object | Custom tool result · object | User tool result · object)[]
required

Events to append, in order.

Minimum array length: 1

Adds a user message to the Session input queue.

Example:
type
enum<string>

Queued input type; if omitted, next_turn is used.

Available options:
next_turn,
steer
Example:

"next_turn"

Response

The request is accepted. Tool confirmations and Custom Tool results return an empty JSON object. Other inputs return the queued input's event_id; user.interrupt returns control_epoch.

Acknowledges queued input with an event_id, or a user.interrupt request with a control_epoch. Interrupt requests queue nothing. Tool confirmations and Custom Tool results return an empty JSON object.

event_id
string

Event ID of the accepted queued input; the pending list, retraction, and the consumption echo (which reuses this id as its own event id) correlate by it. Set for every queued input when the deployment serves an input queue; absent otherwise, and always absent for a user.interrupt request, which queues nothing.

Example:

"sevt_01h455vb4pex5vsknk084sn02q"

control_epoch
string

Generation after an accepted user.interrupt. Absent for queued input.

Maximum string length: 19
Pattern: ^(0|[1-9][0-9]{0,18})$
Example:

"1"