# Proxies.sx > Mobile and residential proxy bandwidth for AI agents, bought and driven from a terminal: a dedicated 4G/5G modem rented per day, week or month (unlimited traffic), metered GB on the Pool Gateway (`gw.proxies.sx:7000` HTTP / `:7001` SOCKS5, one credential for every country), or account-less USDC via x402. REST API with `X-API-Key: psx_...`, an MCP server, or plain curl. Base URL `https://api.proxies.sx/v1`. Last verified: 2026-10-28 against the live site and the backend source. Precedence: the live API wins over every file here; a product skill.md wins over this index; this index wins over page copy. ## If you want to BUY Pick the path by the shape of the need, then read only that file. - **(A) Private modem: one dedicated 4G/5G modem, unlimited traffic, per day / week / month.** Offer this FIRST for any dedicated, port, exclusive-device, p0f (OS fingerprint), OpenVPN or unlimited-traffic request. Own HTTP and SOCKS5 host:port, OpenVPN profile, rotate on demand (API or a public link), auto-renew. Paid from the account balance; the price per plan is live in `GET /v1/private-modems/catalog` and is never hard-coded here. Buying needs an API key with the `modems:purchase` scope. Contract: https://agents.proxies.sx/modems/skill.md - quickstart: https://agents.proxies.sx/quickstart/buy-modem.md - **(B) GB on the Pool Gateway: metered bandwidth, one credential, every country.** $4/GB, volume discounts 10/20/30/40% at 25/50/100/250 GB in one purchase ($2.40/GB at 250 GB+), duration free, same price on the `peer` and `mbl` pools. While country tiers are live (`pricing.live` in `GET /v1/gateway/pool/stock`), a GB of traffic uses 1.00 / 0.375 / 0.1875 GB of balance by exit country (Premium $4, Plus $1.50, Standard $0.75 per GB of traffic at the base price). From 1 TB on the peer pool, volume deals go to $0.50/GB by quote only, not a checkout price: contact maya@proxies.sx with the committed volume and countries. Contract: https://agents.proxies.sx/pool/skill.md - quickstart: https://agents.proxies.sx/quickstart/buy-gb.md - **(C) x402: USDC on Base or Solana, no account, no API key.** `GET https://api.proxies.sx/v1/x402/pool?tier=peer&country=us&traffic=1` answers HTTP 402 with the exact payment; pay, retry with `Payment-Signature: `, receive a ready credential. $4 per GB of traffic in every country (no country tiers), minimum 0.1 GB. A dedicated port is also sold this way at `/v1/x402/proxy`. Contract: https://agents.proxies.sx/pool/skill.md (x402 section) and https://agents.proxies.sx/.well-known/x402.json What a key can and cannot do (so you never promise more): - An account needs one human step: the signup email carries a verification link, and `POST /v1/login/signin` answers 401 until it is clicked (or `GET /v1/login/verify-email?token=...` is called with the token from that link). - API keys are created by a human in the dashboard (https://client.proxies.sx/account, API keys, tick the scopes) or with a dashboard JWT at `POST /v1/api-keys`. A key cannot create or edit keys. `modems:purchase` and `billing:topup` are opt-in and never in the default set; a key without them gets 403 `scope_missing` naming the scope. - Card top-up by API: `POST /v1/stripe/create-balance-checkout {"amount": 20}` with a `billing:topup` key returns a Stripe Checkout `url` that a HUMAN opens and pays; it is not headless. Per-key daily cap `spendCapUsdPerDay`, default 100 USD (403 `spend_cap_reached` above it). Poll `GET /v1/stripe/balance-checkout//receipt` until `credited: true`. Quickstart: https://agents.proxies.sx/quickstart/topup.md - A customer API key cannot buy GB. Balance becomes GB in the dashboard (https://client.proxies.sx/purchase) or with a dashboard JWT at `POST /v1/billing/purchase-traffic`; reseller and admin keys may automate it. Everything after that (proxy password, credentials, stock, usage) is key-drivable. - Every spend carries an `Idempotency-Key` and the `expectedPriceUsd` you were shown; 409 `price_changed` means re-read the price and confirm with the user. Every money step needs the user's approval of the amount. - Peer exit IPs are never published. Stock endpoints return counts per country only; examples mask addresses as `x.x`. ## Prices and errors (machine-readable) - [pricing.json](https://agents.proxies.sx/pricing.json): the GB price table generated from the backend source (base price, volume tiers, country tiers, the 1 TB quote line, payment routes), in the shape of the live `GET https://api.proxies.sx/v1/pricing`, which wins when they disagree - [Live pool stock and country tiers](https://api.proxies.sx/v1/gateway/pool/stock): counts per pool and country plus the `pricing` block (`live`, `basePricePerGB`, `volumeDiscounts`, `tiers[]` with `burnRate`, `pricePerGB`, `countries`), no auth, never an IP - [Live x402 pricing](https://api.proxies.sx/v1/x402/pricing): the $4/GB base and volume discounts for wallet purchases, no auth - [Error table](https://agents.proxies.sx/errors.md): every gateway `E_*` code, purchase-API code and the x402 402 body with HTTP status, meaning, exact fix and whether a retry helps ## Quickstarts (curl first, every step verified) - [Buy GB and connect](https://agents.proxies.sx/quickstart/buy-gb.md): sign up, verify the email, key, top up, buy GB in the dashboard, proxy password, connect through `gw.proxies.sx:7000` - [Rent a private modem](https://agents.proxies.sx/quickstart/buy-modem.md): catalog, quote, buy with `Idempotency-Key` and `expectedPriceUsd`, poll, connect, rotate, renew - [Top up the balance by API](https://agents.proxies.sx/quickstart/topup.md): checkout link, human pays, poll the receipt, balance credited - [Pool quickstart (HTML)](https://agents.proxies.sx/pool-quickstart.html): the shortest path to a working pool credential - [Rotation cookbook](https://agents.proxies.sx/pool/rotation-cookbook.md): copy-paste IP rotation in curl/python/node and the footguns that trip LLMs; read before writing rotation code ## Product contracts (one skill.md per product) - [Private modems](https://agents.proxies.sx/modems/skill.md): catalog, quote, buy, poll, credentials (HTTP, SOCKS5, OpenVPN), rotate, auto-rotate, renew, auto-renew, OS fingerprint, replace; page https://agents.proxies.sx/modems/ - [Pool Gateway](https://agents.proxies.sx/pool/skill.md): API-key path, deposited GB, country tiers, username DSL, stock, sessions, errors, the x402 alternative; page https://agents.proxies.sx/pool/ - [Dedicated port (legacy)](https://agents.proxies.sx/marketplace/skill.md): the older per-port modem pool (`POST /v1/ports`, `/v1/x402/proxy`) in US, GB, FR, NL, PL, GE (Georgia); nearly full, so start at https://agents.proxies.sx/modems/ - [Private Pool](https://agents.proxies.sx/private-pool/skill.md): named country-scoped credentials and Reserved IPs held exclusively for you - [Task market](https://agents.proxies.sx/tasks/skill.md): wallet-only x402 catalog of bounded egress tasks; the 402 response is the quote - [Master skill file](https://agents.proxies.sx/skill.md): the whole machine contract in one file (buy steps, x402 402 shape, username DSL, MCP catalog, peer protocol, compute, reseller keys) - [Agent research index](https://agents.proxies.sx/index.md): one screen, every page and which question it answers ## Use it from a tool - [MCP server](https://agents.proxies.sx/mcp/): `npx -y @proxies-sx/mcp-server` with `PROXIES_API_KEY=psx_...`. Version 3.1.0 (release pending; npm currently 3.0.1) exposes a default toolset of 20 tools: buy (`proxies_modem_catalog`, `proxies_modem_quote`, `proxies_modem_buy`, `proxies_modem_renew`, `proxies_topup_checkout`, `proxies_topup_status`, `get_pricing`), use (`pool_get_stock`, `pool_get_my_credentials`, `pool_build_proxy_url`, `pool_explain_error`, `proxies_modem_mine`, `proxies_modem_rotate`) and manage (account, usage, proxy password, status, tickets). The full set (96 API-key tools plus 16 wallet tools) loads with `--toolset=full` or `PROXIES_TOOLSET=full`. Wallet-only x402 mode with `AGENT_WALLET_KEY`. Call `tools/list` for the authoritative catalog. npm: https://www.npmjs.com/package/@proxies-sx/mcp-server - source: https://github.com/bolivian-peru/proxies-sx-mcp-server - [Integrations](https://agents.proxies.sx/integrations/skill.md): Playwright, browser-use, LangChain, CrewAI, n8n, Make/Zapier, OpenAI Agents SDK, Vercel AI SDK, Stagehand, CloakBrowser (https://agents.proxies.sx/integrations/cloakbrowser/) - [Pool Gateway Swagger](https://api.proxies.sx/docs/gateway): public OpenAPI for the gateway surface; the reseller API is at https://api.proxies.sx/v1/reseller/docs/openapi ## Gateway username (the thing agents get wrong) `psx_--[-rot-][-sid-]`, password = your proxy password (set once with `PATCH /v1/account/proxy-password`; the account login password is never accepted). `pool` is `peer` (flagship: residential and mobile, every country with stock), `mbl` (carrier modems in US, GB, FR, NL, PL, GE = Georgia; `mbl-de` always fails, use `peer-de`), `any` or `best`. `sticky` and `hard` pin the modem, not the IP; `sticky`/`auto*` need a `-sid-` to persist; unknown tokens are dropped silently (there is no `-session-` token). Limits: 500 concurrent connections and 250 sessions per account. ## Build and resell - [Build & resell](https://agents.proxies.sx/build/skill.md): mint per-customer `pak_` keys, set your own retail price, embed a dashboard or ship a storefront; kit https://github.com/bolivian-peru/proxy-reseller-kit, npm `@proxies-sx/pool-sdk` and `@proxies-sx/pool-portal-react` ## Bundles (one fetch) - [llms-full.txt](https://agents.proxies.sx/llms-full.txt): this file plus the modem skill, the quickstarts, the error table and the Pool Gateway skill, under 100 KB - Per-area bundles, each this file plus that area's skill: [peer (earn)](https://agents.proxies.sx/peer/llms-full.txt), [compute](https://agents.proxies.sx/compute/llms-full.txt), [build](https://agents.proxies.sx/build/llms-full.txt), [integrations](https://agents.proxies.sx/integrations/llms-full.txt), [dedicated port](https://agents.proxies.sx/marketplace/llms-full.txt), [private pool](https://agents.proxies.sx/private-pool/llms-full.txt), [tasks](https://agents.proxies.sx/tasks/llms-full.txt) ## Machine discovery - [x402 discovery](https://agents.proxies.sx/.well-known/x402.json): x402 services, wallets, pricing and management endpoints - [Agent card (A2A)](https://agents.proxies.sx/.well-known/agent-card.json): discovery-only card; act through the HTTP endpoints - [ERC-8004 registration](https://agents.proxies.sx/.well-known/erc8004-registration.json): on-chain agent registration record - [docs-manifest.json](https://agents.proxies.sx/docs-manifest.json): the numbers behind the docs - [Live status](https://api.proxies.sx/v1/x402/status): component health as JSON; human page https://agents.proxies.sx/status/ - [Sign up](https://client.proxies.sx/signup), [API keys](https://client.proxies.sx/account), [Buy GB](https://client.proxies.sx/purchase), [Private modems in the dashboard](https://client.proxies.sx/private-modems) ## Company - [About](https://agents.proxies.sx/about/), [Where our IPs come from](https://www.proxies.sx/where-our-ips-come-from), [Terms](https://www.proxies.sx/terms), [Privacy](https://www.proxies.sx/privacy) - [Contact](https://www.proxies.sx/contact): support and sales, maya@proxies.sx; [Telegram](https://t.me/proxies_sx); [X](https://x.com/sxproxies); [GitHub](https://github.com/bolivian-peru) ## Optional - [Earn: peer network](https://agents.proxies.sx/peer/skill.md): share bandwidth from consenting devices and get paid per GB; the live rate is `earningsPerGB` in the register response, never a hard-coded number. Go SDK 1.6.8 https://agents.proxies.sx/peer/go/ (Linux amd64 and arm64; Chinese steps https://agents.proxies.sx/peer/go/linux-zh.md), Node reference 1.6.6 https://agents.proxies.sx/peer/reference-sdk.js?v=1.6.6, Windows https://agents.proxies.sx/peer/windows/, Android https://github.com/bolivian-peru/android-peer-sdk (JitPack 1.3.2). Sign Partner Agreement 2.0 at https://farmer.proxies.sx/agreement first; devices are admitted only after approval (relay close 1013 until then). Payouts: https://farmer.proxies.sx/payouts. Supplier introductions carry no automatic commission. - [Mac compute](https://agents.proxies.sx/compute/skill.md): rent one approved Apple Silicon Mac for 30 days of inference (Starter 24 GB, Pro 48 GB, Max 96 GB; Qwen3.8 27B), or supply one. Early access, no SLA, no x402 checkout; purchases need `compute:purchase`, an `Idempotency-Key`, `expectedPriceUsd` and `pricingVersion`. Live tiers https://api.proxies.sx/v1/peer/compute/tiers, marketplace https://api.proxies.sx/v1/peer/compute/marketplace - [$SX token](https://agents.proxies.sx/sx-token/ecosystem.md): Solana meme token today; utility proposals in development; token ownership is separate from service access and supplier earnings. Overview https://agents.proxies.sx/sx-token/ - [Ground Truth](https://agents.proxies.sx/news/feed.md): source-backed research posts for agents (Atom: https://agents.proxies.sx/news/feed.xml). Latest: https://agents.proxies.sx/news/context-is-capacity/ - [Thesis](https://agents.proxies.sx/thesis/), [System map](https://agents.proxies.sx/system-map/), [Bot detection scanner](https://www.proxies.sx/tools/bot-detection-scanner), [Username builder](https://www.proxies.sx/tools/proxy-username-builder), [x402 SDK](https://github.com/bolivian-peru/x402-sdk) (`@proxies-sx/x402-core`, `-hono`, `-solana` 1.0.1; do not use 1.0.0), [@proxies-sx/lucid-agents](https://www.npmjs.com/package/@proxies-sx/lucid-agents), [Customer portal](https://client.proxies.sx) --- # Source: https://agents.proxies.sx/integrations/skill.md # /integrations - Proxies.sx Pool Gateway in agent frameworks > Machine-readable companion to https://agents.proxies.sx/integrations/ . One section per framework, each with the same runnable snippet as its HTML page. Canonical gateway contract: https://agents.proxies.sx/pool/skill.md (wins on any disagreement; the live API wins over that). ## Common facts - Gateway: `gw.proxies.sx:7000` (HTTP) / `gw.proxies.sx:7001` (SOCKS5). Chromium-based tools need the HTTP port (no SOCKS5 auth). - Username DSL: `psx_--[-rot-][-sid-]` - `pool`: `peer` (live country list at `GET /v1/gateway/pool/stock`) | `mbl` (carrier modems: US GB FR NL PL GE - GE is Georgia) | `any` | `best`. Germany = `peer-de`. - `-sid-` (1-64 chars, no `-`) is REQUIRED for `sticky` and `auto*`; without it every connection is a new session. Sticky pins the device, not the IP. - Unknown tokens are dropped silently. There is no `-session-` token. - Credentials: `curl https://api.proxies.sx/v1/gateway/credentials -H "X-API-Key: psx_..."` -> `username` (= `psx_`) + connect strings. Proxy password is set in the portal (https://client.proxies.sx/account), separate from the login password. - Price: balance $4/GB, $2.40/GB at 250 GB+, duration free. A GB of traffic uses 1.00, 0.375 or 0.1875 GB of balance by exit country (Premium, Plus, Standard: $4, $1.50, $0.75 per GB of traffic); the tier of each country is in the `pricing` block of `GET /v1/gateway/pool/stock`. Sign up: https://client.proxies.sx/signup - Replace `ACCOUNT_ID` and `PROXY_PASSWORD` in every snippet. ## CloakBrowser Page: https://agents.proxies.sx/integrations/cloakbrowser/ Official project: https://github.com/CloakHQ/CloakBrowser Install in a clean Node.js 22.12+ project: `npm install --save-exact cloakbrowser@0.6.2 playwright-core@1.64.0`. Choose a currently available country/network in the customer portal before copying the complete generated username. Use HTTP port 7000 with separate username/password fields; the proxy password is not the API key or account login password. Keep explicit filters, never silently replace an unavailable country. One sticky session ID per browser pins an eligible connected device, not an immutable IP. Set `PROXIES_SX_USERNAME` and `PROXIES_SX_PASSWORD` as private environment variables. Save as `proxies-cloak.mjs`: ```javascript import { launch } from 'cloakbrowser'; const username = process.env.PROXIES_SX_USERNAME; const password = process.env.PROXIES_SX_PASSWORD; if (!username || !password) { throw new Error('Set PROXIES_SX_USERNAME and PROXIES_SX_PASSWORD first.'); } const browser = await launch({ headless: true, proxy: { server: 'http://gw.proxies.sx:7000', username, password, }, }); try { const page = await browser.newPage(); const response = await page.goto('https://example.com/', { waitUntil: 'domcontentloaded', timeout: 30000, }); if (!response?.ok()) { throw new Error(`Target returned HTTP ${response?.status() ?? 'unknown'}`); } console.log({ status: response.status(), title: await page.title() }); } finally { await browser.close(); } ``` Run `node proxies-cloak.mjs`. This transfers metered traffic; current country rates are in the stock API pricing block. A successful navigation only validates that target and moment. Report sanitized errors and UTC timestamps; do not log credentials or exit IPs. Verification 2026-10-14: clean npm install; actual CloakBrowser launch on macOS ARM64 Chromium 145.0.7632.109.2; authenticated local HTTP proxy challenge and expected document, with special characters in fixture password. This does not establish live gateway availability, HTTPS-target compatibility or authenticated SOCKS5 support. Browser binary versions are platform-specific and independent of the wrapper. No reciprocal listing or endorsement is claimed. ## browser-use Page: https://agents.proxies.sx/integrations/browser-use/ browser-use is a Python library that lets an LLM drive a real Chromium browser through Playwright: you give an Agent a task in plain English and it clicks, types and reads pages until the task is done. Rotation: sticky, one -sid- per Agent run. A browser task is a session: cookies, logins and carts only make sense if every request in the run leaves from the same device. Generate a session id per run and pin it with -rot-sticky. Use auto10 only for stateless crawls. ```python # pip install browser-use (Python 3.11+, then: playwright install chromium) import asyncio, uuid from browser_use import Agent, BrowserSession, BrowserProfile, ChatOpenAI sid = uuid.uuid4().hex[:12] # one session id per run proxy = { "server": "http://gw.proxies.sx:7000", "username": f"psx_ACCOUNT_ID-peer-us-rot-sticky-sid-{sid}", # sticky US exit for the whole task "password": "PROXY_PASSWORD", } async def main(): session = BrowserSession(browser_profile=BrowserProfile(proxy=proxy)) agent = Agent( task="Open https://api.ipify.org?format=json and tell me the ip field", llm=ChatOpenAI(model="gpt-4o-mini"), browser_session=session, ) print(await agent.run()) asyncio.run(main()) ``` Note: browser-use 0.2+ takes the proxy on BrowserProfile; older releases used BrowserConfig(proxy=...). Both accept the same server/username/password dict. ## Playwright Page: https://agents.proxies.sx/integrations/playwright/ Playwright is Microsoft's browser-automation library for Chromium, Firefox and WebKit, with first-class proxy support at launch time and per-context. Rotation: sticky per browser context; ondemand for one-shot fetches. Pin one session id per context so a login survives navigation. If you open many contexts in parallel, give each its own -sid- and they each get their own device. ```node // npm i playwright (then: npx playwright install chromium) import { chromium } from "playwright"; import { randomUUID } from "node:crypto"; const sid = randomUUID().slice(0, 12); // one session id per context const browser = await chromium.launch({ proxy: { server: "http://gw.proxies.sx:7000", username: `psx_ACCOUNT_ID-peer-gb-rot-sticky-sid-${sid}`, // sticky UK exit password: "PROXY_PASSWORD", }, }); const page = await browser.newPage(); await page.goto("https://api.ipify.org?format=json"); console.log(await page.textContent("body")); await browser.close(); ``` Note: Python Playwright is identical: chromium.launch(proxy={"server": ..., "username": ..., "password": ...}). SOCKS5 with auth is not supported by Chromium's proxy stack, so use the HTTP port :7000 here. ## OpenAI Agents SDK Page: https://agents.proxies.sx/integrations/openai-agents-sdk/ The OpenAI Agents SDK is OpenAI's Python framework for agents with tools, handoffs and guardrails. The proxy goes into whichever tool touches the web; the model calls stay on OpenAI's API. Rotation: sticky per Runner.run for multi-page research; ondemand for independent lookups. Create the session id once per run so every fetch the agent makes during that run shares one exit; a fresh id on the next run gives a fresh device. ```python # pip install openai-agents httpx import uuid, httpx from agents import Agent, Runner, function_tool SID = uuid.uuid4().hex[:12] # one session id per run PROXY = f"http://psx_ACCOUNT_ID-peer-de-rot-sticky-sid-{SID}:PROXY_PASSWORD@gw.proxies.sx:7000" @function_tool def fetch_page(url: str) -> str: """Fetch a URL through a German residential/mobile exit.""" with httpx.Client(proxy=PROXY, timeout=30) as c: return c.get(url).text[:4000] agent = Agent(name="scout", instructions="Use fetch_page for any web lookup.", tools=[fetch_page]) print(Runner.run_sync(agent, "What IP does https://api.ipify.org report?").final_output) ``` Note: Germany has no carrier modem, so the pool is peer-de; mbl-de always fails. ## Vercel AI SDK Page: https://agents.proxies.sx/integrations/vercel-ai-sdk/ The Vercel AI SDK (the ai package) is a TypeScript toolkit for LLM apps with a unified tool-calling API. Node's built-in fetch ignores proxy env vars, so route tool fetches through an undici ProxyAgent. Rotation: sticky per generateText call; ondemand when every tool call is independent. Build the dispatcher once per request with a fresh session id and reuse it for every tool call in that request. ```node // npm i ai @ai-sdk/openai undici zod import { generateText, tool, stepCountIs } from "ai"; import { openai } from "@ai-sdk/openai"; import { ProxyAgent, fetch as proxiedFetch } from "undici"; import { randomUUID } from "node:crypto"; import { z } from "zod"; const sid = randomUUID().slice(0, 12); // one session id per request const username = `psx_ACCOUNT_ID-peer-us-rot-sticky-sid-${sid}`; const dispatcher = new ProxyAgent({ uri: "http://gw.proxies.sx:7000", token: "Basic " + Buffer.from(`${username}:PROXY_PASSWORD`).toString("base64"), }); const { text } = await generateText({ model: openai("gpt-4o-mini"), prompt: "What IP does https://api.ipify.org?format=json report?", stopWhen: stepCountIs(3), tools: { fetchPage: tool({ description: "Fetch a URL through a US residential/mobile exit", inputSchema: z.object({ url: z.string().url() }), execute: async ({ url }) => (await proxiedFetch(url, { dispatcher })).text(), }), }, }); console.log(text); ``` Note: AI SDK 5 shown (inputSchema, stopWhen). On AI SDK 4 the tool field is parameters and the loop option is maxSteps. ## n8n Page: https://agents.proxies.sx/integrations/n8n/ n8n is a source-available workflow automation tool. Its HTTP Request node has a Proxy option that takes a full proxy URL, so the whole username DSL fits in one expression. Rotation: sticky per execution: -sid-{{ $execution.id }}. The execution id is unique per workflow run and stable across every node in it, so all HTTP Request nodes in one run share one exit. For a stateless poll use -rot-ondemand and drop the sid. ```json { "nodes": [ { "name": "Fetch via Proxies.sx", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [0, 0], "parameters": { "url": "https://api.ipify.org?format=json", "options": { "proxy": "=http://psx_ACCOUNT_ID-peer-fr-rot-sticky-sid-{{ $execution.id }}:PROXY_PASSWORD@gw.proxies.sx:7000" } } } ], "connections": {} } ``` Note: Paste the JSON into the n8n canvas, or set Options > Proxy on any HTTP Request node by hand. The leading = marks an expression. Keep credentials in an n8n credential or environment variable rather than inline. ## Stagehand Page: https://agents.proxies.sx/integrations/stagehand/ Stagehand (by Browserbase) adds act, extract and observe primitives on top of Playwright so an LLM can operate pages with natural-language instructions. Its local launch cannot take an authenticated proxy yet, so the sample routes a Browserbase session through the gateway with an external proxy. Rotation: sticky per Stagehand instance. One Stagehand instance is one browser session; give it one session id at init and every act/extract in it shares the exit. ```node // npm i @browserbasehq/stagehand zod // Stagehand's local launch does not support authenticated proxies (docs.stagehand.dev/configuration/browser), // so route the Browserbase session through the gateway with an external proxy. import { Stagehand } from "@browserbasehq/stagehand"; import { randomUUID } from "node:crypto"; import { z } from "zod"; const sid = randomUUID().slice(0, 12); // one session id per instance const stagehand = new Stagehand({ env: "BROWSERBASE", apiKey: process.env.BROWSERBASE_API_KEY, projectId: process.env.BROWSERBASE_PROJECT_ID, browserbaseSessionCreateParams: { projectId: process.env.BROWSERBASE_PROJECT_ID, proxies: [{ type: "external", server: "http://gw.proxies.sx:7000", username: `psx_ACCOUNT_ID-peer-us-rot-sticky-sid-${sid}`, password: "PROXY_PASSWORD", }], }, }); await stagehand.init(); const page = stagehand.context.pages()[0]; await page.goto("https://api.ipify.org?format=json"); const { ip } = await stagehand.extract("the ip field", z.object({ ip: z.string() })); console.log(ip); await stagehand.close(); ``` Note: With env: "BROWSERBASE" the proxy is configured on the Browserbase session instead; the DSL string is the same. ## LangChain Page: https://agents.proxies.sx/integrations/langchain/ LangChain is the most widely used LLM application framework. A proxy belongs in the tool that fetches, so wrap httpx in a @tool and hand it to a ReAct agent. Rotation: sticky per agent invocation. Generate the session id when you build the tool for a run. Reusing one module-level id across days would pin every run to the same device; a per-run id keeps runs isolated. ```python # pip install langchain-core langchain-openai langgraph httpx import uuid, httpx from langchain_core.tools import tool from langchain_openai import ChatOpenAI from langgraph.prebuilt import create_react_agent SID = uuid.uuid4().hex[:12] # one session id per run PROXY = f"http://psx_ACCOUNT_ID-peer-gb-rot-sticky-sid-{SID}:PROXY_PASSWORD@gw.proxies.sx:7000" @tool def fetch_page(url: str) -> str: """Fetch a URL through a UK residential/mobile exit.""" return httpx.get(url, proxy=PROXY, timeout=30).text[:4000] agent = create_react_agent(ChatOpenAI(model="gpt-4o-mini"), tools=[fetch_page]) result = agent.invoke({"messages": [("user", "What IP does https://api.ipify.org report?")]}) print(result["messages"][-1].content) ``` Note: For document loaders (WebBaseLoader, AsyncHtmlLoader) pass requests_kwargs={"proxies": {"http": PROXY, "https": PROXY}} instead. ## CrewAI Page: https://agents.proxies.sx/integrations/crewai/ CrewAI orchestrates role-playing agents into crews that share tasks. Tools are plain Python functions decorated with @tool, so the proxy lives inside the tool body. Rotation: sticky per crew kickoff. All agents in one crew usually work one job, so they can share one session id; if two agents must look like two visitors, build two tools with two ids. ```python # pip install crewai httpx import uuid, httpx from crewai import Agent, Task, Crew from crewai.tools import tool SID = uuid.uuid4().hex[:12] # one session id per kickoff PROXY = f"http://psx_ACCOUNT_ID-peer-us-rot-sticky-sid-{SID}:PROXY_PASSWORD@gw.proxies.sx:7000" @tool("fetch_page") def fetch_page(url: str) -> str: """Fetch a URL through a US residential/mobile exit.""" return httpx.get(url, proxy=PROXY, timeout=30).text[:4000] scout = Agent(role="Scout", goal="Read web pages through the proxy", backstory="Careful and literal.", tools=[fetch_page]) task = Task(description="What IP does https://api.ipify.org report?", expected_output="An IPv4 address", agent=scout) print(Crew(agents=[scout], tasks=[task]).kickoff()) ``` Note: CrewAI reads OPENAI_API_KEY from the environment for the LLM; the proxy only affects fetch_page. ## Make and Zapier Page: https://agents.proxies.sx/integrations/make-zapier/ Make and Zapier are no-code automation platforms. Neither the Make HTTP module nor Zapier's Webhooks step exposes an outbound proxy setting, so the pattern is different: use them to drive the Proxies.sx REST API and hand the resulting proxy URL to the step that does the fetching (your own worker, a Code step, or a scraper that accepts a proxy URL). Rotation: ondemand, or sticky keyed on the scenario/zap run id. Build the username with the run id as the session id ({{execution_id}} in Make, the zap run id in Zapier) so every step of one run shares one exit. ```bash # Step 1 - HTTP module / Webhooks step: fetch your ready-made credentials (once) curl https://api.proxies.sx/v1/gateway/credentials -H "X-API-Key: psx_YOUR_API_KEY" # -> { "username": "psx_ACCOUNT_ID", "httpProxy": "http://psx_ACCOUNT_ID:PASS@gw.proxies.sx:7000", ... } # Step 2 - a Text/Set-variable step builds the per-run proxy URL from the DSL: # http://psx_ACCOUNT_ID-peer-us-rot-sticky-sid-{{execution_id}}:PROXY_PASSWORD@gw.proxies.sx:7000 # Step 3 - the step that actually fetches uses that URL, e.g. a worker you host: curl -x "http://psx_ACCOUNT_ID-peer-us-rot-sticky-sid-RUN_ID:PROXY_PASSWORD@gw.proxies.sx:7000" https://api.ipify.org?format=json ``` Note: The X-API-Key header is what every Proxies.sx REST call needs; the gateway itself only ever sees the username/password pair.