An AI model aggregator, also called an API gateway, puts models from different developers behind one key and one endpoint. In the request you change the model name, not the integration. There are five ways to get an AI model API: direct vendor keys, a foreign aggregator, a Russian aggregator, your own gateway, and codexkey. Below we cover how they differ, which criteria to choose by, what you can get for free, and what a single call to several models looks like.
What an AI aggregator and an API gateway are
A request passes through an aggregator in a few steps. The service checks your key, converts the request to the target model's format, sends it to the vendor or a hosting provider, counts tokens and charges a single balance. From the outside it is usually an OpenAI-compatible /v1/chat/completions endpoint, so code written with the OpenAI SDK works once you swap two values: base_url and the key.
People use "aggregator," "gateway" and "router" almost interchangeably. We call a commercial service with billing an aggregator, the technical layer a gateway, and a gateway you host yourself a proxy server. What a gateway does inside and where the risks hide is covered in the article What is a router for Claude API.
If you want every model in one place through an API, know that nobody has the full set. Each aggregator has its own catalog. There is a second limit: an aggregator does not lift the limits of the model itself. When a vendor retires a model, it disappears from the aggregator too, until the aggregator substitutes another one or switches to a different provider.
Five ways to get an AI model API: comparison
| Option | What you get | Paying from Russia | Main limitation |
|---|---|---|---|
| Direct vendor key | Every feature of one vendor | Russia is not on the supported-country lists of OpenAI or of Anthropic (supported-countries page) | One vendor per key |
| Foreign aggregator, for example OpenRouter | Hundreds of models at one address, automatic fallback between providers | Cards, AliPay, USDC; some accounts from Russia had payments rejected (details) | Payment restrictions, a fee when buying credits |
| Russian aggregator, for example ProxyAPI or Polza.ai | OpenAI-compatible API, payment in rubles, documents for legal entities | Rubles and Russian cards; Polza.ai also lists SBP, the Russian Faster Payments System | Each has its own catalog, prices and data policy |
| Your own gateway on LiteLLM | A server on your infrastructure, virtual keys with budgets and limits | Does not solve it: you still get vendor keys and pay vendors yourself | You run the server yourself |
| codexkey | One key sk_cdx_..., a catalog of Claude, GPT, Gemini, DeepSeek, GLM, Grok, Kimi, MiniMax, Qwen, plus images and video | Russian bank card, SBP, crypto, no VPN and no vendor account | Numeric limits are not published, no blanket guarantee on data storage |
We took the competitor details from their official pages as of October 29, 2026. In its FAQ OpenRouter says it passes provider prices through with no markup on inference, charges a fee when you top up credits, does not log prompts by default and switches to another provider on an error. ProxyAPI names OpenAI, DeepSeek, Gemini and Anthropic on its home page and accepts rubles from a card of any Russian bank. Polza.ai claims hundreds of models from more than 80 providers, does not store prompts and responses by default and has automatic fallback. Check the services' own sites for current terms: prices there change.
LiteLLM describes itself as a self-hosted server with one OpenAI-compatible address for more than a hundred providers, with virtual keys, budgets, spend tracking and fallbacks. It solves control, not payment: you still buy the vendor keys yourself.
For a comparison with OpenRouter on features, price and latency, see codexkey vs OpenRouter. Replacing OpenRouter from Russia is the subject of OpenRouter alternatives for Russia. If you are choosing between your own gateway and a ready-made one, read codexkey vs LiteLLM.
How to choose an aggregator: seven criteria
| Criterion | What to check | How to check it in ten minutes |
|---|---|---|
| Catalog | Whether the models you need are there, and their latest versions | Ask the service for its list of IDs and compare it with your own list |
| Payment | Methods available in your country, closing documents, how long a balance lasts | Payment page and FAQ, a question to support about documents for a legal entity |
| Compatibility | Which API format, whether streaming, tools and image input work | Run your real request, not the example from the docs |
| Price | The invoice currency, any markup, any top-up fee | Work out the cost of your own task, not the price of a million tokens |
| Data | Whether prompts are stored, used for training, and who is in the chain of recipients | Legal section and data policy; do not send secrets in a test |
| Limits | Whether quotas are published, what comes back when you exceed them | A batch of parallel requests, check for the 429 code and headers |
| Reliability | What happens when a provider fails, whether there is a status page and an SLA | Status page, contract terms, a separate question about fallback |
On data, let us be direct, because this is the gap people most often miss. Technically any aggregator sees your prompts and responses. codexkey's documentation says that storage and training terms depend on the API supplier and the chain of recipients, that confirming those terms is not finished, and that there is no blanket guarantee against storage or training. If your requests carry personal data or private code, read the legal section before the first request, or keep your own gateway.
One key, different models: a Python example
A single call looks like this. The sk_cdx_... key is created in the codexkey dashboard under "API keys," and the endpoint is OpenAI-compatible:
from openai import OpenAI
client = OpenAI(
base_url="https://api.codexkey.online/v1",
api_key="sk_cdx_YOUR_KEY",
)
print([m.id for m in client.models.list().data])
for model in ["claude-sonnet-5-5", "gpt-6-sol", "gemini-3.8-flash", "deepseek-v4.1-flash", "qwen3.8-flash"]:
reply = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "What is the difference between a process and a thread? Two sentences."}],
)
usage = reply.usage
print(model, usage.prompt_tokens, usage.completion_tokens)
print(reply.choices[0].message.content)
The first command after creating the client prints the IDs of all available models, and GET https://api.codexkey.online/v1/models returns the same data. Prices for the five models in the example (the codexkey price list as of October 29, 2026; current prices are on the models page):
| ID | Input / output per 1M tokens, USD | Context |
|---|---|---|
claude-sonnet-5-5 | 0.52 / 2.6 | 1000K |
gpt-6-sol | 0.14 / 0.68 | 1000K |
gemini-3.8-flash | 0.2 / 0.96 | 1000K |
deepseek-v4.1-flash | 0.04 / 0.16 | 1000K |
qwen3.8-flash | 0.1 / 0.28 | 1000K |
Claude also has a native format: the address https://api.codexkey.online without /v1 works with the Anthropic SDK and Claude Code. Images and video go through the same key: POST /v1/images/generations and POST /v1/videos, and you are charged only for a successful result. The key's channel is chosen in the dashboard: Premium opens all models, Cheap costs less but carries only part of the catalog. codexkey does not sell subscriptions to vendor apps (ChatGPT, Claude and the like). This is API access only.
Some things at codexkey are more modest than at certain competitors. A key can have a name, a channel and an expiry date, and you can watch its spend, but RPM, TPM, budgets and per-key model lists cannot be configured through the key API. Numeric quotas are not published, so answer a 429 with a retry after a delay, as the rate limits guide describes. The balance has no expiry date. If you need budgets per team and project, look at your own LiteLLM gateway.
Which model to pick for code is covered in the best AI for programming.
Free AI model APIs: what is really free
"Free" in an API almost always means "with limits and conditions." Here is what exists as of October 29, 2026:
- OpenRouter, models with the
:freesuffix. Per the documentation: 20 requests per minute and 50 per day while you have bought fewer than 10 credits, and 1000 per day once you have bought at least 10. - Gemini API. The free tier includes Gemini 3.8 Flash, while Gemini 3.1 Pro Preview is not available there. Google notes that free-tier data may be used to improve its products (Gemini API pricing page). How to get a key from Russia is the subject of Gemini API: key and access from Russia.
- codexkey. The models
deepseek-v4.1-flash-1017-free,minimax-m3-freeandqwen3.8-flash-freecost $0 per token. See the models page for limits and conditions.
That is enough for a prototype. We would not build a production service on a free tier: terms change without notice, and some free plans hand data over to improve the vendor's product.
When you do not need an aggregator
In three cases we would point you elsewhere:
- You need one vendor and can pay them directly. A direct API is simpler then: every vendor feature and a single contract. Check beforehand that your country is on the supported list.
- You have strict data requirements. If prompts must not leave your infrastructure, run your own gateway and keep the vendor keys with you.
- You need team-level control. Budgets and limits per key, project and person are stronger in LiteLLM, because you configure them yourself.
Also check the vendor features a gateway may not pass through: batch processing, prompt caching, fine-tuning. If you need them, ask support before you pay.
FAQ
What is an AI model aggregator?
A service that collects the APIs of models from different developers behind one address and one key, keeps a single balance and usually copies the OpenAI format. You choose the model with the model parameter, and the rest of your code stays the same.
How does an AI API through an aggregator differ from the direct API?
Instead of several keys and accounts you have one, payment works from your country, and the request format is uniform. In exchange there is an intermediate server: it sees your requests, can add a markup and some latency, and vendor features reach you only as far as the aggregator passes them through.
Are there free AI model APIs?
Yes, with limits. OpenRouter has :free models with a quota of 50 requests per day without buying credits, the Gemini API has a free tier for Gemini 3.8 Flash, and codexkey has three models priced at zero. These tiers do not suit production, since conditions and limits change.
Where can I buy an AI model API for rubles?
At Russian aggregators (ProxyAPI and Polza.ai, for example, accept rubles) and at codexkey, where you pay with a Russian card, through SBP or with crypto. You cannot open direct access at OpenAI and Anthropic while Russia is missing from their supported-country lists.
How do I get API keys for AI models?
At codexkey: register, create an sk_cdx_... key under "API keys" in the dashboard and top up the balance. Then set https://api.codexkey.online/v1 as the base_url in the OpenAI SDK, or https://api.codexkey.online in the Anthropic SDK. One key sees the whole model catalog available to its channel.
Is it safe to send data through an aggregator?
It depends on the service's policy. An aggregator technically sees prompts, so read the legal section and the data policy. codexkey gives no blanket guarantee against storage and training, and confirmation of the recipient chain is not finished. Do not send private code or personal data without checking first.
How does codexkey differ from OpenRouter?
OpenRouter has hundreds of models and automatic fallback between providers; the codexkey catalog is more modest, at 44 text models and 17 image and video models as of October 29, 2026. In return, codexkey accepts payment by Russian card, through SBP and with crypto, and gives one key for Claude, GPT, Gemini and other models with no vendor account. A detailed comparison is in codexkey vs OpenRouter.