> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timbal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream Eval Run Events

> Stream an in-flight eval run's JSONL events (cursor + long-poll). On `expired: true`, fall back to the single-run GET.



## OpenAPI

````yaml GET /orgs/{org_id}/projects/{project_id}/envs/{env_id}/evals/runs/{eval_run_id}/events
openapi: 3.1.0
info:
  title: Timbal Platform API
  description: Public API documentation for the Timbal platform
  license:
    name: ''
  version: 2.0.0
servers:
  - url: https://api.timbal.ai
    description: Production
  - url: https://api.dev.timbal.ai
    description: Development
security: []
tags:
  - name: ace
    description: Action Control Engine (ACE) operations
  - name: analytics
    description: Org and project analytics
  - name: billing
    description: Subscriptions, usage, and payment-related operations
  - name: content
    description: Re-sign stored content URLs
  - name: files
    description: File operations
  - name: iam
    description: IAM — actions, roles, users, and authorization introspection
  - name: k2
    description: Knowledge Bases v2 operations
  - name: orgs
    description: Organization operations
  - name: projects
    description: Project operations
  - name: runs
    description: Execution operations
  - name: templates
    description: Public project template catalog
  - name: users
    description: Authenticated user profile
paths:
  /orgs/{org_id}/projects/{project_id}/envs/{env_id}/evals/runs/{eval_run_id}/events:
    get:
      tags:
        - projects
      description: >-
        Stream an in-flight eval run's JSONL events (cursor + long-poll). On
        `expired: true`, fall back to the single-run GET.
      operationId: handler
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: env_id
          in: path
          required: true
          schema:
            type: string
        - name: eval_run_id
          in: path
          required: true
          schema:
            type: string
        - name: after
          in: query
          description: Last seen `seq` (exclusive). Default `0` = from the start.
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
        - name: limit
          in: query
          description: Max events per response (clamped to 1..=2000). Default 500.
          required: false
          schema:
            type:
              - integer
              - 'null'
            minimum: 0
        - name: wait_ms
          in: query
          description: |-
            Long-poll timeout in ms (clamped to 0..=30000). Default 0 (return
            immediately). When >0 and nothing is available past `after`, the
            request blocks until a new event arrives, the run completes, or
            the timeout elapses.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
            minimum: 0
      responses:
        '200':
          description: Event batch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvalRunEventsResponse'
        '403':
          description: Insufficient permissions
        '404':
          description: Eval run not found
      security:
        - bearer_auth: []
components:
  schemas:
    EvalRunEventsResponse:
      type: object
      required:
        - eval_run_id
        - events
        - next_cursor
        - done
        - expired
      properties:
        done:
          type: boolean
          description: |-
            `true` once the run has finished and all buffered events up to
            the terminal one have been returned.
        eval_run_id:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/EvalRunEvent'
        expired:
          type: boolean
          description: |-
            `true` when the run's in-memory buffer is no longer available
            (dropped on completion, never existed on this instance, or the
            owning process died). Terminal but **possibly incomplete** — do
            not treat as a clean end-of-stream; re-fetch
            `GET …/evals/runs/{id}` for `status` + the full `results`.
        next_cursor:
          type: integer
          format: int64
          description: |-
            Pass as `after` on the next poll. Equals the last returned seq,
            or the request's `after` when the batch is empty.
          minimum: 0
    EvalRunEvent:
      type: object
      description: |-
        One streamed CLI event. `data` is the parsed JSONL line (or a JSON
        string if the line wasn't valid JSON — contract violation, kept for
        debugging). `seq` is 1-based and monotonic within a run.
      required:
        - seq
        - data
      properties:
        data: {}
        seq:
          type: integer
          format: int64
          minimum: 0
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: >-
        Timbal API key. Obtain your API key from the Timbal platform settings.
        See [Authentication](/api-reference/authentication) for more
        information.

````