Stream analysis events
/api/sdk/v1/analyses/{analysisId}/events/streamThe same public events as GET /analyses/{analysisId}/events,
delivered as text/event-stream. Each frame carries the event's seq
as its SSE id and its type as the SSE event, so a dropped
connection resumes with Last-Event-ID — or with after, which wins
when both are present. A : ping comment keeps the connection alive.
The stream closes with an end frame once the analysis is terminal:
{"state": "completed" | "failed", "lastSeq": <int>}. Rendering and
delivery happen after that, so render.* and delivery.* events are
only visible in the paged read.
Authorization
bearerAuth A personal access token created in the inklet portal. Server-side use only.
In: header
Path Parameters
1 <= lengthQuery Parameters
Resume after this seq. Takes precedence over Last-Event-ID.
0 <= value <= 2147483647Header Parameters
Standard SSE resume header.
Response Body
text/event-stream
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/sdk/v1/analyses/string/events/stream""string"List analysis events GET
One page of the public event stream, oldest first. Pass the previous page's `nextAfter` as `after` to continue, and read `state` to know whether the run is over. The stream is a progress report, not the run's log. The agent's turns, its individual tool calls and their arguments and output, and the sentences a rejected plan was faulted for are not part of the public API at any depth — a `detail` query parameter is rejected with `400`. `seq` is monotonic but **not contiguous**: it is shared with events that are not published, so a public page skips numbers. Treat it as an ordering and a resume token, never as a count.
Retrieve the run archive GET
A short-lived download URL for the analysis run archive. Answers `404` with `archive_not_found` while the run is in progress, or after retention has expired.