List compute events
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
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer token with read. |
after_seq | query | no | Nonnegative integer, maximum 9,223,372,036,854,775,807. Default 0; only greater sequences are returned. An empty value also uses the default. |
limit | query | no | Integer 1–500; default 500. An empty value also uses the default. |
tenant_id | query | no | Exact 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.
| Field | Meaning |
|---|---|
seq | Integer cursor; unique in this log. |
emitted_at_ms | Integer Unix timestamp in milliseconds. |
plan_id, tenant_id | Strings identifying the plan and tenant. |
container_id | Submitted container identifier, or null. |
stage_id | Authored stage identifier, or null for a plan-level event. |
kind | Object with event_type and event-specific fields; preserve unfamiliar fields and tolerate new types. |
kind.event_type | Examples: 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_type | Fields |
|---|---|
plan_admitted | state, lp_summary. |
stage_lease_ready | endpoint_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_progress | packs_completed, packs_total, items_completed, steps_completed, accrued_cost_usd_micros. |
pack_completed | pack_id, lease_id, output_pack_sha256, items_completed. |
stage_lease_released | A 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_ended | The 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.revoked | Written 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_completed | output_uri, checkpoint_uri, total_cost_usd_micros, and the delivery outcome and coverage of the receipt. |
stage_incomplete_settled | The 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.cancelled | error, 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.failed | reason: "hard_deadline_expired": until_ms passed with work unfinished and no incomplete: ok. Recorded once. |
plan_completed | total_cost_usd_micros, outcome, coverage. |
plan.cancelled | reason, cancelled_stages. |
scavenger_plan_promoted | wake_policy, promoted_from, max_hourly_usd_micros. |
stream_reopened | reason (pack_registered or consolidation), from_state, was_sealed: a continuous stream took packs after it was sealed or completed. |
plan_superseded | superseded_by, from_state, cancelled, moved_packs, moved_dead_lettered, stages, moved_pack_ids, reason. |
plan_consolidated | superseded_plan_ids, moved_packs, reopened_stages, reason. |
Lease-readiness events can include scoped bearer tokens: keep event responses private.
Errors
| Status | Code | Meaning |
|---|---|---|
400 | invalid_event_cursor | after_seq or limit cannot be parsed as an integer. |
400 | invalid_compute_plan | Parsed cursor is negative or out of range, or limit is outside 1–500. |
401 | unauthorized, invalid_token, token_revoked, token_expired | Supply a valid token. |
403 | scope_required, account_suspended | Token lacks read, or the account is suspended. |
Examples
curl -s 'https://weights.fyi/run/v1/compute/events?after_seq=41&limit=100' \
-H "Authorization: Bearer $WEIGHTS_API_KEY"[{"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.