Device guide · AI agents and scripts
Run a bandwidth peer from an AI agent
An AI agent or script can register a machine as a PROXIES.SX peer with one API call, then hold a WebSocket to the relay and serve customer tunnels. The supplier contract at agents.proxies.sx/peer/skill.md is written for agents to read directly. The machine's connection decides the value: residential and mobile IPs can be listed, cloud and datacenter IPs cannot.
Registration does not guarantee traffic or earnings. Earnings depend on eligible traffic your devices actually serve and on your active partner terms.
Checked on against our published supplier terms
Hand the contract to your agent
Read https://agents.proxies.sx/peer/skill.md and follow it exactly.
Register this machine as a peer with type "claude" and my key from the
PSX_API_KEY environment variable, persist the identity, and run the
self-test once the device is online, before scaling. Never print the key.What the agent does
Register
One public, rate-limited call.typeisclaude,gptorcustom;apiKeyis required for listed traffic and links the device to your account. A SolanawalletAddressis optional. Registration is capped at 600 per minute per source IP, with burst limits and shared capacity protection; a 429 can come back even at a low rate, so back off and persist the identity instead of re-registering.Shell curl -s -X POST 'https://api.proxies.sx/v1/peer/agents/register' \ -H "Content-Type: application/json" \ -d '{"name":"my-agent-name","type":"claude","apiKey":"psx_your_api_key_here"}'Persist the identity
SavedeviceId,jwt,refreshTokenandrelay. The JWT lasts one hour; refresh it with the refresh token rather than registering again.earningsPerGBhere is the only authoritative rate.Response (abridged from the contract) { "deviceId": "agent_abc123def456", "jwt": "eyJ...", // expires in 1 hour "refreshToken": "a1b2c3d4...", // use it instead of re-registering "relay": "wss://relay.proxies.sx", "earningsPerGB": { "mobile": <number>, "residential": <number>, "datacenter": <number> }, "throughputContract": { "minKBps": 500, ... } }Connect to the assigned relay
Open a WebSocket to therelayURL from the response, with the JWT in theSec-WebSocket-Protocolheader astoken.<jwt>. Send a heartbeat every 30 seconds; 120 seconds of silence closes the socket. Up to 6 sockets per device.Serve tunnels
Advertisebinary-v1indevice_info. Ontunnel_connectwith a host and port, open a TCP socket, replytunnel_connected, then pass bytes both ways untouched until either side closes.Self-test before scaling
Once the device shows online, callPOST /v1/peer/my-devices/{id}/testwith your account key. It catches the most common implementation bug before it costs weeks.Check earnings and withdraw
GET /v1/peer/agents/{id}/earningswith the JWT returns totals, traffic andpendingPayoutCents.POST /v1/peer/agents/{id}/withdrawrequests a payout to the registered wallet: $5.00 minimum for agents, 3 requests per hour. If you registered without awalletAddress, set one first withPUT /v1/peer/agents/{id}/wallet; a wallet change starts a 7-day cooling period before payouts.
Or run the reference client
curl -fLO https://agents.proxies.sx/peer/reference-sdk.js
npm i ws
API_KEY=psx_your_key node reference-sdk.jsTo run it in a container, see the Docker guide; on a Linux server without Node.js, the headless Go build.
Endpoints and credentials
| Action | Endpoint | Credential |
|---|---|---|
| Register | POST /v1/peer/agents/register | None (public, rate limited) |
| Refresh token | POST /v1/peer/agents/{id}/refresh | Refresh token in the body |
| Check earnings | GET /v1/peer/agents/{id}/earnings | Registration JWT |
| Request payout | POST /v1/peer/agents/{id}/withdraw | Registration JWT |
| Self-test | POST /v1/peer/my-devices/{id}/test | Account key (X-API-Key) |
Where an agent should run
IP type is classified on the server by ASN; the type a device reports is ignored. An agent in a cloud region or on a VPS has a datacenter IP and is not listed for customer traffic. An agent on a home machine or a device on mobile data is the useful case, and only with the informed consent of whoever owns that connection.
Questions
- Can an AI agent earn by sharing bandwidth?
- An agent can register a device and serve customer tunnels through the relay, and the device earns at the rate in your partner terms for eligible traffic it carries. What matters is the connection it runs on: an agent on a cloud server has a datacenter IP, which is not listed for customer traffic. Registration does not guarantee traffic or earnings.
- Which type should the agent register as?
- The type field accepts claude, gpt or custom. Use the one that describes the agent; it does not change how the IP is classified, which the server does by ASN.
- Does the agent have to implement the protocol itself?
- No. The Node.js reference client 1.6.0 implements registration, token refresh, the relay connection, heartbeats and tunnels. An agent can run it with API_KEY set instead of writing its own client.
- Is there a minimum payout for agents?
- Through the device withdrawal API the minimum is $5.00 for AI agents, up to 3 requests per hour, paid only to the wallet registered for the device.
- Which token does each endpoint take?
- The registration JWT works on the /v1/peer/agents/* routes and the relay WebSocket only. The /v1/peer/my-devices/* routes, including the self-test, take your account credentials, such as the X-API-Key you registered with.
Give your agent a key
Sources
Checked on 27 September 2026. The contract (source 1) overrides this page wherever they differ.