Register a model version
POST https://weights.fyi/run/v1/models/<model>/versions
Authorization: Bearer <token> scope: submit
{"version_id": "<id>", "recipe": "laya-specialist/v1", "model_sha256": "<64 hex>", "weights_sha256": "<64 hex>",
"dataset_sha256": "<64 hex>", "metrics": {"macro_f1": 0.91, "ece": 0.03, "gate_passed": true}}- Available since
- 2026-10-20 model versions: included in this build; see What is live for deployment status.
- Answer time
- synchronous: the version is stored at once, then the call waits while it is copied to each MLflow trace destination of your workspace, if you have any.
Registers a trained version of a specialist in your workspace. A specialist is one of the service's task models with a fixed contract (its stage and its outputs), such as laya-link-scorer; a version is one training result of it, named by your version_id and described by three SHA-256 digests (the model document, the weights, the training data) and its held-out metrics. Only names, digests, figures and the bundle you send are stored.
A version whose metrics.gate_passed is true becomes the challenger: the newest candidate, next to the champion (the version that serves) and previous (the champion before it). It becomes the version that serves once POST /v1/models/{model}/promote makes it the champion. The same version sent again with the same fields answers 200 and changes nothing, so a retry is safe. A bundle is the signed package of the model document and its weights that the service itself can execute for POST /v1/classify; every file is checked against its manifest and the version's digests here, and the signature is yours to verify.
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer and a token with submit. |
model | path | yes | A specialist's id, e.g. laya-link-scorer. |
version_id | body | yes | Your id for the version: letters, digits and . _ : @ + -, beginning with a letter or digit. |
recipe | body | yes | laya-specialist/v1 or laya-specialist-heads/v1. |
model_sha256, weights_sha256, dataset_sha256 | body | yes | 64 lower-case hexadecimal characters each. |
metrics | body | yes | macro_f1 and ece (0 to 1 each) and gate_passed (true or false: your trainer's own held-out gate). Optional: heads ({output: {metric: number}} for the specialist's own outputs), calibration (an object, kept as given) and any other metric as a finite number. |
bundle | body | no | The bundle: contract, key_id, signature, manifest, and files with every file the manifest names, base64. The whole body may be 2 MiB. |
artifact_ref | body | no | Instead of bundle, weights kept in your own storage: uri (a storage address, e.g. s3://, r2://, gs:// or https://), byte_size, and optionally sha256 (it must equal weights_sha256) and format (safetensors by default). checkpoint_ref is the same field. |
Return value
201 Created with the version; 200 OK when it was already registered with these fields.
| Field | Meaning |
|---|---|
object | model.version. |
model, version_id, recipe, metrics | As registered. |
model_sha256, weights_sha256, dataset_sha256 | The digests as registered. |
has_bundle | Whether an inline bundle is registered. |
serving_status | bundle_ready: the service can execute it. artifact_ready: its weights are referenced, and artifact_ref is in the answer. metadata_only: figures and digests only. |
aliases | The aliases that name it now, e.g. ["challenger"]. |
created_at | When it was registered. |
registry | One outcome per MLflow trace destination: sink_id and ok (true, false with step and error, or null with pending: true while another sync of the model runs). Empty without such a destination. A failed sync changes neither the status nor what was stored. |
Errors
| Status | Code | When it happens | What to do |
|---|---|---|---|
400 | invalid_version, invalid_body, invalid_json, recipe_not_available, unknown_head | A field is unknown, missing or malformed (field and expected say which), a bundle the service cannot execute, a body that is no JSON object, another recipe than the specialist's, or a head the specialist does not have. | Fix the request. |
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 | The token lacks submit, or the account is suspended. | Use a token with submit. |
404 | model_not_versioned | model is not a specialist; versioned lists the ids that are. | Use one of them. |
409 | version_conflict | This version_id is registered with other fields; fields names them. | Register the new result under a new id. |
413 | body_too_large | The body is over limit_bytes. | Send a smaller bundle, or use artifact_ref. |
429 | rate_limited | The token sends work faster than its request rate. | Wait the Retry-After seconds and send again. |
Examples
With laya-link-scorer in place of MODEL:
curl -s https://weights.fyi/run/v1/models/MODEL/versions -H "Authorization: Bearer $WEIGHTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"version_id": "2026-11-02.1", "recipe": "laya-specialist/v1", "model_sha256": "0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f", "weights_sha256": "831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4", "dataset_sha256": "5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3", "metrics": {"macro_f1": 0.912, "ece": 0.031, "gate_passed": true}}'{
"object": "model.version",
"model": "laya-link-scorer",
"version_id": "2026-11-02.1",
"recipe": "laya-specialist/v1",
"model_sha256": "0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f",
"weights_sha256": "831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4",
"dataset_sha256": "5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3",
"metrics": {"macro_f1": 0.912, "ece": 0.031, "gate_passed": true},
"has_bundle": false,
"serving_status": "metadata_only",
"aliases": ["challenger"],
"created_at": "2026-11-02T09:14:03.120Z",
"registry": []
}History
- 2026-10-20: built.
- 2026-11-16: this page added.
See also
- GET /v1/models/{model}/versions, your versions and the aliases.
- POST /v1/models/{model}/promote, to make a version the champion.
- POST /v1/trace-sinks, to add an MLflow trace destination.