Create a worker join token
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
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer and a token with manage. |
models | body | no | 1 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_publish | body | no | false, the default: publish separately. true: enrollment publishes each offer into the model's existing declaration. Or an object, below. |
auto_publish.priority | body | no | The priority an offer takes when the worker names none; 1 when left out. |
auto_publish.pools | body | no | A pool declaration per model id, for models not declared yet; the ids must be among models when you send that. |
auto_publish.default_pool | body | no | The 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:
| Field | Meaning |
|---|---|
join_token | The token itself, shown here only. Hand it to the agent through a private file or standard input. |
id | The token's number; the revoke call takes it. |
workspace_id | The workspace a worker enrolling with it joins. |
expires_at | When it stops enrolling. |
models | The model ids it allows, or null for any. |
auto_publish | Whether enrollment with it publishes the worker's offers. |
Errors
| Status | Code | When it happens | What to do |
|---|---|---|---|
400 | invalid_join_token_policy, pool_declaration_required, invalid_pool, invalid_json | An 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. |
401 | unauthorized, invalid_token, token_revoked, token_expired | No token, or one that does not work (any more). | Use a valid token. |
403 | scope_required, account_suspended, byoc_not_enabled_for_workspace | The 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. |
409 | model_name_reserved | A 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>. |
413 | body_too_large | The body is over the small-body limit. | Send less. |
503 | byoc_unavailable | Worker enrollment is not available on this service right now. | Retry later. |
Examples
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}'{"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
GET /v1/nodesto see the worker once it has enrolled.- Bring your own model, the topic, with the setup the panel does for you.