Give a model an alias¶
Purpose: apps hard-code model names, and model names change: new versions, new vendors, new regions. An alias
is another name apps can call a model by. Give your developers names that describe the job (fast-chat,
long-context, drafts) and you stay free to change what answers them.
Before you start¶
- You're an organisation admin.
- The name you want isn't already a model or an alias anywhere in the gateway: each name is used once.
Steps¶
- Open Models & routing › Models and choose the model, for example
gpt-4.1-mini. - Open its Names section.
- Choose Add alias, type the name in Alias (
fast-chat) and choose Save. Vidai confirms: "fast-chat now also calls gpt-4.1-mini."
Check it worked¶
The model's Names section lists fast-chat under Aliases, and the list on Models shows it under Also
called. A call to fast-chat reaches gpt-4.1-mini:
curl https://<your-gateway>/v1/chat/completions \
-H "Authorization: Bearer $VIDAI_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "fast-chat", "messages": [{"role": "user", "content": "Hello"}]}'
The answer's x-vidai-model header names the model that answered.
Change what an alias points at¶
There's no rename, and an alias belongs to one model. To move a name:
- For good: remove the alias from the first model (Remove beside it under Aliases) and add it to the other. Apps calling the name stop reaching the first model the moment it's removed, so do both steps together.
- For some callers, or with no gap: keep the alias where it is and add a routing rule that sends the model to another one. A rule on a model covers its aliases, and you can set it on one team first.
What an alias does to access, routing and prices¶
An alias is another name for the same model, not another model:
- Access follows the model: a key that may call
gpt-4.1-minimay callfast-chat. In model pickers a model with aliases says "also callable as …", and typing an alias finds it. - Routing follows the model: a rule on
gpt-4.1-minicovers calls tofast-chattoo. - Price follows the model: calls to the alias are priced as the model.
Related¶
- Send a model's calls to another model
- Add a model by hand: the Model id at the provider pins the exact version the provider serves.
Good to know¶
- A name any model or alias already uses is refused: This name is already a model or an alias.
- Deleting a model deletes its aliases with it.
- To keep a stable name while pinning the provider's exact version, set the version as the Model id at the provider on a model you added by hand.