In this Article
An openai proxy can route API requests through a forward proxy or an API gateway; configure that route in your API client. For a browser agent that needs a particular exit location, configure a separate proxy in the browser you control, because a browser proxy does not automatically route model requests.
This guide separates those connections, shows short Python examples, and explains where Operator-style browser control fits. Start by identifying which process makes the request before choosing a proxy, changing credentials or troubleshooting a blocked task.
Key Facts
- An API transport proxy and a browser proxy control different network connections.
- A reverse proxy or API gateway changes the endpoint your application calls.
- Browser agents do not inherently require a proxy.
- A sticky proxy session cannot guarantee an unchanged exit IP.
- Residential traffic starts at $1/GB with country targeting included.
- Regular residential state, city, ZIP and ASN targeting counts traffic at 2x.
- No first-party browser-agent performance measurements are reported here.
openai proxy: API, gateway or browser?
An openai proxy can mean three different configurations: an outbound API connection, an API gateway, or a browser connection. Use the 3-layer proxy ownership model to identify the setting you actually need.
| Layer | Traffic path | Configuration owner |
|---|---|---|
| API transport | Application through forward proxy to API endpoint | The application’s HTTP client |
| API gateway | Application to gateway, then upstream API | The application endpoint setting and gateway operator |
| Browser | Browser through proxy to destination website | The browser launcher or browser service |
A forward proxy changes the network route. A reverse proxy or gateway is an endpoint that accepts requests and forwards them upstream; its operator must handle authentication, compatible routes and any streaming requirements. An API reverse proxy is not a DataImpulse product.
Follow OpenAI’s applicable usage policies and supported-countries list; a proxy is not permission to bypass regional restrictions or terms.

Key Facts
The critical distinction is ownership: configure the process that opens the connection. Proxy selection comes after you identify that process and establish a working direct connection.
- Optionality: Add a proxy for a concrete routing or exit-location requirement.
- Session continuity: Preserve browser state and proxy-session settings throughout a task.
- Access: A proxy cannot guarantee website access or eliminate authentication challenges.
- Measurement: Request success and complete browser-task success are different metrics.
- Cost: Count proxy traffic, browser compute and model usage separately.
How do you configure an OpenAI API proxy?
For an outbound OpenAI API proxy, pass a proxy-enabled HTTP client to the SDK. For a gateway, set the API base URL instead; these settings serve different purposes.
Step 1: Install compatible SDK versions. Use Python 3.10 or newer with OpenAI Python SDK 3.x for these HTTPX2 examples. For the Agents example, install openai-agents==0.21.0, which requires openai>=3.0.0,<4. These snippets have not been execution-tested. The current OpenAI Python SDK documentation uses DefaultHttpx2Client. Older examples using DefaultHttpxClient should be checked against their SDK version before reuse.
Step 2: Configure the transport. This untested example requires OPENAI_API_KEY, OPENAI_MODEL and OUTBOUND_PROXY_URL in the environment. Choose a model your project can access.
For an authenticated HTTP proxy, set OUTBOUND_PROXY_URL to http://USERNAME:PASSWORD@HOST:PORT. Use the proxy server’s supported scheme; an HTTPS API destination does not require an https:// proxy URL. For SOCKS support, install the optional dependency with python -m pip install 'httpx2[socks]'. See the HTTPX2 proxy documentation.
import os
from openai import OpenAI, DefaultHttpx2Client
with OpenAI(http_client=DefaultHttpx2Client(
proxy=os.environ["OUTBOUND_PROXY_URL"]
)) as client:
response = client.responses.create(
model=os.environ["OPENAI_MODEL"], input="Reply with OK."
)
print(response.output_text)
For environment-based routing, HTTPX2 documents HTTP_PROXY, HTTPS_PROXY, ALL_PROXY and NO_PROXY. Review its environment-variable behavior, including trust_env, before combining environment settings with an explicit client.
Step 3: Use a separate gateway configuration when needed. This untested example assumes an authorized gateway implementing the requested API route. Set its full API base URL, the credential it expects, and a supported model.
import os
from openai import OpenAI
with OpenAI(
base_url=os.environ["GATEWAY_BASE_URL"],
api_key=os.environ["GATEWAY_API_KEY"],
) as client:
response = client.responses.create(
model=os.environ["OPENAI_MODEL"], input="Reply with OK."
)
print(response.output_text)
Do not put a forward-proxy address in base_url. Validate transport and gateway configurations independently, then record and pin the package versions that pass your checks.
How do you configure an openai proxy for the OpenAI Agents SDK client?
Install a custom asynchronous OpenAI client with set_default_openai_client to configure the Agents SDK’s default model connection. Configure any browser tool’s network route separately.
The official Agents SDK configuration guide documents this client hook and the HTTPX2 client types. Use Python 3.10 or newer with openai-agents==0.21.0, which requires openai>=3.0.0,<4. This untested example requires OPENAI_API_KEY, OPENAI_MODEL and OUTBOUND_PROXY_URL.
import asyncio
import os
from agents import Agent, Runner, set_default_openai_client
from openai import AsyncOpenAI, DefaultAsyncHttpx2Client
async def main():
async with AsyncOpenAI(http_client=DefaultAsyncHttpx2Client(
proxy=os.environ["OUTBOUND_PROXY_URL"]
)) as client:
set_default_openai_client(client)
agent = Agent(name="Assistant", model=os.environ["OPENAI_MODEL"])
result = await Runner.run(agent, "Reply with OK.")
print(result.final_output)
asyncio.run(main())
An explicitly configured provider or client can take precedence over SDK defaults. Check those settings if the expected route is unused, and review tracing configuration separately rather than assuming every SDK connection follows the model client.
Operator, ChatGPT Agent and browser control: where does a ChatGPT proxy fit?
A ChatGPT proxy for a browser you operate belongs in that browser’s configuration. A hosted cloud browser is operated by its service, so changing your local browser or API client does not configure the remote browser’s route.
Current product status: OpenAI’s ChatGPT agent help page now states that ChatGPT agent is no longer available and directs users to ChatGPT Work and cloud browser workflows. Operator and ChatGPT Agent remain useful search terms for understanding this browser-control pattern.
The cloud browser documentation describes website permissions and remote browser interaction, but does not document a customer-supplied proxy setting. Do not treat a local proxy setting as control over that hosted environment.
Browser-control explanation: In a self-hosted computer-use integration, the model selects actions and your application executes them in a browser or desktop you operate. With structured computer actions, the application translates clicks, typing and scrolling into input, then returns screenshots so the model can continue. The website receives the browser’s requests, which is why its proxy belongs at the browser layer. See the official computer-use integration guide.
For more architectural context, see our guide to real-time web data for AI agents.
How do you add a proxy to a computer-use browser?
Launch the browser with a proxy configuration, then keep that browser and its session available while the agent works. A proxy is optional, as shown by the optional proxy argument in the Playwright BrowserType reference.
Step 1: Establish a baseline. Open a permitted test page directly and confirm that navigation and the intended interaction work.
Step 2: Configure the browser connection. The Playwright proxy documentation supports browser-wide or per-context configuration. This untested Python example requires Playwright, its Chromium installation, proxy environment variables and a permitted TEST_URL.
This example uses an authenticated HTTP proxy. Set BROWSER_PROXY_SERVER to http://HOST:PORT and supply the username and password separately. Do not use this example as an authenticated SOCKS5 configuration.
This is a connection smoke test: it opens one page, prints its title, and closes the browser. In a computer-use integration, keep the browser and context open throughout the action loop and close them after the task finishes.
import os
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": os.environ["BROWSER_PROXY_SERVER"],
"username": os.environ["BROWSER_PROXY_USER"],
"password": os.environ["BROWSER_PROXY_PASSWORD"],
})
page = browser.new_page()
page.goto(os.environ["TEST_URL"])
print(page.title())
browser.close()
Step 3: Select the required country. Generate a country-targeted configuration and verify the observed exit location before the task. Review available proxy locations; an exit country alone does not establish browser language, account region or location permission.
Step 4: Preserve task continuity. Use a sticky session when the task needs continuity, and retain cookies and browser state. For DataImpulse, assign each concurrent worker a separate sticky proxy configuration generated in the dashboard. Keep that configuration unchanged during the task. Separate configurations do not guarantee distinct exit IPs. Check the observed address if uniqueness matters.
How do you troubleshoot authentication, blocks and session changes?
Identify which connection failed before changing the proxy: application to proxy, application to API, or browser to website. Record the failing stage and response, then change one variable at a time.
- Proxy authentication failure: Check the proxy endpoint, credential source and account authorization. Keep proxy credentials separate from API credentials.
- API authentication failure: Check the intended API or gateway endpoint and the credential it expects. A different browser exit IP does not repair an invalid API key.
- Connection or certificate failure: Check reachability, proxy scheme and certificate trust. Do not disable certificate verification to hide the problem.
- Website challenge or refusal: Confirm permission, reduce request pressure and inspect browser state. An IP category alone is not a reliable diagnosis.
- Mid-task sign-out: Compare exit-IP continuity, cookies, context lifetime and session settings. Avoid rotating after every browser action in a signed-in workflow.
- Rate or concurrency limit: Reduce parallel work and use bounded backoff. Stop repeated retries when they cannot resolve the underlying failure.
DataImpulse quick start, costs and proxy selection
Choose a standalone proxy when you already operate the browser and need an exit route. Choose managed browser infrastructure when you want the browser runtime operated as a service, and compare the complete bill rather than bandwidth alone.
DataImpulse is our product. Residential proxies start at $1/GB with country targeting included; regular residential state, city, ZIP and ASN targeting counts traffic at 2x. Premium residential costs $5/GB with all targeting included.
Quick start: New customers can purchase the one-time $5 Intro plan; subsequent top-ups start at $50. Generate a country-targeted sticky configuration, store credentials outside source code, and run one permitted browser task before increasing concurrency. Traffic does not expire and no subscription is required.
In the DataImpulse dashboard, select the required country and sticky connection mode. Copy the generated HTTP proxy host and port into BROWSER_PROXY_SERVER, the complete generated username into BROWSER_PROXY_USER, and the password into BROWSER_PROXY_PASSWORD. Use the http://HOST:PORT format for BROWSER_PROXY_SERVER.
The service supports rotating and sticky sessions, but does not sell ISP/static residential proxies. Sticky sessions are not permanent IP assignments.
| Option | What you operate | Published cost basis |
|---|---|---|
| Our standalone residential proxy | Browser runtime, agent logic and recovery | From $1/GB; browser compute and model usage are separate |
| Browserbase Developer | Your workflow on hosted browser infrastructure | $20/month, including 100 browser hours and 1 GB of proxy traffic; then $0.12/browser hour and $12/GB (as of November 2026) |
| Bright Data Browser API | Your workflow on managed browsers with built-in proxies and unlocking | Pay as you go at $8/GB (as of November 2026) |
Competitor data: taken from each provider’s official pricing and documentation pages linked in this article, collected on November 10, 2026.
These products package different responsibilities and billing units. The table is a configuration comparison, not a performance ranking.
Use a direct connection when it meets your routing requirements. Add a standalone proxy when you operate the browser and need a specific exit location. Choose hosted browser infrastructure when you want a provider to operate the browser runtime.
Evaluate datacenter proxies against your actual permitted workload rather than assuming a universal outcome. Our proxy selection guide for AI agents covers related selection questions.
Browser test results and methodology: what evidence should you collect?
No first-party browser-agent results are reported here. API request success rates and single-page request timings would not establish complete computer-use task performance.
For a reproducible evaluation, use the following proposed method, not a claim of completed testing:
- Run 30 identical three-page tasks per condition: direct connection, datacenter proxy and sticky residential proxy, against a permitted test site.
- Fix the browser version, requested region, concurrency, task instructions and starting browser state; randomize condition order.
- Define completion before running: all required pages reached, required interactions completed and the final result verified.
- Record failures by stage, median and p95 task duration, transferred traffic, cost and exit-IP continuity.
- Retain sanitized raw logs, exact dependency versions, run date and sample size so another engineer can reproduce the procedure.
Also fix and record the model identifier, generation settings, agent code version, timeout, retry policy, and task fixtures. Treat 30 runs per condition as a pilot; report individual durations and the percentile calculation method alongside p95.
Publish the outcome as a dated snapshot, not a universal benchmark. Include failed attempts in cost accounting, and separate model, browser and proxy charges when calculating cost per completed task.
OpenAI and ChatGPT proxy FAQ
Frequently Asked Questions
Can I use a proxy with OpenAI Operator or a hosted ChatGPT browser?
For a browser you operate, configure its proxy in the browser launcher or context. Hosted browser networking belongs to the service; a local proxy does not configure that remote route. The current cloud browser documentation does not document a customer-supplied proxy option.
Is ChatGPT Agent still the current hosted product?
OpenAI’s current ChatGPT agent help page says that ChatGPT agent is no longer available and directs readers to ChatGPT Work. Check the linked cloud browser documentation for the current hosted workflow.
Is an OpenAI API proxy the same as an API gateway?
A forward proxy transports requests toward their existing API destination. A gateway becomes the endpoint your application calls and forwards requests upstream. Decide which architecture you need before changing client configuration.
Does setting the Agents SDK client also proxy browser traffic?
Treat model requests and browser requests as separate connections. Configure the model client and browser independently, then verify each route. Do not infer browser routing from a successful model response.
What proxy type is best for Operator-style agents?
There is no universal best proxy type for every website and task. Start with a permitted direct baseline, then compare options against the required location, session continuity, task completion and total cost. Residential routing does not guarantee access.
How do I run many browser agents in parallel?
Keep each task’s browser state isolated. For DataImpulse, assign each concurrent worker a separate sticky proxy configuration generated in the dashboard. Keep that configuration unchanged during the task. Separate configurations do not guarantee distinct exit IPs. Increase concurrency gradually while observing failures and completion time. Verify exit addresses when distinct IPs are a requirement.
How do I set the country an agent acts from?
Select the country in the proxy configuration used by the browser, then verify the observed exit location. Keep browser locale and account settings consistent with the intended task. Country selection does not automatically change every location signal.
Will a sticky session keep the same IP for the whole task?
Do not treat a sticky session as a permanent address assignment. Observe continuity during the task and make recovery explicit if the connection changes. Preserve cookies and browser state as well as the proxy-session setting.
Start with one permitted browser task
If you operate the browser and need country-targeted residential routing, consider DataImpulse residential proxies. Start with one task, verify the exit location and session continuity, and measure completed-task cost before scaling.
Last updated: November 10, 2026.

State/City/Zip/ASN Targeting 



