Documentation
Your own workers
View .mdOpenAPI

Revoke a worker

POSThttps://weights.fyi/run/v1/nodes/{node_id}/revokescope: manage
text
POST https://weights.fyi/run/v1/nodes/<node_id>/revoke
Authorization: Bearer <token>                    scope: manage
[{"reason": "<why>"}]
Available since
2026-10-19 worker enrollment: answered only where this service enrolls your own workers (otherwise the path answers 404); see Bring your own model.
Answer time
synchronous: the revocation is recorded at once, and the worker's connections close as it is.

Ends a worker's enrollment for good. A worker is a computer of your own that serves a model through this API. Once revoked, its connections to the service are closed, its certificate is no longer renewed, it can never connect again, and work it held goes back in line for another worker. Use it when you retire the hardware, or when its key may have leaked. To bring the same computer back, make a new join token and enroll it again.

Revoking a worker removes neither the model's endpoint nor its declaration, so another worker published for the same model keeps answering; with no other worker connected, calls for the model are refused until one is. The call is safe to repeat: a worker already revoked answers the same worker again. A workspace holds at most 32 workers that are not revoked, and revoking one frees its place and its name. The worker's own enrollment and certificate calls are made by the weights agent with its join token, not with a workspace key, and are not part of this reference.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with manage.
node_idpathyesThe worker's id from GET /v1/nodes, a UUID.
reasonbodynoWhy, for your own record: at most 512 characters. Left out, "revoked by the workspace" is recorded.

Return value

200 OK with the worker as GET /v1/nodes lists it:

FieldMeaning
statusrevoked.
revoked_atWhen it was revoked; the first time, when the call is repeated.
open_sessionsRead as the revocation is recorded, so it can still count connections that close a moment later.
the restid, workspace_id, name, join_token_id, facts, region, spki_sha256, enrolled_at and offers, unchanged.

Errors

StatusCodeWhen it happensWhat to do
400invalid_reason, invalid_jsonreason is not text or is longer than 512 characters, or the body is not JSON.Fix the body, or send none.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspendedThe token lacks manage, or the account is suspended.Use a token with manage.
404node_not_foundYour workspace has no worker of that id, or the id is not a UUID.Use an id from the worker list.
413body_too_largeThe body is over the small-body limit.Send a shorter reason.
503byoc_unavailableWorker enrollment is not available on this service right now.Retry later.

Examples

sh
curl -s https://weights.fyi/run/v1/nodes/NODE_ID/revoke -H "Authorization: Bearer $WEIGHTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "hardware retired"}'
json
{"id": "0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10", "workspace_id": 7, "name": "studio-1", "status": "revoked",
 "join_token_id": 12, "facts": {"agent_version": "...", "platform": "Linux-aarch64"}, "region": null,
 "spki_sha256": "5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3",
 "enrolled_at": "2026-11-14T09:30:00+00:00", "revoked_at": "2026-11-14T11:00:00+00:00", "open_sessions": 1,
 "offers": [
   {"model": "almanakje-gemma3-12b", "backend_kind": "openai", "upstream_model": "gemma3:12b", "max_in_flight": 4,
    "call_timeout_seconds": 300.0, "modalities": ["text"], "region": null, "status": "published",
    "pool": "byoc-7-almanakje-gemma3-12b", "priority": 1, "chat_fields": ["tools", "tool_choice"]}
 ]}

History

  • 2026-10-19: built.
  • 2026-11-16: this page added.

See also