> ## Documentation Index
> Fetch the complete documentation index at: https://weights.fyi/run/llms.txt

# POST /v1/nodes/{node_id}/offers/{model}/publish

```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](/run/docs/your-model.md).

**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.

| Name | Where | Required | Meaning |
|---|---|---|---|
| `Authorization` | header | yes | `Bearer` and a token with `manage`. |
| `node_id` | path | yes | The worker's `id` from [`GET /v1/nodes`](/run/docs/reference/workers-list.md), a UUID. |
| `model` | path | yes | The model id of one of that worker's offers. |
| `priority` | body | no | A whole number from 1. |
| `pool` | body | first time | `description` (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_reason` | body | no | Needed 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**:

| Field | Meaning |
|---|---|
| `node_id` | The worker. |
| `model` | The model id. |
| `status` | `published`. |
| `pool` | The name the model's declaration is kept under. |
| `priority` | The priority the offer took. |

## Errors

| Status | Code | When it happens | What to do |
|---|---|---|---|
| `400` | `invalid_publication`, `invalid_json` | An 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. |
| `400` | `pool_declaration_required`, `invalid_pool` | The 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`. |
| `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`, `node_revoked` | The token lacks `manage`, the account is suspended, or the worker was revoked. | Use a `manage` token and an active worker. |
| `404` | `node_not_found`, `offer_not_found` | Your workspace has no worker of that id, or that worker offers no such model. | Read the worker list. |
| `409` | `pool_already_declared`, `model_name_reserved` | `pool` 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. |
| `409` | `upstream_model_mismatch`, `region_mismatch`, `pool_kind_mismatch` | The 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. |
| `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

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

- [`GET /v1/nodes`](/run/docs/reference/workers-list.md) for the worker's offers and whether it is connected.
- [POST /v1/chat/completions](/run/docs/reference/chat-completions.md) for the live call that proves the model answers.
- [Bring your own model](/run/docs/your-model.md), the topic.
