Use case

Proxies for Claude: claude.ai, the API and Company Networks, From the Anthropic Docs

What a Claude proxy means, from relays to network proxies, and where a proxy goes for claude.ai, the Claude API SDKs and company networks, per Anthropic.

HProxy Team··Updated September 27, 2026·5 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→

A Claude proxy means one of three things. A relay or "Claude proxy URL" passes your chats to Claude through someone else, often on shared keys. A gateway, such as the claude-code-proxy projects, sits between Claude Code and another model provider. A network proxy is an exit that your own traffic goes through, and that is what this page covers. It rests on the Anthropic docs, the Claude help center and the Anthropic terms, plus one check from our server.

The first kind deserves a warning. The Anthropic terms say: "You may not share your Account login information, Anthropic API key, or Account credentials with anyone else." A relay that runs on shared keys breaks that rule, and it reads every message you send. For Janitor AI, our Claude on Janitor AI page covers the routes that use your own key.

Where the proxy goes

Where you use ClaudeWhere the proxy goes
claude.ai in a browserBrowser or system settings
The Python SDKAn http_client with a proxy
The TypeScript SDKfetchOptions with a proxy agent
Claude CodeHTTPS_PROXY

In Python, Anthropic says to pass your own client "To customize the HTTP client, including proxies and transports". The SDK now runs on httpx2, a fork of httpx. "Passing a client from the separate httpx package raises a TypeError." Use the client the SDK exports:

from anthropic import Anthropic, DefaultHttpxClient

client = Anthropic(
    http_client=DefaultHttpxClient(proxy="http://USERNAME:PASSWORD@HOST:PORT"),
)

In TypeScript, Anthropic shows fetchOptions with a ProxyAgent from the undici package. We did not run the Anthropic SDK. We ran the same pattern with the Perplexity Node SDK, on Node 24.21.0 with undici 8.11.2. The call failed before it reached our proxy. It worked once the fetch of undici was passed in as well. For Claude Code, our Claude Code page covers HTTPS_PROXY, NO_PROXY and the settings file. The help articles we read name no proxy setting for the desktop app, and we did not test it.

What companies do with a proxy and Claude

Anthropic documents two controls that work through the network. With Tenant Restrictions, the company proxy adds a header to Claude traffic: "When enabled, your network proxy injects an HTTP header into requests to Claude. Anthropic validates this header and blocks access from any organization not in the allowed list." The proxy has to inspect TLS to do that:

anthropic-allowed-org-ids: <org-uuid-1>,<org-uuid-2>,...

The second control is IP allowlisting, and "IP allowlisting is available for Enterprise plans only." When it is on, Anthropic checks the source address of every authenticated request against the allowlist of the organization. The list should include office locations and "VPN exit points". Staff who reach Claude through a company proxy need its exit address on that list.

For firewall rules, Anthropic says its "services use fixed IP addresses for both inbound and outbound connections". Incoming traffic arrives at 160.79.104.0/23. Anthropic also names the firewall, the network or a VPN as usual causes of API connection errors. One of its steps is to make sure no VPN is in use for the request. A proxy is an exit much like a VPN, so check it first when API calls fail.

What we measured

We asked Claude for a few pages from our server in a data center, with no proxy and plain curl. claude.ai and its login page answered with an HTTP 403 and a Cloudflare challenge page, "Just a moment...". The API answered a call without a key with 401, "x-api-key header is required", and no challenge. The web app expects a person in a browser, and we give no steps past the challenge.

What never changes

Anthropic publishes where Claude is offered, under "You can access Claude in the following locations:". It also lists the countries where it offers commercial API access. The terms forbid making an account "available to anyone else". They also forbid reaching the Services "through automated or non-human means, whether through a bot, script, or otherwise", except through an API key. API limits are set "at the organization level" by usage tier. A proxy changes the exit, not any of this, and we give no steps around it.

Where our lines fit

The fitting job for our lines here is a fixed exit. A dedicated ISP or IPv4 address stays the same, so an Enterprise admin can put it on the Claude IP allowlist. Those cost $2.70/IP and $1.58/IP per month. Our lines come as host:port:user:pass. In Chrome and other Chromium browsers, use the http form, because those browsers never send a SOCKS5 user name and password. On a Residential Premium plan, up to 150 addresses can connect without the password, so none sits in your code or settings. Residential lines start at $0.44 per GB.

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 browsers and the SDK examples take. Dedicated addresses are listed by the proxies API.

The full reference is at hproxy.com/docs.

What this page does not cover

This page rests on the Anthropic docs and help center, not on a lab of our own: we ran no Claude SDK, app or relay. The TypeScript note comes from our Perplexity test, labelled as such. We did not test the desktop or mobile apps behind a proxy. The Python SDK moved to httpx2 recently, and help articles change without notice, so we will check again by 27 December 2026.

Sources

Frequently asked questions

What is a Claude proxy?
Usually one of three things. A relay or proxy URL passes your chats to Claude through someone else. A gateway, such as the claude-code-proxy projects, puts other models behind Claude Code. A network proxy is an exit that your own traffic goes through. This page covers the last one and points to the others.
Is a Claude proxy free?
Free or cheap Claude proxy URLs run on the access of someone else, and every message passes through their server. The Anthropic terms forbid sharing account logins, API keys or credentials, so those relays break the rules and expose your chats. We do not recommend them.
How do I use Claude behind a proxy?
For claude.ai, set the proxy in the browser or the system settings. For the API, put it in the SDK: an http_client with a proxy in Python, or fetchOptions in TypeScript. Claude Code takes HTTPS_PROXY, as our Claude Code page shows.
How do I set a proxy for the Claude API?
In Python, pass DefaultHttpxClient(proxy=...) from the anthropic package as http_client, since a client from the separate httpx package raises a TypeError. In TypeScript, Anthropic shows fetchOptions with an undici ProxyAgent. When we tried that pattern with another SDK, it only worked once the fetch of undici was passed in too.
How do I use a Claude proxy with Janitor AI?
That is a different setup, where Janitor AI calls the Claude API with your own key. Our Janitor AI page covers both routes and what a message costs.
What is claude-code-proxy on GitHub?
A gateway, not a network proxy. Projects by that name sit between Claude Code and a model provider, so they change which model answers, not the exit your traffic uses. Our Claude Code page covers both kinds.

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