“AI proxy” means three different things depending on who says it. To a developer, an AI proxy is a gateway that sits in front of LLM APIs such as OpenAI, Anthropic or Gemini. In AI chat apps, the “proxy” is the API address and key you paste in to connect a model. To a data team, AI proxies are the residential, mobile and datacenter IPs that collect web data for training, retrieval and AI agents. This guide explains all three, shows how each one works, and helps you pick the one you need, including rotating residential proxies for AI data collection.
The short version
An AI proxy is an intermediary between an AI system and the outside world: either an LLM gateway that routes, meters and logs calls to model APIs, or a pool of IP proxies that lets AI crawlers, RAG pipelines and agents fetch web pages from the right country without being blocked. If you are calling models, you want a gateway such as LiteLLM, Kong’s AI Proxy plugin or Cloudflare AI Gateway. If you are collecting web data for a model, you want residential, mobile or datacenter proxies.
What is an AI proxy?
One name, three jobsA proxy is anything that makes a request on someone else’s behalf. MDN’s guide to proxy servers draws the basic line: a forward proxy acts for clients and can hide who they are, while a reverse proxy acts for servers and sits in front of them. Every kind of AI proxy is one of these two, applied to AI traffic.
1. LLM gateway (API layer)
your app --> gateway: keys, limits, logs, fallback --> OpenAI / Anthropic / Gemini
2. Chat app "proxy" (a setting)
chat app --> API URL + key you paste in --> model provider or router
3. Proxies for AI data (IP layer)
crawler / RAG / agent --> proxy exit IP (residential, mobile, datacenter) --> website
| Kind | What it changes | Typical examples | Who needs it |
|---|---|---|---|
| LLM gateway | Which model a request goes to, who may call it, how much they spend, what gets logged | LiteLLM, Kong AI Proxy plugin, Cloudflare AI Gateway, the open-source aiproxy project | Teams building products on several model APIs |
| Chat app proxy | Which model a chat front end talks to, and whose key pays | An OpenRouter or model-provider endpoint entered in a chat app’s settings | People using character-chat and roleplay apps |
| Proxies for AI data | The IP address and location a website sees | Rotating residential, mobile, datacenter and static residential proxies | Anyone crawling the web for training data, RAG or agents |
The first two work at the API layer and never touch the websites your model learns from. The third works at the network layer and never touches the model. Mixing them up is the most common reason people buy the wrong thing.
Key takeaways
- An LLM gateway is software you run or rent in front of model APIs; it isn’t a pool of IP addresses.
- In chat apps, “proxy” simply means the API endpoint and key the app sends your messages to.
- Proxies for AI data are ordinary proxy networks used for AI workloads: crawling, retrieval and browsing agents.
- Model APIs identify you by API key, so routing them through residential IPs adds cost, not access.
AI proxy servers for LLM APIs
One endpoint in front of many modelsWhen a team uses more than one model provider, every app ends up holding several API keys, several SDKs and several sets of rate limits. An AI proxy server, usually called an LLM gateway, puts one endpoint in front of all of them. Your code calls the gateway as if it were the model API; the gateway picks the provider, adds the real key, makes the call and returns the answer.
The documented features are similar across the main options:
- One API format. Kong’s AI Proxy plugin accepts requests in standard OpenAI formats, translates them to the target provider’s format and transforms the response back. LiteLLM describes itself as an OpenAI-compatible proxy server for calling more than 100 LLMs through one interface.
- Keys, budgets and limits. LiteLLM issues virtual keys per user or team and can set budgets and rate limits on each. Cloudflare AI Gateway offers rate limiting and spend limits.
- Caching, retries and fallback. Cloudflare AI Gateway can serve repeated requests from its cache, retry failed requests and fall back to another model.
- Logging and analytics. Gateways record requests, tokens, errors and cost in one place, which is often the reason a company adopts one.
# start the gateway
$ litellm --model huggingface/bigcode/starcoder
#INFO: Proxy running on http://0.0.0.0:4000
# any OpenAI-compatible client now talks to the gateway
import openai
client = openai.OpenAI(api_key="anything", base_url="http://0.0.0.0:4000")
response = client.chat.completions.create(
model="huggingface/bigcode/starcoder",
messages=[{"role": "user", "content": "Say hello"}],
)
print(response.choices[0].message.content)
The important detail is base_url. OpenAI’s official Python library lets you change the address the client calls, through that argument or the OPENAI_BASE_URL environment variable, which is why most gateways copy OpenAI’s request format: existing code switches over by changing one line.
Note what a gateway does not do. It doesn’t change your IP address in any way that matters to the model provider, and it doesn’t get you access a provider hasn’t granted. Model APIs authenticate you with an API key. OpenAI states that accessing or offering access to its services from outside its supported countries and territories may get an account blocked or suspended, and no proxy of any kind changes that rule.
What “proxy” means in AI chat apps
Janitor AI and similar front endsA large share of “AI proxy” searches come from users of character-chat apps such as Janitor AI. In these apps, a proxy is a settings entry: the address of an OpenAI-compatible API, a model name and an API key. The app sends your messages there instead of to its own built-in model. Janitor AI’s help centre, for example, walks users through proxy configurations that point at OpenRouter, a router that exposes many models behind one endpoint at https://openrouter.ai/api/v1.
That also explains the errors people search for. A 401 means the key was rejected. A 429 means a rate limit was hit, either at the router or at the upstream model provider. OpenRouter’s documentation sets the limits for free model variants (model IDs ending in :free): 20 requests a minute, and 50 requests a day for accounts that have bought fewer than 10 credits, rising to 1,000 a day once at least 10 credits have been purchased. If you keep hitting 429 on a free model, that daily cap is usually why.
None of this involves IP proxies. A residential or mobile proxy won’t fix a 401 or a 429 from a model API, because the limit is tied to your key and account, not to your address.
Proxies for AI data collection
Web data for training, RAG and agentsThe third meaning is the one a proxy provider serves. AI systems read the web in three ways, and all three depend on fetching pages reliably:
- Training and fine-tuning data. Teams crawl public pages to build or extend datasets: product catalogues, reviews, forums, news, documentation. The crawl makes millions of requests, so no single IP address can carry it.
- Retrieval (RAG). A retrieval-augmented system fetches fresh pages at question time and feeds them to the model. Speed and a low failure rate matter more than volume.
- Agents. An AI agent drives a browser through a multi-step task: search, open results, compare, fill a form. It needs the same IP for the whole task.
Websites don’t treat these fetches the way they treat a person. Heavy traffic from one datacenter address gets rate-limited, challenged or served a block page, and a block page fed to a model becomes bad training data or a wrong answer. Many sites also change content by location: prices, stock, search results, language and even which products exist. A model trained or grounded only on pages fetched from one US server sees one country’s version of the web.
A proxy network fixes both problems. It spreads requests across many IPs, and it lets you choose the country, city or network each request leaves from, so the dataset covers the markets it claims to cover. We go deeper on the pipeline in LLMs and data gathering and on dataset building in LLM training data and the role of proxies.
Which proxy type fits which AI workload
Match the exit IP to the job| Workload | Proxy type | Session | ProxyEmpire price |
|---|---|---|---|
| Bulk crawl of tolerant sites | Rotating datacenter | New IP per request | $0.625/GB on the 40 GB plan, down to $0.35/GB on the largest |
| Protected sites, local prices, geo-specific data | Rotating residential | New IP per request | $3.50/GB pay-as-you-go, down to $1.50/GB at 1 TB |
| RAG live retrieval | Rotating residential, targeted to the user’s country | Per fetch, fast retry on a fresh IP | As residential |
| Agents and mobile-first sources | Residential or rotating mobile | Sticky, one IP per task | Mobile $4.50 → $2.00/GB (currently 50% off list) |
| Fixed identity, allowlisting | Static residential (ISP) | Same IP for the whole term | $3.50 → $2.00 per IP a month, in 24 countries |
ProxyEmpire’s network has 30M+ residential IPs in 179 countries and territories and 4M+ mobile IPs in 174 countries, with 99.9% uptime on its public status page. Rotating residential and mobile proxies can be targeted by country, region, city, ZIP, ISP or carrier, ASN and OS fingerprint, all at no extra charge; static residential and datacenter proxies are targeted by country. Every type supports HTTP, HTTPS and SOCKS5 with username and password authentication, and unused bandwidth rolls over.
Proxies for AI agents that browse
Sessions, not single requestsAn agent looks like a person using a browser, and it needs what a person has: one address for the whole task, a browser whose language and time zone match that address, and its own isolated session. Rotating the IP halfway through a checkout or a paginated search breaks the site’s session and often triggers a challenge.
Use sticky sessions for agents. On ProxyEmpire a sticky IP has no fixed time limit: it stays until you rotate it or the device behind it goes offline, and a custom session length of up to two hours gives you a set window instead. Give each agent run its own session ID so one blocked run doesn’t affect the others.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({
proxy: {
server: 'http://v2.proxyempire.io:5000',
username: 'YOUR_PROXY_USERNAME',
password: 'YOUR_PROXY_PASSWORD'
}
});
const page = await browser.newPage();
await page.goto('https://example.com');
await browser.close();
})();
Playwright can set the proxy for the whole browser, as above, or per browser context, which suits running several agents from one browser process with a separate exit IP for each. Its docs note that the username and password options apply to HTTP(S) proxies, so use the HTTP endpoint when your agent framework runs on Playwright. For agents that manage their own proxy setup, ProxyEmpire also offers an MCP server that lets Claude, ChatGPT, Cursor and other MCP clients read balances, generate proxy lists and diagnose connections; it is described on the web scraping proxies page.
“AI-powered” AI proxy features: what to check
Smart rotation, auto-retry and unblockersSome providers market their networks as AI proxies because of software features on top of the IPs. The claims vary, but they usually come down to four things:
- Automatic retries. A failed request is retried on a new IP before the error reaches you.
- Success-based routing. The provider steers traffic toward IPs or subnets that recently worked on a given site.
- Unblocker or scraping APIs. You send a URL and get back rendered HTML, with browser rendering and challenges handled on the provider’s side.
- Parsing. Some APIs return structured data, sometimes using a language model to extract fields from the page.
These can be useful, but the label tells you little. Whether a provider calls its routing “AI” or “rules”, the result depends on the IP pool underneath and on how the logic treats your targets. Judge it by testing: run a sample of your real URLs through a trial, measure the share of clean responses (not block pages), and check whether retries are billed by the gigabyte or only on success.
You can also build the same logic yourself on a plain proxy network in a few lines of code: detect a block page, retry with a new session ID, back off when a site returns 429. ProxyEmpire gives you the building blocks, per-request rotation, sticky sessions and custom session lengths, and the retry policy stays in your code, where you can see and change it.
How to choose the best AI proxy for your job
Start from what you are routingFor data collection, a few questions separate providers quickly. Does the pool have real depth in the countries your dataset needs, not just a country count? Can you target a city or network when prices or results change by region? Is the price per gigabyte workable at your crawl size, and does unused bandwidth expire? Can you test on your own targets before committing? ProxyEmpire’s $1.97 trial includes 100 MB of residential and 50 MB of mobile traffic, never expires and needs no KYC, which is enough to measure clean-response rates on a sample of your URLs.
Rules to follow when AI collects web data
Robots.txt, site terms and blocked categoriesA proxy changes where a request comes from, not what you are allowed to collect. Respect robots.txt, which RFC 9309 standardises as the Robots Exclusion Protocol, and follow each site’s terms and the data-protection law that applies to you. OpenAI’s own crawler documentation shows how sites now separate uses: GPTBot collects content that may be used for training, OAI-SearchBot supports search, and sites can allow one and disallow the other. If you run a training crawl, identify it honestly and honour opt-outs; we cover the details in the LLM training data guide.
On ProxyEmpire, financial, government, bank, payment and crypto exchange sites are blocked on every proxy type; see which websites are blocked. Only ports 80 and 443 are open by default, and there is no UDP, which covers web crawling and API traffic.
Free AI proxies
What “free” really gets youPeople search for a free AI proxy in two senses, and the honest answer differs for each.
- Free chat-app proxies. Public endpoints shared in chat communities route every message you send through someone else’s server. You can’t see what it logs, and you can’t know whose API key pays for it. The safer free option is a provider’s own free tier, such as OpenRouter’s
:freemodel variants, within the limits described above. - Free IP proxy lists. Open proxies from public lists are slow, short-lived and often already blocked by the sites you want. Worse for AI work, they return block pages and injected content that end up in your dataset. We don’t publish lists for that reason.
For data collection, a low-cost trial on a clean network is the practical alternative. It costs less than the time spent filtering bad pages out of a dataset built on free proxies.
AI proxy FAQ
Short answersWhat is an AI proxy?
An intermediary for AI traffic. It is either an LLM gateway in front of model APIs, the API endpoint a chat app sends messages to, or a proxy network used to collect web data for AI.
What is an AI proxy server?
Usually an LLM gateway: software such as LiteLLM or Kong’s AI Proxy plugin that exposes one OpenAI-style endpoint and routes each request to the right model provider, with keys, limits and logging.
What does proxy mean in Janitor AI?
It is the setting where you enter an OpenAI-compatible API URL, a model name and a key, for example from OpenRouter. The app then sends your chats to that model.
Why do I get a 429 error on my AI proxy?
A rate limit was reached at the router or the model provider. On OpenRouter’s free variants the cap is 20 requests a minute and 50 or 1,000 requests a day, depending on credits purchased.
What is the best AI proxy?
It depends on the kind you need. For collecting web data for training, RAG or agents, ProxyEmpire’s rotating residential and mobile proxies give you deep geo-targeting, sticky sessions and a $1.97 trial.
Which proxies are best for AI training data?
Rotating datacenter proxies for tolerant sites at the lowest cost, and rotating residential proxies for protected or location-dependent sites. Most large crawls use both.
Do I need a proxy to use the OpenAI API?
No. The API identifies you by key. OpenAI warns that access from outside its supported countries may lead to an account being blocked, so a proxy is not a way around that.
Is an LLM gateway the same as a reverse proxy?
It works like one from your app’s point of view: your code calls the gateway’s address as if it were the model API, and the gateway makes the real call to the provider.
Can AI agents use residential proxies?
Yes. Give each agent task a sticky session so it keeps one IP from start to finish, and match the browser’s language and time zone to the proxy’s location.
References
Primary documentation- MDN Web Docs — “Proxy servers and tunneling”. developer.mozilla.org
- Kong — “AI Proxy” plugin documentation. developer.konghq.com/plugins/ai-proxy
- LiteLLM — “LiteLLM AI Gateway (LLM Proxy)”. docs.litellm.ai/docs/simple_proxy
- LiteLLM — “CLI Quick Start”. docs.litellm.ai/docs/proxy/quick_start
- Cloudflare — “AI Gateway” overview. developers.cloudflare.com/ai-gateway
- labring — “aiproxy” project README. github.com/labring/aiproxy
- OpenAI — official Python library README (base URL and HTTP client options). github.com/openai/openai-python
- OpenAI — “Supported countries and territories”. developers.openai.com
- OpenAI — “Overview of OpenAI Crawlers”. platform.openai.com/docs/bots
- OpenRouter — “Quickstart”. openrouter.ai/docs/quickstart
- Janitor AI Help — “OpenRouter Error Guide”. help.janitorai.com
- Playwright — “Network: HTTP Proxy”. playwright.dev/docs/network
- IETF — RFC 9309, “Robots Exclusion Protocol” (2022). rfc-editor.org/rfc/rfc9309
Web data for your models, from the country that matters
30M+ residential IPs in 179 countries and territories and 4M+ mobile IPs in 174 countries, with city, ISP and ASN targeting at no extra charge, sticky sessions for agents, rotating datacenter for bulk crawls, and 24/7 support from real people. The $1.97 trial includes 100 MB of residential and 50 MB of mobile traffic.














