Skip to main content

List a generation's events

GET 

/api/v1/generations/:generation_id/events

The generation's transcript, incrementally: its progress rows in seq order, after after_seq. Each generations.step_ended row carries the step it ended as a TranscriptStep; the other rows say when a step or a tool call started and ended, and which generation a tool call started.

Step content and tool names are the trace's content: reading them needs traces:GetTrace on the generation's trace beside generations:GetGeneration, and is refused with 403 without it. progress_only=true asks for the rows alone (step is null), which generations:GetGeneration alone allows. Content is re-read on every page: once a purge erases it, or under zero-retention, step is null.

stream=true answers text/event-stream instead and follows the generation until it settles (completed, failed or requires_action), or stops running without a settle row. Each row is one event: progress frame whose id is its seq; the stream ends with data: [DONE]. A : heartbeat comment is sent every 15 seconds. After 5 minutes the stream ends with event: end and data: {"reason": "max_lifetime", "generation_id": "...", "after_seq": N}: reconnect with that after_seq, or let an EventSource reconnect with its Last-Event-ID header, which this route reads as after_seq. Every reconnect is authorized afresh.

Request​

Responses​

A page of the generation's events, or their stream