Documentation
Compute plans and streams
View .mdOpenAPI

Promote a standing plan

POSThttps://weights.fyi/run/v1/compute/plans/{plan_id}/promotescope: submit
text
POST https://weights.fyi/run/v1/compute/plans/{plan_id}/promote
Authorization: Bearer <token>                    scope: submit
Content-Type: application/json
Available since
2026-10-28: included in this build; see What is live for deployment status.
Answer time
synchronous policy update and scheduling reconsideration; does not wait for execution.

Promotes your standing plan to wake_policy: "standard", so it can request work independently of other active runs. A plan is standing when its wake policy is piggyback or scavenger_stream, or its normalised incomplete policy is ok. Completed, failed and cancelled plans cannot be promoted.

Completed packs, progress, receipts and event history are preserved. If incomplete was present, it becomes fail. The window, total budget and placement stay as submitted: a plan held to existing capacity still starts none. Submitting the same plan again under its operation_key still answers this plan. The call records scavenger_plan_promoted and recalculates scheduling; it does not guarantee an immediate start. Promotion changes who may start capacity, not what the work needs: each stage still waits for capacity that is ready for its own model, within the hourly ceiling, and until_ms now ends the plan as a hard deadline, failing what is unfinished.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer token with submit.
plan_idpathyesIdentifier of your standing plan.
max_hourly_usd_microsbodynoInteger from 0 to 9,223,372,036,854,775,807; replaces the schedule's hourly ceiling in micro-dollars. Omitted or null preserves the existing ceiling.

An empty body or {} is accepted. Otherwise send a JSON object of at most 1 MiB containing only max_hourly_usd_micros. Fractions, booleans and numeric strings are refused.

Return value

200 OK with the current plan receipt, including the updated schedule, stage progress, lp_summary and last_event_seq.

This operation is not an idempotent retry: once promotion succeeds, the plan is no longer standing and another promotion returns 409. After a lost response, read the plan before retrying. Promotion does not release a plan still held in its initial lazy queue.

Errors

StatusCodeMeaning
400invalid_json, invalid_compute_planInvalid JSON, identifier, ceiling, non-object body or extra fields.
401unauthorized, invalid_token, token_revoked, token_expiredSupply a valid token.
403scope_required, account_suspendedToken lacks submit, or the account is suspended.
404compute_plan_not_foundPlan is absent or belongs to another account.
409compute_plan_conflictPlan is terminal or is no longer standing. Read its receipt.
413body_too_largeBody exceeds 1 MiB.
429rate_limitedWait for Retry-After before retrying.

Examples

sh
curl -s https://weights.fyi/run/v1/compute/plans/PLAN_ID/promote \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -d '{"max_hourly_usd_micros":2000000}'

Selected response fields:

json
{"plan_id":"example-plan","schedule":{"wake_policy":"standard","incomplete":"fail","max_hourly_usd_micros":2000000},"stages":[{"stage_id":"pages","packs_completed":3}],"last_event_seq":43}

History

  • 2026-10-28: documented promotion with preserved progress and an optional ceiling.
  • 2026-11-16: stated what promotion leaves unchanged: matching capacity, the ceiling and the deadline.

See also