OpenAPI 3.1.0raw.githubusercontent.com2026-08-13234462.6 KB

c1023e1ee5f5

turns

Create Turn

Stream one Turn, opening claim and preparation inside the SSE generator.

post/api/sessions/{session_id}/turns

Path parameters

session_idstring uuid required

Headers

Idempotency-Keystring required

Request body

textstring required
attachment_idsstring[]

Response

AI SDK UI v1 UIMessage SSE stream. It opens immediately with a transient data-status prelude (phase=preparation) that repeats every runtime heartbeat until the Turn is claimed and prepared. Claim or preparation failures no longer change the HTTP status: they project closed error + finish chunks inside the stream, and cancellation projects one abort chunk.