Cohere sells language, embedding and rerank models through an API, with SDKs for Python and TypeScript. For most tools, a network proxy is one variable, HTTPS_PROXY. For the current Cohere Python SDK it is not, and this page starts with why. It rests on the Cohere docs and SDK source, and on the released Python packages, read on 28 September 2026. We did not run the SDKs for it.
Where the proxy goes
| Client | Where the proxy goes |
|---|---|
| The dashboard | The browser or the system proxy. |
| Python SDK 7.0.6 and later | An HTTPX client with a proxy, in httpx_client. |
| Python SDK 7.0.5 and earlier | HTTPS_PROXY. |
| TypeScript SDK | The Node switch, or a fetch of your own. |
| OpenAI SDKs on Cohere | As with OpenAI, since only the base URL changes. |
Why the Python SDK ignores HTTPS_PROXY
The Python SDK sends its requests through HTTPX, and HTTPX reads the proxy variables by default, with one exception. In its source, the rule is a single line: allow_env_proxies = trust_env and transport is None. Pass a transport, and the environment is skipped.
Since version 7.0.6 of 20 July 2026, the default Cohere client passes one. It builds its sync client with an httpx.HTTPTransport whose socket options keep idle connections alive, and its async client the same way. We read the file out of the released packages: 7.0.5 of 29 June has no transport, and every release from 7.0.6 up to 7.1.1, the latest, has it. So on a current install, HTTPS_PROXY does nothing.
The fix is an option the SDK already has. ClientV2 takes a client of your own in httpx_client:
import httpx
import cohere
proxy = "http://USERNAME:PASSWORD@HOST:PORT"
co = cohere.ClientV2(httpx_client=httpx.Client(proxy=proxy, timeout=300))
# the key comes from CO_API_KEY; AsyncClientV2 takes an httpx.AsyncClient
Set the timeout yourself. The SDK applies its default of 300 seconds only to the client it builds, so a client passed in keeps the default of HTTPX, which is much shorter than a long generation. Our HTTPX guide covers the proxy argument in detail.
The TypeScript SDK and the OpenAI SDKs
The TypeScript SDK, cohere-ai 8.1.0, calls the global fetch. On Node, that fetch reads HTTPS_PROXY only when Node starts with NODE_USE_ENV_PROXY=1, which fetch has supported since Node 24.0.0 and 22.21.0. The client also takes a fetch of your own in its fetch option, for setups that need one.
export HTTPS_PROXY="http://USERNAME:PASSWORD@HOST:PORT"
export NODE_USE_ENV_PROXY=1 # Node only
node app.mjs
Cohere also answers in the OpenAI format, at https://api.cohere.ai/compatibility/v1. With that base URL and a Cohere key, the OpenAI SDKs behave as our lab of 27 September found with OpenAI. The Python SDK follows HTTPS_PROXY, and the Node SDK follows it only with the Node switch. Our ChatGPT page has the full results.
What a proxy does not change
The limits. Cohere has two kinds of key. Trial keys are free and "limited to 1,000 API calls a month", with 20 requests a minute on the Chat models. Production keys allow 500 a minute on Command A. The limits come with the key, so a different exit address changes nothing.
The terms. The Cohere terms of use bar anyone from trying to "bypass any measures we may use to prevent or restrict access to the Cohere Solution". They also bar exporting it to anyone "subject to applicable export controls or sanctions". We give no steps around either.
Where our lines fit
A proxy of your own fits Cohere in plain cases: a company network where every client leaves through one egress, a server whose traffic should leave from one fixed address, and the scrapers that feed a retrieval pipeline. From our server in a data center, both Cohere APIs answered with a plain 401 for the missing key, with no challenge. A dedicated ISP or IPv4 address stays the same, at $2.70/IP and $1.58/IP per month, and residential lines start at $0.44 per GB.
Our lines come as host:port:user:pass and generate in the http form by default, the form an HTTPX proxy and the Node switch take. On a Residential Premium plan, up to 150 addresses can connect without the password, so none has to sit 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=jsonreturns 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:porttests 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 that an HTTPX proxy and HTTPS_PROXY 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 Cohere SDKs for this page. The Python finding rests on the SDK source, on the file read out of each released package, and on the HTTPX rule, not on a lab. We did not read what the optional aiohttp client of the Python SDK does with proxies. An open change would move the SDK from HTTPX to HTTPX2, and it may alter all of this. We will check again by 28 December 2026.
Sources
- Cohere docs: API keys and rate limits, the compatibility API and the API reference, read on 28 September 2026.
- Cohere on GitHub: the Python SDK (src/cohere/client_v2.py and base_client.py, the tags from 7.0.5 to 7.1.0) and its released packages on PyPI up to 7.1.1; the TypeScript SDK, version 8.1.0.
- HTTPX, the client source and its docs on environment variables; Node.js docs on NODE_USE_ENV_PROXY and the v24 changelog.
- Cohere, terms of use, last updated 7 September 2022.
- HProxy: the edge check and the package reads of 28 September 2026 from our server; our ChatGPT lab of the OpenAI SDKs; our plan, dedicated proxy, free list, proxy checker and IP lookup documentation.


