Detailed docs for each API: auth, parameters, body schema, and working request/response examples.
curl -X GET "http://YOUR_HOST:3000/api/key/me" \ -H "x-api-key: pk_xxxxxxxxxxxxxxxxx"
curl -X GET "http://YOUR_HOST:3000/api/key/me" \ -H "x-api-key: pk_xxxxxxxxx"
{
"name": "customer-a",
"permissions": ["check_proxy", "vpn_clients"],
"my_gateways": ["gw_customer_a"],
"proxy_checks_used": 12,
"proxy_check_limit": 500
}
{
"proxies": ["socks5://1.2.3.4:1080", "host:port:user:pass"],
"concurrency": 5,
"timeout": 30000
}
curl -X POST "http://YOUR_HOST:3000/api/check" \
-H "Content-Type: application/json" \
-H "x-api-key: pk_xxxxxxxxx" \
-d '{"proxies":["socks5://1.2.3.4:1080"],"concurrency":5,"timeout":30000}'
{ "jobId": "8f0...", "total": 1 }
const es = new EventSource(`/api/stream/${jobId}`);
es.onmessage = (e) => console.log(JSON.parse(e.data));
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/proxies"
{
"proxy_url": "socks5://user:pass@host:port",
"allow_http_proxy": true
}
curl -X POST "http://YOUR_HOST:3000/api/customer/proxy" \
-H "x-api-key: pk_xxx" -H "Content-Type: application/json" \
-d '{"proxy_url":"socks5://user:pass@host:port","allow_http_proxy":true}'
curl -X PUT "http://YOUR_HOST:3000/api/customer/proxy/gw_a" \
-H "x-api-key: pk_xxx" -H "Content-Type: application/json" \
-d '{"proxy_url":"socks5://new_user:new_pass@host:port"}'
curl -X DELETE "http://YOUR_HOST:3000/api/customer/proxy/gw_a" \ -H "x-api-key: pk_xxx"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/gateway/gw_a/ip"
{ "ip": "104.21.x.x", "changed": false }
curl -X POST "http://YOUR_HOST:3000/api/customer/gateway/gw_a/restart" \ -H "x-api-key: pk_xxx"
curl -X POST "http://YOUR_HOST:3000/api/customer/gateway/gw_a/mitm/start" \ -H "x-api-key: pk_xxx"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/gateway/gw_a/clients"
curl -X POST "http://YOUR_HOST:3000/api/customer/gateway/gw_a/client" \
-H "x-api-key: pk_xxx" -H "Content-Type: application/json" \
-d '{"client_name":"laptop1"}'
{
"ok": true,
"name": "laptop1",
"cert_name": "gw_a_ab12cd34_laptop1",
"ovpn": "client\n..."
}
curl -H "x-api-key: pk_xxx" \ "http://YOUR_HOST:3000/api/customer/vpn/client/gw_a_ab12cd34_laptop1/ovpn"
curl -X DELETE -H "x-api-key: pk_xxx" \ "http://YOUR_HOST:3000/api/customer/vpn/client/gw_a_ab12cd34_laptop1"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/gateway/gw_a/wg-clients"
curl -X POST "http://YOUR_HOST:3000/api/customer/gateway/gw_a/wg-client" \
-H "x-api-key: pk_xxx" -H "Content-Type: application/json" \
-d '{"client_name":"phone1"}'
{
"ok": true,
"name": "phone1",
"wg_name": "gw_a_ab12cd34_phone1",
"conf": "[Interface]\n...",
"qr": "data:image/png;base64,..."
}
curl -H "x-api-key: pk_xxx" \ "http://YOUR_HOST:3000/api/customer/wg/client/gw_a_ab12cd34_phone1"
curl -X DELETE -H "x-api-key: pk_xxx" \ "http://YOUR_HOST:3000/api/customer/wg/client/gw_a_ab12cd34_phone1"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/l2tp"
curl -X POST -H "x-api-key: pk_xxx" \ "http://YOUR_HOST:3000/api/customer/l2tp/gateway/gw_a"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/library"
curl -X DELETE -H "x-api-key: pk_xxx" \ "http://YOUR_HOST:3000/api/customer/library/socks5%3A%2F%2F1.2.3.4%3A1080"
curl -X DELETE -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/library"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/customer/library/export" -o proxy-library.txt
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/info"
curl -X POST -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/mitm/start"
curl -X POST "http://YOUR_HOST:3000/api/public/g/gw_a/client" \
-H "x-api-key: pk_xxx" -H "Content-Type: application/json" \
-d '{"client_name":"guest1"}' -o gw_a_guest1.ovpn
curl -H "x-api-key: pk_xxx" \ "http://YOUR_HOST:3000/api/public/g/gw_a/captures?limit=100&status_min=400&q=login"
{ "flows": [{"id":"...","method":"GET","status":200}], "count": 100, "total": 4321 }
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/captures/flow123"
curl -X DELETE -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/captures"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/stats"
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/export.ndjson" -o gw_a.ndjson curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/export.har" -o gw_a.har curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/export.csv" -o gw_a.csv
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/analyze/info"
curl -X POST "http://YOUR_HOST:3000/api/public/g/gw_a/analyze/models" \
-H "x-api-key: pk_xxx" -H "Content-Type: application/json" \
-d '{"provider":"openai","apiKey":"sk-..."}'
curl -H "x-api-key: pk_xxx" "http://YOUR_HOST:3000/api/public/g/gw_a/analyze?limit=3000&since_minutes=60"
curl -X POST "http://YOUR_HOST:3000/api/public/g/gw_a/analyze/ai" \
-H "x-api-key: pk_xxx" -H "Content-Type: application/json" \
-d '{"provider":"openai","apiKey":"sk-...","model":"gpt-4o-mini","limit":3000}'
const r = await fetch('/api/public/g/gw_a/analyze/ai/stream', {
method: 'POST',
headers: { 'x-api-key': key, 'Content-Type': 'application/json' },
body: JSON.stringify({ provider: 'openai', apiKey: 'sk-...', model: 'gpt-4o-mini' })
});
const reader = r.body.getReader();
const ws = new WebSocket(`wss://YOUR_HOST/ws/g/gw_a?api_key=${encodeURIComponent(key)}`);
ws.onmessage = (e) => console.log(JSON.parse(e.data));
const es = new EventSource(`/api/public/g/gw_a/logs/stream?api_key=${encodeURIComponent(key)}&service=all&lines=100`);
es.onmessage = (e) => console.log(JSON.parse(e.data));
{ "error": "message" }