Documentation
Models and quotes
View .mdOpenAPI

Set a model's aliases

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

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with submit.
modelpathyesA specialist's id, e.g. laya-link-scorer.
aliasesbodyyesThe aliases to set: exactly the keys champion, challenger and previous, each a registered version's id or null.
expectedbodyyesThe aliases as you believe they are now, in the same shape.

Return value

200 OK:

FieldMeaning
objectmodel.aliases.
modelThe specialist's id.
aliaseschampion, challenger and previous after the call.
changedfalse when they already were these.
registryOne 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

StatusCodeWhen it happensWhat to do
400invalid_version, invalid_body, invalid_jsonA 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.
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_versioned, version_not_foundmodel is not a specialist, or aliases names a version your workspace did not register.Register the version first.
409aliases_changedThe 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.
413body_too_largeThe body is over limit_bytes.Send a smaller body.
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, undoing the promotion of a first champion:

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