---
title: "Set Alias"
method: POST
path: "/v1/aliases"
tags: ["aliases"]
---

# Set Alias

`POST /v1/aliases`

Create or update a stored alias, global or scoped to one user.

## Request body

- AliasRequest — Request to create or update an alias.
  - `name` string, required — Display name callers use as the model, e.g. 'fast-model'.
  - `target` string, required — Selector the alias resolves to, as 'provider:model' or 'instance:model'.
  - `user_id` string, nullable — User this alias belongs to. Omit for a global alias every caller sees. A user-scoped alias resolves only for that user and shadows a global one of the same name.

## Response `200`

Successful Response

- AliasResponse — A model alias and where it is defined.
  - `created_at` string, nullable
  - `name` string, required
  - `source` string, required
  - `target` string, required
  - `updated_at` string, nullable
  - `user_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.net/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/2ebadef75cc8/schema)
