EdgazeDocsEdgaze Docs
BuilderBilling & RunsAPI ReferenceMCPLegal & TrustChangelog
DocumentationAPI Reference
Home
Getting started
API ReferenceAuthenticationQuickstartSDKs
Workflows
GETList WorkflowsGETGet WorkflowGETList Workflow VersionsPOSTAccept Workflow Update
Runs
POSTCreate RunGETList RunsGETGet RunPOSTCancel RunGETList Run Events
Guides
WebhooksErrors & Edge CasesBilling & Spend CapsStreaming & Real-timeVersioning & DeprecationOpenAPI specification

Platform status

Checking platform status
Theme
All documentation
API Reference

REST endpoints, authentication, and webhooks for running workflows from your backend.

Overview
Getting started
API ReferenceAuthenticationQuickstartSDKs
Workflows
GETList WorkflowsGETGet WorkflowGETList Workflow VersionsPOSTAccept Workflow Update
Runs
POSTCreate RunGETList RunsGETGet RunPOSTCancel RunGETList Run Events
Guides
WebhooksErrors & Edge CasesBilling & Spend CapsStreaming & Real-timeVersioning & DeprecationOpenAPI specification
Developer console

Platform status

Checking platform status
Guides

Streaming & Real-time

Track run progress with polling, event logs, and optional SSE streaming.

Audience

Developers building live run progress.

Track run progress with polling, event logs, and optional SSE streaming. For server-side integrations, polling is the recommended default: it is simple, durable, and works through any HTTP client.

Recommended pattern#

  1. POST /runs → capture run.id and statusUrl from the 202 response.
  2. Poll GET /runs/{id} every 1-3s until terminal status (completed, failed, cancelled).
  3. Read outputs from the completed run response.

Event log#

GET /runs/{id}/events returns ordered pages of lifecycle events. Continue with afterSequence when hasMore is true. Use it for step-level progress or debugging.

The first event is normally run.queued, followed by progress events such as run.preparing and run.started. Sequence numbers define event ordering; do not infer order from wall-clock polling time.

See List Run Events for the full reference.

Waiting for capacity#

Edgaze starts a run as soon as it is accepted while there is capacity. When the platform is at full capacity, the run waits in line instead of failing, and starts automatically in order. Nothing is needed from you, and waiting is never charged.

While it waits, the run stays pending, GET /runs/{id} returns a queue object, and the event log carries run.queue_position events whenever its place changes:

  • queue.state: waiting while in line, starting once it leaves the line.
  • queue.position: its place in line, where 1 is next.
  • queue.etaSeconds: an estimate of the wait, or null when unknown.

queue is null once the run starts. If a run waits longer than its limit, it fails with a reason that says it was not charged, and you can submit it again.

Event content#

Each event carries a data object with the content for its type, or null when the event has no public content. It is an allowlist: fields not listed here are never included.

  • text: an incremental chunk of a step's output, on node.output.delta.
  • status: the run status this event implies, on run-level events.
  • reason: why a run failed, why it is suspended (wait_signal, wait_timer), or why a node was skipped (branch_not_selected, condition_false, upstream_failed).
  • queue: the run's place in line, on run.queue_position (see above).
  • activity: a customer-facing description of what a stage is doing: kind and label, plus optional model, icon (a public image path), aspect (an image's shape, such as 16:9), and pass (current, optional total).
  • progress: a progress hint with floor, ceiling, and etaMs.
  • isOutput, outputLabel, output: on a stage that produces a result, isOutput is true, outputLabel names the result, and output carries its value when it is small enough to inline. The run's full outputs are always available from GET /runs/{id}.

Concatenate data.text in sequence order, grouped by nodeId, to reproduce a step's output as it is generated. Failure text follows the same safe format as Run.reason.

Presented runs#

When you run a workflow you did not create, events are presented rather than raw. nodeId is an opaque stage id (for example s_…) that is stable within one run but unrelated across runs and to the workflow's internal structure. Live text is sent only for stages that produce a result, and stages describe themselves through activity and progress. Runs of your own workflows report the workflow's own node ids and omit the presentation fields.

Event types are an open set. Ignore types you do not recognize rather than treating them as errors.

Live streaming#

Run creation returns streamUrl. Connect with the same Bearer API key; the key needs run:read. The stream begins with a snapshot, replays available events, then follows new node and run-status events. While idle, the stream sends a heartbeat every 15 seconds as an event: ping frame whose data is {"t": <unix ms>}. Ignore ping frames; they carry no id and do not advance your cursor.

If the stream ends unexpectedly on the server side, it sends a final event: error frame with data {"error": "…"} and closes. Reconnect with the last id you processed, as below.

Frame reference#

Every frame's data is one JSON object. The event name tells you its shape:

eventiddata
snapshotnone{"run": {"id", "status", "reason", "lastEventSequence"}}. First frame, and last when the run ends.
run.statusthe event's sequenceA run lifecycle event, with status set.
any event typethe event's sequenceA node or run event, for example node.output.delta.
pingnone{"t": <unix ms>}.
reconnectlast sequence sent{"lastSequence", "retryMs"}.
errornone{"error": "…"}.

An event frame (run.status or an event type) looks like this:

id: 7
event: node.output.delta
data: {"type":"node.output.delta","runId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","sequence":7,"occurredAt":"2026-07-08T10:00:12.000Z","nodeId":"s_3f9a","attempt":1,"data":{"text":"Hello"}}

These are the same events GET /runs/{id}/events returns, in a slightly different envelope:

  • occurredAt holds the time, where the event log uses ts.
  • runId is included.
  • status and reason also appear at the top level on run lifecycle events.
  • nodeId, attempt and data are left out when they have no value, where the event log sends null.

The OpenAPI document publishes these shapes as RunStreamEvent, RunStreamSnapshot, RunStreamPing, RunStreamReconnect and RunStreamError, mapped to their event names in the stream response's x-sse-events. Ignore event names you do not recognize, and never move your cursor on a frame without an id.

Roll-over about every 5 minutes#

A single stream connection lasts at most about 5 minutes. Before that limit, the server ends the connection on purpose with one final frame and closes cleanly:

retry: 1000
event: reconnect
id: 42
data: {"lastSequence":42,"retryMs":1000}

This is not an error, and the run keeps going. Reconnect to the same streamUrl with Last-Event-ID set to that id (or afterSequence=<id>). Every event up to that id was already sent on the closing connection, and the new connection continues with the next one, so nothing is lost or repeated. Browser EventSource clients do this automatically: they wait the retry interval and resume with the last id. A run that waits in line or runs for a long time can span several connections.

Resume after a disconnect with Last-Event-ID. If your SSE client cannot set that header, pass afterSequence=<last_id>. Event ids increase monotonically, replay and live tailing do not duplicate an event, and an already-terminal run sends its snapshot and closes cleanly.

Stopping a run#

POST /runs/{id}/cancel requests that a run still in flight stops. Cancellation of a started run is asynchronous: the call returns cancelRequested: true with the run's current status, and the run reaches cancelled shortly afterwards. Wait for the terminal event on the stream, poll GET /runs/{id}, or handle the run.cancelled webhook. The buyer is not charged. The call needs run:execute and is idempotent, so cancelling an already-terminal run returns its existing status with cancelRequested: false. See Cancel Run.

Was this useful?

Your response helps us improve the documentation.

← Billing & Spend CapsVersioning & Deprecation →
On this page
Recommended patternEvent logWaiting for capacityEvent contentPresented runsLive streamingFrame referenceRoll-over about every 5 minutesStopping a run
© 2026 Edge Platforms, Inc. All rights reserved.