Model Naming & Routing
1. Convention for the model field
The gateway uses a single model string to identify both the provider and the upstream model, separated by a colon:
- Format:
provider:modelId
Examples:
- DeepSeek chat:
deepseek:deepseek-chat - Calling a provider’s native model id directly (when supported):
deepseek-chat - Another host naming the same logical model:
AliyunBailian:deepseek-chat(example) - DeepSeek reasoning:
deepseek:deepseek-reasoner - OpenAI GPT‑4.1 mini:
openai:gpt-4.1-mini
Where:
- provider — Identifier inside the gateway, e.g.
deepseek,openai,siliconflow,AliyunBailian, etc. - modelId — The concrete model name as in that provider’s docs, e.g.
deepseek-chat,deepseek-reasoner,gpt-4.1-mini.
You can sometimes omit the
provider:prefix. For example,deepseek-chatalone may resolve via the gateway’s default mapping for that model id.
2. Routing behavior (transparent to callers)
When you call POST https://api.mixgateway.io/v1/chat/completions:
- The gateway parses
providerandmodelIdfrommodel(or applies defaults when you send onlymodelId). - It selects the correct upstream endpoint and credentials.
- Before forwarding, it may rewrite
modelto the provider’s real id (e.g.deepseek-chat) and attach the right upstream authorization.
You do not need to maintain provider mappings in your app. If
modelis valid for your account, the gateway routes to the intended provider and model.
3. Example: migrating from DeepSeek to the gateway
Original (directly to DeepSeek):
curl https://api.deepseek.com/v1/chat/completions \
-H "Authorization: Bearer {deepseek_api_key}" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role":"user","content":"Hi"}]
}'
Via mixgateway.io (same body, different base URL and key):
curl https://api.mixgateway.io/v1/chat/completions \
-H "Authorization: Bearer {gateway_api_key}" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role":"user","content":"Hi"}]
}'
Typical changes:
- Base URL — from the vendor host to
https://api.mixgateway.io/v1(no path segment beyond/v1if that is how your deployment exposes the API). - Authorization — from the vendor API key to your gateway API key from the [console](/dashboard).
Fields like model, messages, temperature, max_tokens, etc. usually stay the same.
You may also use an explicit provider:
"model": "deepseek:deepseek-chat"
4. Supported providers & models
- Use the public Pricing page on the site for published rates and high-level model listings.
- In the [console](/dashboard), confirm which providers and
modelIdvalues are enabled for your account and review billing rules before production traffic.