An organization alias on UplinkSwitch is a name you choose, for example prod-chat, pinned to one catalog model; requests to https://api.uplinkswitch.com/v1 that send the alias as model run on whatever it points to at that moment. Repointing the alias changes the model for every caller without a code change or a deploy.
prod-chat in this page is an invented, user-defined name. It is not a catalog model and will not work on your account until you create it.
Create the alias, then call it
Aliases are managed on the console's Aliases page: enter a name, pick the target model, save. The rules the gateway enforces:
- A name is 1 to 64 characters of lower-case letters, digits, dots, dashes and underscores, and starts with a letter or digit.
- A name that is already a catalog model id is rejected. A real model id always wins, so an alias can never shadow one.
- The target has to be a model the catalog serves; an unknown id is rejected.
The application then uses the alias like any model id:
from openai import OpenAI
import os
client = OpenAI(base_url="https://api.uplinkswitch.com/v1",
api_key=os.environ["UPLINKSWITCH_API_KEY"])
reply = client.chat.completions.create(
model="prod-chat", # your alias, not a catalog id
messages=[{"role": "user", "content": "One sentence on idempotency."}],
)
print(reply.model, reply.choices[0].message.content)Each response also carries headers naming the alias that was requested and the model that actually served it, so a log line can record both.
See which aliases a key can use
curl -s https://api.uplinkswitch.com/v1/models \
-H "Authorization: Bearer $UPLINKSWITCH_API_KEY" \
| jq '.data[] | select(.owned_by == "alias") | {id, target: .uplink.alias_of}'GET /v1/models lists the models the key may call and then the organization's aliases, each with the model it stands for in uplink.alias_of. A key with a model allowlist may name the alias or the model in that list.
Repoint it, and put it back
Say prod-chat points at gpt-6.1-sol and you want to try claude-sonnet-5-5:
| Candidate target | Input per 1M | Output per 1M | Catalog status, 2026-11-24 |
|---|---|---|---|
gpt-6.1-sol | $0.582 | $2.91 | ok |
claude-sonnet-5-5 | $1.164 | $2.91 | ok |
Change the target on the Aliases page. The alias is resolved as each request arrives, so allow a short moment before every new request sees the new target. An alias has no price of its own: a request is billed at the rate of the model that served it.
Every create, change and delete is kept in the alias's history, which the same console page shows. Restoring is manual: read the previous target from the history and set it again. There is no automatic rollback, no traffic split between two targets and no guarantee about requests already in flight, so treat a repoint like any production change and watch the first responses.
Aliases are a deliberate, human-made switch. Choosing a model per request by rule is the auto router, and moving to another route when one fails is routing and failover.