Documentation
Models and quotes
View .mdOpenAPI

Register a model version

POSThttps://weights.fyi/run/v1/models/{model}/versionsscope: submit
text
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

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with submit.
modelpathyesA specialist's id, e.g. laya-link-scorer.
version_idbodyyesYour id for the version: letters, digits and . _ : @ + -, beginning with a letter or digit.
recipebodyyeslaya-specialist/v1 or laya-specialist-heads/v1.
model_sha256, weights_sha256, dataset_sha256bodyyes64 lower-case hexadecimal characters each.
metricsbodyyesmacro_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.
bundlebodynoThe bundle: contract, key_id, signature, manifest, and files with every file the manifest names, base64. The whole body may be 2 MiB.
artifact_refbodynoInstead 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.

FieldMeaning
objectmodel.version.
model, version_id, recipe, metricsAs registered.
model_sha256, weights_sha256, dataset_sha256The digests as registered.
has_bundleWhether an inline bundle is registered.
serving_statusbundle_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.
aliasesThe aliases that name it now, e.g. ["challenger"].
created_atWhen it was registered.
registryOne 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

StatusCodeWhen it happensWhat to do
400invalid_version, invalid_body, invalid_json, recipe_not_available, unknown_headA 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.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspendedThe token lacks submit, or the account is suspended.Use a token with submit.
404model_not_versionedmodel is not a specialist; versioned lists the ids that are.Use one of them.
409version_conflictThis version_id is registered with other fields; fields names them.Register the new result under a new id.
413body_too_largeThe body is over limit_bytes.Send a smaller bundle, or use artifact_ref.
429rate_limitedThe 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:

sh
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}}'
json
{
  "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