MINARA

Interject into a running turn

POST /v1/chat/interject — Queue a steering message for the session's in-flight turn. The gateway injects it into the running turn at the next step

POST /v1/chat/interject

Queue a steering message for the session's in-flight turn. The gateway injects it into the running turn at the next step boundary, and the model folds it into its current work instead of starting a fresh turn. The live /v1/chat/stream connection echoes the injection as a user_interjection event ({ message, ts_ms }).

MethodPOST
Path/v1/chat/interject
AuthAuthorization: Bearer <token> required when GATEWAY_AUTH_TOKEN is set
Categorychat

Request body

{ "session_id": "sess_abc", "message": "skip the 1h chart, focus on funding rates" }

Response body

{ "status": "injected" }

Notes

Use this when the user types a follow-up while a long turn is still streaming and the message should steer the work in progress (narrow the scope, add a constraint, correct a wrong assumption) rather than abort it.

Responses: 200 with { "status": "injected" } when the message was queued for the in-flight turn; 409 with { "status": "no_active_turn" } when no turn is running for the session, in which case the client sends the message as a normal POST /v1/chat/stream request instead; 400 when session_id or message is missing or empty.

A message that is queued but arrives too late to inject comes back on the stream's final done event under pending_interjections; clients re-send those as normal messages.

On this page