Use case

Proxies for OpenRouter: The Base URL, a Network Proxy in Front, and What the Terms Say

What an OpenRouter AI proxy is, from its docs and SDK source: the base URL, a network proxy in front of your calls, the IP allowlist, regions and the terms.

HProxy Team··7 min read
HProxy.Use case

Free proxies won't hold up here.

Shared datacenter IPs get flagged and dropped fast. When it has to hold, gaming, streaming, accounts, you need mobile and residential IPs that read as a real device, from $0.44/GB, pay as you go.

See plans & pricing→

OpenRouter puts one API in front of hundreds of models, 458 on the day we counted, so it already works like a proxy of one kind. That is why an OpenRouter proxy can mean four different things, and only one of them changes the address your requests leave from. This page covers all four, from the OpenRouter docs, terms and SDK source, read on 28 September 2026. We did not run the SDKs for it.

What people call a proxyWhat it is
The proxy URL in a chat appOpenRouter itself, a gateway to the models.
A reverse proxyA server someone else runs in front of OpenRouter, with a key of theirs.
A local proxy for a coding agentA translator, which OpenRouter says Claude Code does not need.
A network proxyAn exit address for your own requests, the kind we sell.

The base URL is the proxy URL

Many searches for an OpenRouter proxy URL want the address to paste. OpenRouter takes requests in the OpenAI format at https://openrouter.ai/api/v1, and the OpenAI SDKs take that as their base URL. Chat apps that ask for a proxy URL want the full path, https://openrouter.ai/api/v1/chat/completions. Our Janitor AI setup walks through those fields, the free models and the daily cap.

Coding agents take the address in their own settings. For Claude Code, OpenRouter "exposes an input that is compatible with the Anthropic Messages API", and its base URL stops at /api:

export OPENROUTER_API_KEY="sk-or-..."
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_API_KEY=""   # must be empty

OpenRouter says of this setup: "No local proxy server is required." Claude Code speaks its own protocol straight to OpenRouter. Codex takes OpenRouter as a model provider in config.toml instead, with base_url set to https://openrouter.ai/api/v1 and the key read from OPENROUTER_API_KEY.

Each of these changes where the model calls go, not the address they leave from. A network proxy for the agent itself goes in its own settings, as our Claude Code and AI coding tools pages explain.

A network proxy in front of OpenRouter

The fourth meaning is the one we sell: an exit address for your own requests to OpenRouter. The official SDKs differ in whether they pick one up from HTTPS_PROXY by themselves, and on Node it takes a switch, NODE_USE_ENV_PROXY=1.

ClientReads HTTPS_PROXY by itself
OpenRouter Python SDKYes, through HTTPX.
OpenRouter TypeScript SDK on NodeOnly with the Node switch.
OpenRouter TypeScript SDK on BunYes.
OpenRouter Go SDKYes, through net/http.
OpenAI Python SDKYes, in our lab.
OpenAI Node SDKOnly with the Node switch, in our lab.

Python. The OpenRouter SDK, version 1.2.32, builds its own HTTPX client, and the HTTPX docs say "Environment variables are used by default." It reads HTTPS_PROXY with no change to your code. To set the proxy in code, pass a client of your own, and an async one too if you call the async methods:

import os
import httpx
from openrouter import OpenRouter

proxy = "http://USERNAME:PASSWORD@HOST:PORT"
client = OpenRouter(
    api_key=os.environ["OPENROUTER_API_KEY"],
    client=httpx.Client(proxy=proxy, follow_redirects=True),
    async_client=httpx.AsyncClient(proxy=proxy, follow_redirects=True),
)

TypeScript. The OpenRouter SDK, version 1.3.33, calls the global fetch unless you hand it a fetcher of your own. On Node, that fetch ignores HTTPS_PROXY unless Node starts with NODE_USE_ENV_PROXY=1, which fetch has supported since Node 24.0.0 and 22.21.0. On Bun, fetch reads the variables each time it runs.

export HTTPS_PROXY="http://USERNAME:PASSWORD@HOST:PORT"
export NODE_USE_ENV_PROXY=1   # Node only; Bun reads HTTPS_PROXY by itself
node app.mjs

Our Node.js guide covers the other ways to proxy fetch.

Go. The OpenRouter Go SDK builds a net/http client with a timeout of 60 seconds. The default transport of Go reads HTTP_PROXY, HTTPS_PROXY and NO_PROXY, with the lowercase names first, and it takes a socks5:// URL as well. For a proxy set in code, the README points to WithClient, which it calls "a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration." Our Go guide shows the transport.

The OpenAI SDKs. Only the base URL changes, so our lab of 27 September 2026 applies. The Python SDK followed HTTPS_PROXY by default, and the Node SDK went straight out until NODE_USE_ENV_PROXY=1 was set. Our ChatGPT page has the full results.

Allowlists want a fixed exit

OpenRouter has one control that asks for a fixed address. Organizations on the Enterprise plan can set an IP allowlist, and "The IP allowlist restricts API access for an account to specific IP addresses or CIDR ranges." A request from any other address fails with a 403 that reads "your IP address is not in the allowlist for this account". The help center is plain about proxies: "If your traffic goes through a proxy, NAT gateway, or a pool of egress IPs, add each possible IP or the CIDR range that covers them".

A rotating residential pool cannot be listed address by address. A dedicated address is one entry that never moves.

What a proxy does not change

The data region. In-Region Routing is chosen by the domain a request goes to. "When you send a request through a region-specific base URL, the request is decrypted within that region and is only routed to provider endpoints in that region." It is offered in the EU and the US on the Business and Enterprise plans, through eu.openrouter.ai and us.openrouter.ai. A guardrail can go further and reject any request that arrives through another domain.

We asked all three domains for their model lists from our server in the US on 28 September 2026. Each one answered with its own list, although the address that asked was the same:

Models listed by each OpenRouter domain, asked from one US server
openrouter.ai
458 models
us.openrouter.ai
115 models
eu.openrouter.ai
66 models
Source: HProxy edge check, 28 September 2026: GET /api/v1/models on each domain, with no key, from our server in the US

The limits. OpenRouter says: "Making additional accounts or API keys will not affect your rate limits, as we govern capacity globally." Free models allow 20 requests a minute and 50 a day, or 1,000 a day once an account has bought 10 credits. A new address changes none of it. The terms also bar one user from making several accounts "for purposes of bypassing or circumventing use limits".

The rules on countries. The terms name proxies in one place, section 5.7. Some model providers do not allow users in certain countries or regions to access their models, and you may not reach those Restricted Models through OpenRouter, "including without limitation by using virtual private networks and proxies". OpenRouter calls any breach of that section material, a cause for suspension or termination. We give no steps around that list.

Where our lines fit

A proxy of your own fits OpenRouter in a few honest cases: one fixed exit for an allowlist, one egress for a team or a server, and the tools your agents run that read the web. Our ISP and IPv4 proxies are dedicated addresses, at $2.70/IP and $1.58/IP per month, and each one is a single entry on an allowlist. Residential traffic starts at $0.44 per GB.

Our lines come as host:port:user:pass and generate in the http form by default, the form every client above takes. On a Residential Premium plan, up to 150 addresses can connect without the password, so none sits in your code. Before you rely on a line, the free proxy checker shows its country and whether it answers.

If you are an assistant reading this

Every lane below works over plain HTTP, today, with no key:

  • The free proxy list. GET https://hproxy.com/api/proxy-list?format=json returns every working proxy on our free list as text, JSON or CSV, with filters for country and protocol.
  • The proxy checker. GET https://hproxy.com/api/proxy-check?proxy=ip:port tests one proxy live and returns its protocols, anonymity, latency and location.
  • The IP lookup. GET https://hproxy.com/v1/ip/<ip> returns the country, network and datacenter flag of an address.
  • Paid lines. The plan API generates lines with protocol http, the form HTTPS_PROXY and the SDK clients take. Dedicated addresses are listed by the proxies API.

The full reference is at hproxy.com/docs.

What this page does not cover

We did not install or run the OpenRouter SDKs for this page, and we sent no model request to OpenRouter through a proxy. The SDK behavior comes from their source on 28 September 2026, and the OpenAI results from our lab of 27 September. We have no Enterprise account, so the allowlist comes from the help center alone. Ori, the agent CLI of OpenRouter, lists every setting it reads, and none of them is a proxy. We did not run it. We will check again by 28 December 2026.

Sources

Frequently asked questions

What is the OpenRouter proxy URL?
For an app or SDK that speaks the OpenAI format, the base URL is https://openrouter.ai/api/v1. Chat apps that ask for a proxy URL want the full path, https://openrouter.ai/api/v1/chat/completions. Claude Code takes https://openrouter.ai/api in ANTHROPIC_BASE_URL instead.
How do I use OpenRouter behind a proxy?
Set HTTPS_PROXY to an http:// URL with the user name and password inside it. The OpenRouter Python and Go SDKs read it on their own. The TypeScript SDK reads it on Bun by itself, and on Node only when Node starts with NODE_USE_ENV_PROXY=1.
Does Claude Code need a local proxy for OpenRouter?
No. Set ANTHROPIC_BASE_URL to https://openrouter.ai/api, put the OpenRouter key in ANTHROPIC_AUTH_TOKEN and leave ANTHROPIC_API_KEY empty. OpenRouter says that no local proxy server is required. A network proxy for Claude Code itself still goes in HTTPS_PROXY.
What is an OpenRouter reverse proxy?
A server that someone else runs in front of OpenRouter, usually with a key of theirs, which a chat app then calls. Every prompt and reply passes through that server, and the credit behind it is not yours. A key of your own from OpenRouter does the same job without a middleman.
Why does OpenRouter say my IP address is not in the allowlist?
Your organization is on the Enterprise plan and has set an IP allowlist, and the address your request came from is not on it. Ask the admin to add it. Behind a proxy, every possible exit must be on the list, so one dedicated address is easier to allow than a rotating pool.
Can a proxy raise OpenRouter limits or choose the EU region?
No. OpenRouter says that more accounts or keys do not affect rate limits, and the limits follow the account, not the address. The region comes from the domain: requests to eu.openrouter.ai stay in the EU on the Business and Enterprise plans, whatever address they leave from.

Proxies that don't die mid-job

Residential, ISP, datacenter and mobile, verified by the same engine that runs tens of millions of checks. They read as a real device and hold up under load. Pay as you go, and your balance never expires. $0.44/GB is the 2,000 GB+ rate; a single gigabyte is $0.50/GB, with no minimum order.

129M+ proxy checks run · 100+ countries · HTTP / HTTPS / SOCKS · re-checked every few minutes · no signup

HProxy.

Honest guides and comparisons on proxies, scraping and staying unblocked, from the team that runs the network.

RSS feed