Model Naming & Routing

1. Convention for the model field

ApiSet.ai Gateway uses a single model field to represent both the provider and the model, separated by a colon:

  • Format: provider:modelId

Examples:

  • DeepSeek chat model: deepseek:deepseek-chat
  • DeepSeek chat model (calling DeepSeek’s official model directly): deepseek-chat
  • AliyunBailian‑hosted DeepSeek chat model: AliyunBailian:deepseek-chat
  • DeepSeek reasoning model: deepseek:deepseek-reasoner
  • OpenAI GPT‑4.1 mini: openai:gpt-4.1-mini

Where:

  • provider – the provider identifier used inside the gateway, for example:
    • deepseek
    • openai
    • siliconflow
    • AliyunBailian
  • modelId – the concrete model name, consistent with each provider’s official docs, for example:
    • deepseek-chat
    • deepseek-reasoner
    • gpt-4.1-mini

You can optionally omit the provider part.
For example, if you just send deepseek-chat, the gateway can fall back to the default provider configuration for that model.

2. Routing behavior (transparent to callers)

When you send a request:

  1. The gateway parses provider and modelId from the model string.
  2. It chooses the actual upstream endpoint and the real model name accordingly.
  3. Before forwarding the request, it:
    • Rewrites the model field to the provider’s real model name (for example deepseek-chat).
    • Replaces the auth header with the correct provider key.

You don’t need to worry about how provider/model mappings are maintained internally.
As long as model is set correctly, the gateway will route your request to the expected provider and model.

3. Example: migrating from DeepSeek to the gateway

Original call directly to DeepSeek:

curl https://api.deepseek.com/v1/chat/completions \
  -H &lt;span class=<span class="hljs-string">&quot;hljs-string&quot;</span>&gt;&amp;quot;Authorization: Bearer {api_set_key}&amp;quot;&lt;/span&gt; \
  -H &lt;span class=<span class="hljs-string">&quot;hljs-string&quot;</span>&gt;&amp;quot;Content-Type: application/json&amp;quot;&lt;/span&gt; \
  -d &lt;span class=<span class="hljs-string">&quot;hljs-string&quot;</span>&gt;&amp;#x27;{
    &amp;quot;model&amp;quot;: &amp;quot;deepseek-chat&amp;quot;,
    &amp;quot;messages&amp;quot;: [{&amp;quot;role&amp;quot;:&amp;quot;user&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;Hi&amp;quot;}]
  }&amp;#x27;&lt;/span&gt;

Equivalent call via ApiSet.ai Gateway:

curl https://apiset.ai/api/v1/chat/completions \
  -H &lt;span class=<span class="hljs-string">&quot;hljs-string&quot;</span>&gt;&amp;quot;Authorization: Bearer {api_set_key}&amp;quot;&lt;/span&gt; \
  -H &lt;span class=<span class="hljs-string">&quot;hljs-string&quot;</span>&gt;&amp;quot;Content-Type: application/json&amp;quot;&lt;/span&gt; \
  -d &lt;span class=<span class="hljs-string">&quot;hljs-string&quot;</span>&gt;&amp;#x27;{
    &amp;quot;model&amp;quot;: &amp;quot;deepseek-chat&amp;quot;,
    &amp;quot;messages&amp;quot;: [{&amp;quot;role&amp;quot;:&amp;quot;user&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;Hi&amp;quot;}]
  }&amp;#x27;&lt;/span&gt;

You only changed two things:

  • Base URL from https://api.deepseek.com to https://apiset.ai/api
  • Auth from deepseek_api_key to xai_api_key

All other fields (model, messages, temperature, max_tokens, etc.) remain unchanged.

4. Supported providers & models

In the ApiSet.ai console’s Pricing page you can view:

  • The list of supported provider values.
  • The available modelId options under each provider.
  • Detailed billing information for each model (per‑1K‑token pricing, per‑request pricing, etc.).

Before integrating, we recommend confirming in the console that the target provider and modelId are enabled for your account and reviewing their pricing rules.