Promote a standing plan
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
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer token with submit. |
plan_id | path | yes | Identifier of your standing plan. |
max_hourly_usd_micros | body | no | Integer 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
| Status | Code | Meaning |
|---|---|---|
400 | invalid_json, invalid_compute_plan | Invalid JSON, identifier, ceiling, non-object body or extra fields. |
401 | unauthorized, invalid_token, token_revoked, token_expired | Supply a valid token. |
403 | scope_required, account_suspended | Token lacks submit, or the account is suspended. |
404 | compute_plan_not_found | Plan is absent or belongs to another account. |
409 | compute_plan_conflict | Plan is terminal or is no longer standing. Read its receipt. |
413 | body_too_large | Body exceeds 1 MiB. |
429 | rate_limited | Wait for Retry-After before retrying. |
Examples
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:
{"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.