API models: counts, vendors and the route for each
One key reaches the models of 10 vendors, and the model name decides which vendor a request goes to. Today the list has 130 priced text models from 10 vendors; image, audio, video and realtime models are counted apart from these. The live list with Toman prices is on the models page. GET /v1/models returns the same list to a program.
Last updated:
How many models
Today the list has 130 priced text models from 10 vendors; image, audio, video and realtime models are counted apart from these. The live list with Toman prices is on the models page.
| Vendor | Models |
|---|---|
| OpenAI | Models:53 |
| Anthropic | Models:18 |
| Models:31 | |
| DeepSeek | Models:10 |
| xAI | Models:1 |
| Moonshot AI | Models:3 |
| Z.ai | Models:5 |
| Alibaba Qwen | Models:5 |
| MiniMax | Models:2 |
| Tencent Hunyuan | Models:2 |
| Kind | Models |
|---|---|
| Chat | Models:85 |
| Reasoning | Models:40 |
| Embedding | Models:5 |
These figures are read on each request from the same price list the pricing page shows; they are typed nowhere.
Routing by model name
| The model id starts with | Vendor | Routes |
|---|---|---|
claude- | Vendor:Anthropic | Routes:/v1/chat/completions and the native /anthropic route |
gemini-, gemma- | Vendor:Google | Routes:/v1/chat/completions and the native /gemini route |
deepseek- | Vendor:DeepSeek | Routes:/v1/chat/completions |
grok- | Vendor:xAI | Routes:/v1/chat/completions |
kimi- | Vendor:Moonshot AI | Routes:/v1/chat/completions |
glm- | Vendor:Z.ai | Routes:/v1/chat/completions |
qwen | Vendor:Alibaba Qwen | Routes:/v1/chat/completions |
minimax- | Vendor:MiniMax | Routes:/v1/chat/completions |
hunyuan-, hy | Vendor:Tencent Hunyuan | Routes:/v1/chat/completions |
| Any other id | Vendor:OpenAI | Routes:Every /v1 route |
Write a model id exactly as GET /v1/models returns it. Routing ignores letter case, but the price list does not: an id spelled with capitals (such as GPT-4o-mini for gpt-4o-mini) answers 402 with code model_not_priced. To change vendor, change only the model field; the key and the base URL stay. What each route supports is under OpenAI-compatible endpoints, Anthropic and Gemini.
Listing models through the API
curl https://1xai.ir/v1/models \ -H "Authorization: Bearer 1xai-..."
- The answer has the shape of OpenAI's
GET /v1/models:{"object":"list","data":[{"id","object":"model","created","owned_by",…}]}, and each model carries three more fields (the table below). - Only models that are priced and callable are listed; image, audio and video models are in the same list.
- This route is free.
GET /v1/models/{id}returns one model; for a retired model,410with codemodel_retired.
| Field | Type | Meaning |
|---|---|---|
type | Type:string | Meaning:What the model is: chat (chat completions, Responses, Messages and generateContent), embedding, image, video, transcription, speech, realtime, music, moderation or rerank. New values may be added. |
context_window | Type:integer | Meaning:The input tokens the model accepts; on chat and embedding models, when known. |
max_output_tokens | Type:integer | Meaning:The most output tokens the model can produce; on chat models, when known. |
A field that is not known is left out, never guessed. Each model's existing fields (and any other field its vendor sent) are unchanged. GET /v1/models/{id} carries the same three fields.
{
"id": "gpt-5.5",
"object": "model",
"created": 1767225600,
"owned_by": "openai",
"type": "chat",
"context_window": 400000,
"max_output_tokens": 128000
}Retired models and old ids
- When a vendor retires a model id that has a direct successor, the gateway sends the old id to the successor, so pinned configurations keep working.
- The response then carries an
X-1xai-Model-Aliasheader, in the formrequested -> served, and themodelfield of the response body is the served model. - The call is billed at the price of the model that actually served it.
- A retired model with no successor defined answers
410with codemodel_retired, or402with codemodel_not_priced.
X-1xai-Model-Alias: gemini-2.0-flash -> gemini-2.5-flash
1xAi is an independent gateway. It is not affiliated with, endorsed by, or a reseller for OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot AI, Z.ai, Alibaba Qwen, MiniMax or Tencent Hunyuan. Requests are relayed upstream rather than answered by models of our own, so each provider's own usage policies apply to what their models will and will not do, and their model availability is theirs to change. Current reachability is published on the status page.