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.

Changes

Changed in 6 of the 85 revisions of this API.245

    • the optional response header X-Fleet-Run-ID removed for the status 200

      optional-response-header-removed

    • removed the non-success response with the status 404

      response-non-success-status-removed

    • removed the non-success response with the status 409

      response-non-success-status-removed

    • removed the non-success response with the status 504

      response-non-success-status-removed

    • endpoint added

      endpoint-added

    This revision also has 91 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 15 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the media type application/json for the response with the status 200

      response-media-type-removed

    • deleted the header request parameter Authorization

      request-parameter-removed

    • deleted the header request parameter X-Fleet-User-Id

      request-parameter-removed

    • deleted the header request parameter X-Fleet-Workspace-Id

      request-parameter-removed

    • endpoint added

      endpoint-added

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog