Documentation
Your own workers
View .mdOpenAPI

Create a worker join token

POSThttps://weights.fyi/run/v1/nodes/join-tokensscope: manage
text
POST https://weights.fyi/run/v1/nodes/join-tokens
Authorization: Bearer <token>                    scope: manage
[{"models": ["<model>", ...], "auto_publish": false}]
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 token is made and recorded at once.

Makes a join token: a single-use secret beginning wjt_ that lets one worker of your own enroll into the workspace. A worker is a computer you run that serves a model through this API. The weights agent on it presents the token once and receives its own certificate; from then on the token is spent. The token is shown in this answer only and stops working at expires_at, 60 minutes after it is made unless the service sets another lifetime.

The optional body is the token's policy. models limits the model ids the worker may offer, an offer being the worker's statement that it serves a model under the id callers send. auto_publish lets enrollment publish those offers by itself; publishing is what routes your workspace's calls to the worker, and without it you publish each offer with the publish call. The worker's own enrollment and certificate calls are made by the agent with this token, not with a workspace key, and are not part of this reference.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with manage.
modelsbodyno1 to 16 model ids the worker may offer; any id when left out. An id is at most 128 lower-case letters, digits, dots and hyphens, starting with a letter.
auto_publishbodynofalse, the default: publish separately. true: enrollment publishes each offer into the model's existing declaration. Or an object, below.
auto_publish.prioritybodynoThe priority an offer takes when the worker names none; 1 when left out.
auto_publish.poolsbodynoA pool declaration per model id, for models not declared yet; the ids must be among models when you send that.
auto_publish.default_poolbodynoThe pool declaration for an offered model pools does not name.

A pool declaration is what a model served by your workers is declared as: description, context_tokens (value and reason), usd_per_1m (prompt, output and reason) and region (or null). All four are required, and each reason is one sentence that starts with R:, M:, F:, A: or D: and says where the figure comes from.

Return value

201 Created:

FieldMeaning
join_tokenThe token itself, shown here only. Hand it to the agent through a private file or standard input.
idThe token's number; the revoke call takes it.
workspace_idThe workspace a worker enrolling with it joins.
expires_atWhen it stops enrolling.
modelsThe model ids it allows, or null for any.
auto_publishWhether enrollment with it publishes the worker's offers.

Errors

StatusCodeWhen it happensWhat to do
400invalid_join_token_policy, pool_declaration_required, invalid_pool, invalid_jsonAn unknown field, a bad models list or auto_publish (field says which), or a pool declaration that lacks a field or a sourced reason.Fix the body.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspended, byoc_not_enabled_for_workspaceThe token lacks manage, the account is suspended, or worker enrollment is not enabled for this workspace.Use a manage token; ask for enrollment to be enabled.
409model_name_reservedA model id in models is one the service's own catalogue uses; model names it.Choose an id of your own, such as <workspace>-<model>.
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

sh
curl -s https://weights.fyi/run/v1/nodes/join-tokens -H "Authorization: Bearer $WEIGHTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"models": ["almanakje-gemma3-12b"], "auto_publish": false}'
json
{"join_token": "wjt_3mJ8qVb0yQ2t7Lr5Xw9Zc1Ae6Dh4Gk0Nn2Pq8Rs5Tu7", "id": 12, "workspace_id": 7,
 "expires_at": "2026-11-14T10:30:00+00:00", "models": ["almanakje-gemma3-12b"], "auto_publish": false}

History

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

See also