API for developers
Manage your plans from your own scripts and services: check remaining traffic, get proxy lines, whitelist IP addresses and buy more gigabytes from your balance without opening the dashboard.
Quick start
Create a key in the dashboard: Settings → API. The full key is shown only once, so save it right away in a password manager or an environment variable. Up to 5 keys per account; revoke a key you no longer need in the same place.
All URLs start with https://prokso.com/api/v1. Responses are JSON, money is in US dollar cents, traffic is in bytes and GB, and times are UTC in ISO 8601.
curl https://prokso.com/api/v1/me \
-H "Authorization: Bearer $PROKSO_KEY"
The API manages plans. How to connect to the proxies themselves - ports, line formats and country or carrier parameters in the username - is in the gateway reference; if a proxy does not respond, see the step-by-step check.
Authentication
Send the key in the Authorization: Bearer <key> header or in X-API-Key. Your browser dashboard session does not work for the API. Requests from a blocked or deleted account and with a revoked key get a 401 response. A team member creates their own key on the “API” page after switching to the owner's account: the key has their role's permissions. A “Team member” sees only the plans assigned to them and gets proxy lines; other requests get 403. A “Manager” can also buy from the owner's balance. When someone is removed from the team, their keys stop working.
Limits
- Up to 60 requests per minute per key. Beyond that you get 429 and a
Retry-Afterheader with the number of seconds to wait. - Up to 20 failed authentication attempts per 10 minutes from one IP address (a /64 network for IPv6), then 429.
- At most 1,000 proxy lines per request and 5 IP addresses in a plan whitelist.
Errors
Errors always come in the same format with a matching HTTP status:
{"error": {"code": "insufficient_balance", "message": "Not enough money on the balance. Top it up in the dashboard."}}
| HTTP | code | Meaning |
|---|---|---|
| 400 | validation_error, invalid_json, below_minimum_order | Invalid parameters, or the order does not meet the conditions from GET /api/v1/prices. |
| 401 | unauthorized | No key, wrong key or revoked key. |
| 403 | forbidden | Team member key: this action is not available to their role. |
| 402 | insufficient_balance | Not enough money on the balance. Nothing was charged. |
| 404 | not_found | The plan or order does not exist or belongs to another account. |
| 409 / 422 | idempotency_in_progress, idempotency_key_reused | A request with this Idempotency-Key is still running, or the key was used with different data. |
| 429 | rate_limited | Rate limit exceeded: wait as many seconds as Retry-After says. |
| 503 | service_unavailable | The proxy network is temporarily not responding: retry in a minute. |
Purchases without duplicates
Purchases through the API are paid only from your balance (top it up in the dashboard). To make sure a retry after a dropped connection does not buy gigabytes twice, add an Idempotency-Key header with any unique string of up to 100 characters. For 24 hours a repeated request with the same key returns the first order (with the Idempotent-Replayed: true header) instead of creating a new one. If a request is rejected (for example, not enough money), the key can be used again.
Code examples
One scenario in four languages: get your plans with traffic left, take a proxy line with a new IP for every request and check which address a website sees: https://prokso.com/ip returns the IP, country, city and provider. The code reads the key from the PROKSO_KEY environment variable. On 429 and 503 responses it waits as many seconds as the Retry-After header says and retries, up to five attempts.
Python 3 (requests)
import os
import time
import requests
API = "https://prokso.com/api/v1"
AUTH = {"Authorization": f"Bearer {os.environ['PROKSO_KEY']}"}
def call(method, path, headers=None, **kw):
for attempt in range(5):
r = requests.request(method, API + path, headers={**AUTH, **(headers or {})}, timeout=30, **kw)
if r.status_code not in (429, 503):
break
time.sleep(int(r.headers.get("Retry-After", "5")))
if r.status_code >= 400:
raise RuntimeError(r.json()["error"])
return r.json()
plans = call("GET", "/plans")["plans"]
for p in plans:
print(p["id"], p["label"], p["status"], (p["traffic"] or {}).get("left_gb"), "GB")
plan = plans[0]
line = call("GET", f"/plans/{plan['id']}/proxies",
params={"country": "us", "count": 1, "session": "rotating", "format": "url"})["lines"][0]
ip = requests.get("https://prokso.com/ip", proxies={"http": line, "https": line}, timeout=30).json()
print(ip["ip"], ip["country"], ip["city"])
Node.js 18+ (undici)
Save it as an .mjs file and install the package: npm i undici. The built-in fetch in Node.js cannot use a proxy, so the request to /ip goes through ProxyAgent.
import { fetch, ProxyAgent } from "undici";
const API = "https://prokso.com/api/v1";
const AUTH = { Authorization: `Bearer ${process.env.PROKSO_KEY}` };
async function call(path, init = {}) {
for (let attempt = 0; attempt < 5; attempt++) {
const r = await fetch(API + path, { ...init, headers: { ...AUTH, ...init.headers } });
if (r.status === 429 || r.status === 503) {
const wait = Number(r.headers.get("retry-after") || 5);
await new Promise((ok) => setTimeout(ok, wait * 1000));
continue;
}
const body = await r.json();
if (!r.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
return body;
}
throw new Error("rate_limited");
}
const { plans } = await call("/plans");
for (const p of plans) console.log(p.id, p.label, p.status, p.traffic?.left_gb, "GB");
const q = new URLSearchParams({ country: "us", count: "1", session: "rotating", format: "url" });
const [line] = (await call(`/plans/${plans[0].id}/proxies?${q}`)).lines;
const u = new URL(line);
const login = `${decodeURIComponent(u.username)}:${decodeURIComponent(u.password)}`;
const agent = new ProxyAgent({ uri: `${u.protocol}//${u.host}`, token: "Basic " + Buffer.from(login).toString("base64") });
const ip = await (await fetch("https://prokso.com/ip", { dispatcher: agent })).json();
console.log(ip.ip, ip.country, ip.city);
PHP 8 (cURL)
<?php
const API = "https://prokso.com/api/v1";
function call(string $path): array
{
for ($attempt = 0; $attempt < 5; $attempt++) {
$wait = 5;
$ch = curl_init(API . $path);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("PROKSO_KEY")],
CURLOPT_HEADERFUNCTION => function ($ch, $h) use (&$wait) {
if (stripos($h, "Retry-After:") === 0) {
$wait = (int) trim(substr($h, 12));
}
return strlen($h);
},
]);
$body = json_decode(curl_exec($ch), true);
$code = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($code == 429 || $code == 503) {
sleep(max($wait, 1));
continue;
}
if ($code >= 400) {
throw new RuntimeException($body["error"]["code"] . ": " . $body["error"]["message"]);
}
return $body;
}
throw new RuntimeException("rate_limited");
}
$plans = call("/plans")["plans"];
foreach ($plans as $p) {
printf("%d %s %s %s GB\n", $p["id"], $p["label"], $p["status"], $p["traffic"]["left_gb"] ?? "-");
}
$q = http_build_query(["country" => "us", "count" => 1, "session" => "rotating", "format" => "url"]);
$line = call("/plans/" . $plans[0]["id"] . "/proxies?" . $q)["lines"][0];
$ch = curl_init("https://prokso.com/ip");
curl_setopt_array($ch, [CURLOPT_PROXY => $line, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30]);
$ip = json_decode(curl_exec($ch), true);
echo $ip["ip"], " ", $ip["country"], " ", $ip["city"], "\n";
Go 1.21+
Standard library only: Go passes the username and password from the url line to the proxy itself.
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"strconv"
"time"
)
const api = "https://prokso.com/api/v1"
func call(path string, out any) error {
for attempt := 0; attempt < 5; attempt++ {
req, _ := http.NewRequest("GET", api+path, nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("PROKSO_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
if resp.StatusCode == 429 || resp.StatusCode == 503 {
wait, _ := strconv.Atoi(resp.Header.Get("Retry-After"))
resp.Body.Close()
time.Sleep(time.Duration(max(wait, 1)) * time.Second)
continue
}
defer resp.Body.Close()
if resp.StatusCode >= 400 {
var e struct{ Error struct{ Code, Message string } }
json.NewDecoder(resp.Body).Decode(&e)
return fmt.Errorf("%s: %s", e.Error.Code, e.Error.Message)
}
return json.NewDecoder(resp.Body).Decode(out)
}
return fmt.Errorf("rate_limited")
}
func main() {
var list struct {
Plans []struct {
ID int `json:"id"`
Label string `json:"label"`
Status string `json:"status"`
Traffic *struct {
LeftGB float64 `json:"left_gb"`
} `json:"traffic"`
} `json:"plans"`
}
if err := call("/plans", &list); err != nil {
panic(err)
}
for _, p := range list.Plans {
left := 0.0
if p.Traffic != nil {
left = p.Traffic.LeftGB
}
fmt.Println(p.ID, p.Label, p.Status, left, "GB")
}
q := url.Values{"country": {"us"}, "count": {"1"}, "session": {"rotating"}, "format": {"url"}}
var px struct {
Lines []string `json:"lines"`
}
if err := call(fmt.Sprintf("/plans/%d/proxies?%s", list.Plans[0].ID, q.Encode()), &px); err != nil {
panic(err)
}
proxy, _ := url.Parse(px.Lines[0])
client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxy)}, Timeout: 30 * time.Second}
resp, err := client.Get("https://prokso.com/ip")
if err != nil {
panic(err)
}
defer resp.Body.Close()
var ip map[string]any
json.NewDecoder(resp.Body).Decode(&ip)
fmt.Println(ip["ip"], ip["country"], ip["city"])
}
Purchases with retries and no duplicates
Create the Idempotency-Key once, before the first attempt, and send the same key on every retry: if the connection drops after payment, the repeated request returns the same order instead of buying the gigabytes twice. Continuing the Python example:
import uuid
key = str(uuid.uuid4())
order = call("POST", f"/plans/{plan['id']}/topup", json={"gb": 10}, headers={"Idempotency-Key": key})
print(order["order"]["id"], order["order"]["amount"], order["balance"])
OpenAPI and Postman
The API description in OpenAPI 3.1 format is openapi.json: Postman, Insomnia, Swagger UI and client generators open it. A ready Postman collection is prokso.postman_collection.json: import the file and put your key into the api_key collection variable and the plan ID into plan_id.
Endpoints
GET /api/v1/me
Account email and balance.
curl https://prokso.com/api/v1/me \
-H "Authorization: Bearer $PROKSO_KEY"
{
"email": "you@example.com",
"balance_cents": 4250,
"balance": "$42.50",
"currency": "USD"
}
GET /api/v1/prices
Prices per 1 GB and single-order conditions for each proxy type, the same as in the dashboard.
curl https://prokso.com/api/v1/prices -H "Authorization: Bearer $PROKSO_KEY"
{
"currency": "USD",
"max_gb_per_order": 5000,
"pools": {
"residential": {
"tiers": [
{
"from_gb": 1,
"price_per_gb_cents": 159,
"price_per_gb": "$1.59"
}
],
"min_order_cents": 100,
"min_order": "$1.00",
"min_gb": 1
},
"mobile": {...},
"datacenter": {...}
}
}
GET /api/v1/plans
All plans: type, status (active, paused, limited), login, GB bought and traffic left.
curl https://prokso.com/api/v1/plans -H "Authorization: Bearer $PROKSO_KEY"
{
"plans": [{
"id": 17, "label": "Instagram UA", "pool": "residential",
"status": "active", "paused": false, "login": "a1b2c3d4", "gb_bought": 10,
"traffic": {"left_bytes": 8053063680, "used_bytes": 2684354560, "total_bytes": 10737418240,
"left_gb": 7.5, "used_gb": 2.5, "total_gb": 10.0},
"created_at": "2026-10-05T09:12:44Z"
}]
}
GET /api/v1/plans/{id}
One plan: host, ports, login and password, IP whitelist, pool settings.
curl https://prokso.com/api/v1/plans/17 -H "Authorization: Bearer $PROKSO_KEY"
{
"id": 17, "label": "Instagram UA", "pool": "residential", "status": "active", ...,
"host": "gw.prokso.com", "login": "a1b2c3d4", "password": "********",
"ports": {"http_rotating": 823, "socks5_rotating": 824, "sticky_from": 10000, "sticky_to": 20000},
"ip_whitelist": ["203.0.113.7"], "ip_whitelist_max": 5,
"pool_settings": {"countries": [], "exclude_countries": [], "exclude_asn": [], "anonymous_filter": false,
"rotation_interval_minutes": null, "blocked_hosts": [], "traffic_limit": null}
}
POST /api/v1/plans
A new plan paid from your balance. pool is residential, mobile or datacenter; gb is an integer; label and promo are optional.
curl -X POST https://prokso.com/api/v1/plans \
-H "Authorization: Bearer $PROKSO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6f1c2a90-order-1" \
-d '{"pool": "residential", "gb": 10, "label": "Instagram UA"}'
201 Created
{
"order": {"id": 311, "kind": "new", "status": "fulfilled", "pool": "residential", "gb": 10,
"plan_id": 18, "amount_cents": 1590, "amount": "$15.90", ...},
"plan": {"id": 18, "login": "e5f6a7b8", ...},
"balance_cents": 2350, "balance": "$23.50"
}
POST /api/v1/plans/{id}/topup
Add GB to an existing plan from your balance. Same rules as for a new plan.
curl -X POST https://prokso.com/api/v1/plans/17/topup \
-H "Authorization: Bearer $PROKSO_KEY" \
-H "Idempotency-Key: 6f1c2a90-topup-1" \
-d '{"gb": 50}'
201 Created
{"order": {"id": 312, "kind": "topup", "status": "fulfilled", "gb": 50, ...}, "plan": {...}, ...}
GET /api/v1/plans/{id}/proxies
Proxy lines for a plan, as JSON or plain text.
Add the Accept: text/plain header to get plain text, one proxy per line.
curl "https://prokso.com/api/v1/plans/17/proxies?country=ua&count=3&protocol=http&session=sticky" \
-H "Authorization: Bearer $PROKSO_KEY"
{
"lines": [
"a1b2c3d4__cr.ua:********@gw.prokso.com:10000",
"a1b2c3d4__cr.ua:********@gw.prokso.com:10001",
"a1b2c3d4__cr.ua:********@gw.prokso.com:10002"
],
"count": 3,
"precise_geo": false
}
GET /api/v1/plans/{id}/whitelist
POST /api/v1/plans/{id}/whitelist
DELETE /api/v1/plans/{id}/whitelist?ip=…
Plan IP whitelist: list, add (POST with an ip field) and remove (DELETE with an ip parameter).
curl -X POST https://prokso.com/api/v1/plans/17/whitelist \
-H "Authorization: Bearer $PROKSO_KEY" \
-d '{"ip": "203.0.113.7"}'
{"ips": ["203.0.113.7"], "max": 5}
POST /api/v1/plans/{id}/pause
POST /api/v1/plans/{id}/resume
Pause a plan (proxies stop working, no traffic is used) or resume it.
curl -X POST https://prokso.com/api/v1/plans/17/pause -H "Authorization: Bearer $PROKSO_KEY"
{"id": 17, "status": "paused", "paused": true, ...}
PATCH /api/v1/plans/{id}
Rename a plan (label, up to 60 characters).
curl -X PATCH https://prokso.com/api/v1/plans/17 \
-H "Authorization: Bearer $PROKSO_KEY" \
-d '{"label": "Ads Poland"}'
{"id": 17, "label": "Ads Poland", ...}
GET /api/v1/orders
GET /api/v1/orders/{id}
Recent account orders (limit up to 100) and a single order by ID.
curl "https://prokso.com/api/v1/orders?limit=20" -H "Authorization: Bearer $PROKSO_KEY"
{"orders": [{"id": 312, "kind": "topup", "status": "fulfilled", "gb": 50, "amount": "$79.50", ...}]}
Proxy generator parameters
The same rules as the generator in the dashboard (advanced mode). Precise geo (state, city, ZIP, provider) uses traffic at double rate.
| Parameter | Value |
|---|---|
country | Country code (ua) or up to 10 comma-separated codes; empty means any country. |
count | Number of lines, 1 to 1,000 (default 10). For session=rotating one line is enough. |
protocol | http or socks5. |
session | sticky: a separate port 10000 to 20000 per line keeping the same IP; rotating: a new IP for every request (port 823 HTTP, 824 SOCKS5); session: the rotating port with a session ID in the login. |
format | lp@hp, hp:lp, url, hp@lp, lp:hp or hp (host and port only, for IP-based access). |
start_port | First port for sticky, 10000 to 20000. |
state, city, zip, asn | Precise geo and provider (ASN) for a single country; state is US only. |
exclude_state, exclude_city, exclude_zip | Exclude states, cities or ZIP codes. |
session_prefix | Prefix for session IDs in session mode, Latin letters and digits. |
Static proxies
A permanent IP address for a week, a month or 3 months: ISP, datacenter IPv4 and mobile on a 4G/5G modem. Paid only from your balance, priced per address. Idempotency-Key works the same way as for buying gigabytes.
Order progress is in the status field: paid (money charged) → preparing (addresses are being prepared, usually up to 10 minutes) → configuring (we create the login and test the proxy) → ready. failed means the order was not completed and the money went back to your balance (refunded: true).
Specific codes: product_unavailable (404), the product is not on sale right now; out_of_stock (409), the country or carrier is not available; price_changed (409), the price is above expected_price_cents and the new price is in price_cents; rotation_not_available (409) and rotate_too_often (429, retry_after) for IP changes.
GET /api/v1/static/products
Which products are on sale now, terms and prices per IP (in cents and dollars). Mobile prices have no tiers: the price depends on the country, carrier, modem type, rotation and term.
curl https://prokso.com/api/v1/static/products -H "Authorization: Bearer $PROKSO_KEY"
{
"currency": "USD",
"periods": [{"id": "1w", "days": 7}, {"id": "1m", "days": 30}, {"id": "3m", "days": 90}],
"products": {
"isp": {"enabled": true, "max_qty": 100, "tiers": {"1w": [{"from_qty": 1, "price_per_ip_cents": 220, "price_per_ip": "$2.20"}, ...],
"1m": [...]}},
...
}
}
GET /api/v1/static/countries?product=isp
Countries in stock: code (ua), alpha-3 (UKR) and name. The product parameter is isp, ipv4, mobile. For mobile you also get carriers per modem type (shared or dedicated), rotation options and the price per modem for 1w and 1m (null means not calculated yet; with the country parameter the price is calculated right away).
curl "https://prokso.com/api/v1/static/countries?product=isp" -H "Authorization: Bearer $PROKSO_KEY"
{"product": "isp", "countries": [{"code": "ua", "alpha3": "UKR", "name": "Ukraine"}, ...]}
curl "https://prokso.com/api/v1/static/countries?product=mobile&country=us" -H "Authorization: Bearer $PROKSO_KEY"
{
"product": "mobile",
"countries": [{
"code": "us", "alpha3": "USA", "name": "United States",
"service_types": {
"shared": [{"id": "operator_a", "name": "Operator A", "traffic": "unlimited traffic",
"rotations": [{"id": 0, "by_link": true, "label": "By link - you change the IP yourself",
"price_cents": {"1w": 3200, "1m": 6400}, "price": {"1w": "$32.00", "1m": "$64.00"}}, ...]}],
"dedicated": [...]
}
}]
}
POST /api/v1/static/orders
Buy addresses from your balance: product, country (ua or UKR), period (1w or 1m), qty. The response has the order ID and status; addresses appear within a few minutes. For mobile also send service_type, operator, rotation and preferably expected_price_cents, the price per modem you saw.
curl -X POST https://prokso.com/api/v1/static/orders \
-H "Authorization: Bearer $PROKSO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 9b2e-static-1" \
-d '{"product": "isp", "country": "ua", "period": "1m", "qty": 2}'
201 Created
{
"order": {"id": 41, "kind": "new", "product": "isp", "status": "paid", "step": 1, "steps": 4,
"country": "ua", "period": "1m", "qty": 2, "price_per_ip_cents": 340, "amount_cents": 680, "amount": "$6.80",
"refunded": false, "proxy_ids": [], ...},
"balance_cents": 3570, "balance": "$35.70"
}
curl -X POST https://prokso.com/api/v1/static/orders \
-H "Authorization: Bearer $PROKSO_KEY" \
-H "Idempotency-Key: 9b2e-modem-1" \
-d '{"product": "mobile", "country": "us", "period": "1w", "qty": 1,
"service_type": "shared", "operator": "operator_a", "rotation": 0, "expected_price_cents": 3200}'
409 Conflict
{"error": {"code": "price_changed", "message": "The price has changed - check the new amount and confirm again.",
"price_cents": 3450, "price": "$34.50"}}
GET /api/v1/static/orders/{id}
Progress of one order and the IDs of the issued addresses (proxy_ids).
curl https://prokso.com/api/v1/static/orders/41 -H "Authorization: Bearer $PROKSO_KEY"
{"id": 41, "kind": "new", "product": "isp", "status": "ready", "step": 4, "proxy_ids": [57, 58], ...}
GET /api/v1/static/proxies
Your addresses: IP, HTTP and SOCKS5 ports, username, password, country, term and note. Expired addresses have no username and password. Mobile ones also have the carrier, modem type, rotation and rotate_url, a link to change the IP, only for the "by link" rotation.
curl https://prokso.com/api/v1/static/proxies -H "Authorization: Bearer $PROKSO_KEY"
{
"proxies": [{
"id": 57, "product": "isp", "status": "active", "ip": "203.0.113.24", "port_http": 50100, "port_socks": 50101,
"login": "u7f3k2", "password": "********", "country": "ua", "period": "1m",
"expires_at": "2026-11-26T10:00:00Z", "label": "", "order_id": 41
}, ...]
}
curl https://prokso.com/api/v1/static/proxies -H "Authorization: Bearer $PROKSO_KEY"
{"proxies": [{"id": 60, "product": "mobile", ...,
"mobile": {"operator": "Operator A", "service_type": "shared",
"rotation": {"id": 0, "by_link": true, "label": "By link - you change the IP yourself"},
"rotate_url": "https://prokso.com/rotate/********"}}]}
POST /api/v1/static/proxies/renew
Renew active addresses from your balance (ids, period). Different products are renewed in separate requests.
curl -X POST https://prokso.com/api/v1/static/proxies/renew \
-H "Authorization: Bearer $PROKSO_KEY" \
-H "Idempotency-Key: 9b2e-renew-1" \
-d '{"ids": [57, 58], "period": "1m"}'
201 Created
{"order": {"id": 44, "kind": "renew", "status": "paid", "proxy_ids": [57, 58], "amount": "$6.80", ...}, ...}
POST /api/v1/static/proxies/{id}/rotate
Change the IP of a mobile proxy with the "by link" rotation, at most once a minute.
curl -X POST https://prokso.com/api/v1/static/proxies/60/rotate -H "Authorization: Bearer $PROKSO_KEY"
{"id": 60, "rotated": true, "message": "IP change requested. The new IP will be ready within a minute."}
MCP server for AI agents
Claude, Cursor and other apps that support the Model Context Protocol (MCP) connect to your account directly: the agent checks remaining traffic and gets proxy lines on its own. The address is https://prokso.com/api/v1/mcp (Streamable HTTP transport); sign-in uses the same API key in the Authorization: Bearer header, with the same limits.
Tools: get_account (email and balance), get_prices (prices), list_plans (plans and traffic left), get_plan (username, ports), get_proxy_lines (proxy lines with country, state, city or provider). The tools only read data and return lines; they never spend money. Buying is done in the dashboard or via the REST API above.
Example setup (Cursor: .cursor/mcp.json, Claude Code: .mcp.json in the project):
{
"mcpServers": {
"prokso": {
"type": "http",
"url": "https://prokso.com/api/v1/mcp",
"headers": {"Authorization": "Bearer YOUR_API_KEY"}
}
}
}
Step-by-step setup for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Zed and Cline is on the Prokso MCP server page.