Documentation
Your own workers
View .mdOpenAPI

Publish a worker's model offer

POSThttps://weights.fyi/run/v1/nodes/{node_id}/offers/{model}/publishscope: manage
text
POST https://weights.fyi/run/v1/nodes/<node_id>/offers/<model>/publish
Authorization: Bearer <token>                    scope: manage
{"priority": <n>, "pool": {...}}
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 offer is published at once; the model answers once the worker is connected.

Publishes one of a worker's offers. An offer is the statement a worker of your own made when it enrolled: that it serves a model, under the id callers send. Until it is published it reads offered and receives nothing. Publishing routes your workspace's calls for model to this worker and makes the workspace's endpoint for it, or makes that endpoint active again, so callers need only read and submit. Publishing is not a readiness test: send a live call once the worker is connected.

The first publication of a model needs pool, the pool declaration: what the model is declared as in your catalogue. Later publications of the same model, from any of your workers, reuse it and must not send another. priority is the offer's place among the model's workers, lowest asked first; left out, the one the worker declared when it enrolled, and with neither the call is refused. Publishing a published offer again changes its priority. 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

The body is a JSON object; send {} when you set nothing.

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with manage.
node_idpathyesThe worker's id from GET /v1/nodes, a UUID.
modelpathyesThe model id of one of that worker's offers.
prioritybodynoA whole number from 1.
poolbodyfirst timedescription (at most 512 characters), context_tokens (value and reason), usd_per_1m (prompt, output and reason) and region (or null for any); all four, nothing else. Each reason is one sentence that starts with R:, M:, F:, A: or D: and says where the figure comes from.
upstream_alias_reasonbodynoNeeded only where other workspaces also call the model and the worker's own server knows it by another name: a sourced reason, as above, for answering under this id.

Return value

200 OK:

FieldMeaning
node_idThe worker.
modelThe model id.
statuspublished.
poolThe name the model's declaration is kept under.
priorityThe priority the offer took.

Errors

StatusCodeWhen it happensWhat to do
400invalid_publication, invalid_jsonAn unknown field, a priority that is no whole number from 1, no priority here or at enrollment, a bad upstream_alias_reason (field says which), or a body that is not JSON.Fix the body.
400pool_declaration_required, invalid_poolThe model has no declaration yet and pool is missing or lacks a field, or one of its fields is refused (field names it).Send the whole pool.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspended, node_revokedThe token lacks manage, the account is suspended, or the worker was revoked.Use a manage token and an active worker.
404node_not_found, offer_not_foundYour workspace has no worker of that id, or that worker offers no such model.Read the worker list.
409pool_already_declared, model_name_reservedpool was sent for a model that already has a declaration, or the id is one the service's own catalogue uses.Send no pool; enroll under an id of your own.
409upstream_model_mismatch, region_mismatch, pool_kind_mismatchThe worker's server serves another model than a shared model's name, its region differs from the declaration's, or it answers another kind of call than the model's other workers.Publish a matching offer.
413body_too_largeThe body is over the small-body limit.Send less.
503byoc_unavailableWorker enrollment is not available on this service right now.Retry later.

Examples

The first publication of a model, with its declaration:

sh
curl -s https://weights.fyi/run/v1/nodes/NODE_ID/offers/MODEL/publish -H "Authorization: Bearer $WEIGHTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"priority": 1, "pool": {"description": "Gemma 3 12B served by our own workers", "context_tokens": {"value": 8192, "reason": "D: the served context length, 2026-11-01"}, "usd_per_1m": {"prompt": 0.1, "output": 0.3, "reason": "D: our own price list, 2026-11-01"}, "region": null}}'
json
{"node_id": "0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10", "model": "almanakje-gemma3-12b", "status": "published",
 "pool": "byoc-7-almanakje-gemma3-12b", "priority": 1}

History

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

See also