Set a model's aliases
POST https://weights.fyi/run/v1/models/<model>/aliases
Authorization: Bearer <token> scope: submit
{"aliases": {"champion": "<id or null>", "challenger": "<id or null>", "previous": "<id or null>"},
"expected": {"champion": "<id or null>", "challenger": "<id or null>", "previous": "<id or null>"}}- Available since
- 2026-10-20 model versions: included in this build; see What is live for deployment status.
- Answer time
- synchronous: the aliases change at once, then the call waits while each MLflow trace destination of your workspace is brought up to date, if you have any.
Sets the three aliases of a specialist (one of the service's task models with a fixed contract, such as laya-link-scorer) in one step: champion, the version that serves; challenger, the newest candidate; and previous, the champion before the current one. The change is applied only when the aliases are exactly expected at that moment. Otherwise the call answers 409 aliases_changed with the current aliases and changes nothing, so a change someone else made in between is never overwritten.
This is how a program undoes a promotion it made: send the aliases as they were before, and the aliases the promotion answered as expected. No gate is checked here: the call sets what you send. Setting the aliases they already are answers changed: false; it still completes a sync to your MLflow trace destinations that an earlier call left unfinished, so a retry repairs it.
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. |
aliases | body | yes | The aliases to set: exactly the keys champion, challenger and previous, each a registered version's id or null. |
expected | body | yes | The aliases as you believe they are now, in the same shape. |
Return value
200 OK:
| Field | Meaning |
|---|---|
object | model.aliases. |
model | The specialist's id. |
aliases | champion, challenger and previous after the call. |
changed | false when they already were these. |
registry | One outcome per MLflow trace destination this call synced: sink_id and ok (true, false with step and error, or null with pending: true while another sync of the model runs). A failed sync changes neither the status nor the aliases. |
Errors
| Status | Code | When it happens | What to do |
|---|---|---|---|
400 | invalid_version, invalid_body, invalid_json | A field is unknown, an alias object lacks one of its three keys or holds a malformed id (field and expected say which), or the body is no JSON object. | 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, version_not_found | model is not a specialist, or aliases names a version your workspace did not register. | Register the version first. |
409 | aliases_changed | The aliases are not expected now; the body holds the current aliases and your expected. Nothing changed. | Read the aliases, decide again, and send them as expected. |
413 | body_too_large | The body is over limit_bytes. | Send a smaller body. |
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, undoing the promotion of a first champion:
curl -s https://weights.fyi/run/v1/models/MODEL/aliases -H "Authorization: Bearer $WEIGHTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"aliases": {"champion": null, "challenger": "2026-11-02.1", "previous": null}, "expected": {"champion": "2026-11-02.1", "challenger": null, "previous": null}}'{
"object": "model.aliases",
"model": "laya-link-scorer",
"aliases": {"champion": null, "challenger": "2026-11-02.1", "previous": null},
"changed": true,
"registry": []
}History
- 2026-10-20: built.
- 2026-11-16: this page added.
See also
- POST /v1/models/{model}/promote, the gated way to change the champion.
- GET /v1/models/{model}/versions, the aliases as they are now.