Documentation
Compute plans and streams
View .mdOpenAPI

List compute events

GEThttps://weights.fyi/run/v1/compute/eventsscope: read
text
GET https://weights.fyi/run/v1/compute/events
Authorization: Bearer <token>                    scope: read
Available since
2026-10-28: included in this build; see What is live for deployment status.
Answer time
synchronous snapshot; does not wait for another event.

Reads the durable event log for the calling account's ComputePlans, oldest first. Each event has a sequence number, plan and optional stage identity, timestamp and a kind object containing event_type plus event-specific data. tenant_id can narrow the account's results; it never broadens access.

Use this call to resume monitoring after a disconnect. Persist the greatest sequence you have processed and pass it as after_seq on the next request. Sequence numbers are shared across the log, so gaps are normal after account or tenant filtering. The response is a JSON array, not a live event connection.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer token with read.
after_seqquerynoNonnegative integer, maximum 9,223,372,036,854,775,807. Default 0; only greater sequences are returned. An empty value also uses the default.
limitquerynoInteger 1–500; default 500. An empty value also uses the default.
tenant_idquerynoExact tenant filter within your account. Unknown or inaccessible tenant values return an empty array.

There is no plan filter; select plan_id locally if needed.

Return value

200 OK with an array of at most limit objects in increasing sequence order, or [] when nothing matches.

FieldMeaning
seqInteger cursor; unique in this log.
emitted_at_msInteger Unix timestamp in milliseconds.
plan_id, tenant_idStrings identifying the plan and tenant.
container_idSubmitted container identifier, or null.
stage_idAuthored stage identifier, or null for a plan-level event.
kindObject with event_type and event-specific fields; preserve unfamiliar fields and tolerate new types.
kind.event_typeExamples: plan_admitted, plan_coalesced, stage_lease_ready, stage_lease_released, stage_progress, pack_completed, stage_completed, stage_incomplete_settled, stage.failed, stage.cancelled, stage_lease_ended, stage.lease.revoked, plan.failed, plan.cancelled, plan_completed, scavenger_plan_promoted, stream_reopened, plan_superseded, plan_consolidated.

Selected payload fields inside kind:

event_typeFields
plan_admittedstate, lp_summary.
stage_lease_readyendpoint_url, scoped_bearer_token, lease_until_ms, target_parallel_sessions, customer_container. Use the scoped token for the assigned chat endpoint, not lifecycle calls.
stage_progresspacks_completed, packs_total, items_completed, steps_completed, accrued_cost_usd_micros.
pack_completedpack_id, lease_id, output_pack_sha256, items_completed.
stage_lease_releasedA stage gave its lease back and waits to be leased again; the plan goes on. After a transient fault: reason (INPUT_STAGING_FAILED or PLATFORM_OOM), error, failure_count, max_attempts, transient_platform_failure: true. After a credit hold: reason and waiting_for (no_credit or token_daily_cap), credit_hold: true, failure_count, readiness. Any other release carries lease_id and reason.
stage_lease_endedThe stage's lease ended with its model's serving capacity (the operator's destroy-all, or the fleet epoch serving it closing): reason: "capacity_ended", detail, lease_ended: true, retryable: false, token_revoked, attempt_charged: false, resumes_on: "capacity_return", state: "waiting_capacity", from_state, model. The stage waits for capacity again with nothing charged.
stage.lease.revokedWritten with stage_lease_ended, for whoever fences work on the lease: reason (destroy_all or epoch_closed), epoch_id (the fleet epoch whose capacity ended, or null), generation (the revoked bearer's ordinal among the stage's bearers, or null where none was issued) and revoked_at_ms. Stop the work the bearer started; the next wake hands a new bearer, one generation higher.
stage_completedoutput_uri, checkpoint_uri, total_cost_usd_micros, and the delivery outcome and coverage of the receipt.
stage_incomplete_settledThe window closed on unfinished work. A stream under incomplete: ok: packs_completed, packs_expired_incomplete, items_completed, total_cost_usd_micros; the stage then completes. A standing plan's whole-stage work: reason: "standing_window_closed", state, attempt_count, failure_count, last_error; the stage is then cancelled.
stage.failed, stage.cancellederror, exit_code. A stage cancelled because one it needs failed carries status, reason: "dependency_failed" and source_stage_id in their place. A hard deadline gives error: "hard_deadline_expired".
plan.failedreason: "hard_deadline_expired": until_ms passed with work unfinished and no incomplete: ok. Recorded once.
plan_completedtotal_cost_usd_micros, outcome, coverage.
plan.cancelledreason, cancelled_stages.
scavenger_plan_promotedwake_policy, promoted_from, max_hourly_usd_micros.
stream_reopenedreason (pack_registered or consolidation), from_state, was_sealed: a continuous stream took packs after it was sealed or completed.
plan_supersededsuperseded_by, from_state, cancelled, moved_packs, moved_dead_lettered, stages, moved_pack_ids, reason.
plan_consolidatedsuperseded_plan_ids, moved_packs, reopened_stages, reason.

Lease-readiness events can include scoped bearer tokens: keep event responses private.

Errors

StatusCodeMeaning
400invalid_event_cursorafter_seq or limit cannot be parsed as an integer.
400invalid_compute_planParsed cursor is negative or out of range, or limit is outside 1–500.
401unauthorized, invalid_token, token_revoked, token_expiredSupply a valid token.
403scope_required, account_suspendedToken lacks read, or the account is suspended.

Examples

sh
curl -s 'https://weights.fyi/run/v1/compute/events?after_seq=41&limit=100' \
  -H "Authorization: Bearer $WEIGHTS_API_KEY"
json
[{"seq":42,"emitted_at_ms":1793232000000,"plan_id":"example-plan","tenant_id":"demo","container_id":null,"stage_id":"sessions","kind":{"event_type":"stage_completed","output_uri":null,"checkpoint_uri":null,"total_cost_usd_micros":1200}}]

Patterns

After processing a full page, request the next page using its last seq. On an empty page keep your existing cursor. A plan receipt's last_event_seq starts monitoring after its recorded history; use zero when that history matters.

History

  • 2026-10-28: documented account-scoped event polling and exclusive cursors.
  • 2026-11-16: added the lease-release, deadline-settlement and plan-failure events.
  • 2026-11-20: added stage.lease.revoked, written when a destroy-all or an epoch's close ends a stage's lease.

See also