Documentation
Your workspace
View .mdOpenAPI

Release orphaned holds

POSThttps://weights.fyi/run/v1/reservations/release-orphanedscope: manage
text
POST https://weights.fyi/run/v1/reservations/release-orphaned
Authorization: Bearer <token>                    scope: manage
Available since
Not available yet: built on 2026-11-16, live with the deploy that carries it.
Answer time
synchronous: the holds are released and recorded before the answer.

Returns to your credit every pack hold that nothing can settle any more. A pack holds credit only while a worker runs it; a hold whose pack is not running, or whose stage or plan has ended, is orphaned, whatever its age. GET /v1/workspace/snapshot lists each hold with orphaned and why, and their total in money.orphaned_holds.

All of them are released in one transaction, and each is recorded in GET /v1/workspace/audit as an incident: the service should have released it by itself. A repeat finds nothing and releases nothing. The call takes no body. Releasing holds changes billing, which only the workspace's owner does: it needs a manage key the owner issued, or the owner's own session. An admin's key or session, or a key no person issued, answers 403 workspace_role_required and releases nothing. The owner finds the same release on the Money and budgets page.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with manage that the owner issued, or the owner's session with its CSRF header.

Return value

200 OK with what was released.

FieldMeaning
released_holdsHow many holds were released.
released_usd, released_usd_microsTheir total, back in your credit.
by_reasonFor each why: how many holds, their total and the reason in words.
holdsEach released hold: id, reference, amount_usd_micros, why, why_words and the incident_id of its audit event.

Errors

StatusCodeWhen it happensWhat to do
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work.Use a valid token.
403scope_required, csrf_requiredThe credential lacks manage, or a session sent no CSRF header.Ask the owner.
403workspace_role_requiredThe key's issuer or the signed-in person is not the workspace's owner, or no person issued the key.Use a key the owner issued, or ask the owner to release them on the Money and budgets page.
403account_suspendedThe account is suspended.Talk to us.

Examples

sh
curl -s -X POST https://weights.fyi/run/v1/reservations/release-orphaned -H "Authorization: Bearer $WEIGHTS_API_KEY"
json
{
  "released_holds": 1, "released_usd": 0.322, "released_usd_micros": 322000,
  "by_reason": {"pack_pending": {"holds": 1, "usd_micros": 322000, "words": "its pack is queued, not running"}},
  "holds": [{"id": 9811, "reference": "kaggle-entry-b~classify:pack:pack-7:attempt:1", "amount_usd_micros": 322000,
             "why": "pack_pending", "why_words": "its pack is queued, not running", "incident_id": 88121}]
}

History

  • 2026-11-16 (built, live with the deploy that carries it): the release, one incident per hold, for the workspace's owner only.

See also

GET /v1/workspace/snapshot, GET /v1/workspace/audit.