Install and use the SDKs
The official SDKs handle REST authentication, typed requests and responses, pagination, and API errors. Use them in your backend to create customers, record purchases, allocate quotas, generate credentials, and read usage. They do not send HTTP or SOCKS traffic through the proxy.
Install a client
Section titled “Install a client”Run the command in your backend project. Use your normal lockfile to keep deployments reproducible.
Use Node.js 22 or later. The same package supports JavaScript and TypeScript, with bundled types. Choose your package manager:
npm install @proxyrequest/sdkpnpm add @proxyrequest/sdkyarn add @proxyrequest/sdkThe examples use ESM imports: use an .mjs file or set "type": "module" in package.json. TypeScript uses the same calls. See the official npm package.
Use Python 3.11 or later, preferably in your project’s virtual environment:
python -m pip install proxyrequest-sdkExamples use the synchronous Client with a context manager to close connections. The package also provides AsyncClient with the same resource names and awaited calls. Request models expose from_dict() for API-shaped dictionaries, including nested objects, UUIDs and enums. See the official PyPI package.
Use 64-bit PHP 8.5 or later and Composer. Byte counts can exceed a 32-bit integer:
composer require proxyrequest/php-sdkExamples load Composer’s vendor/autoload.php. Adjust that path if your script lives in a subdirectory. DTO constructors use camelCase properties such as packageId; the SDK serializes them to API fields such as package_id. See the official Packagist package.
Connect to your deployment
Section titled “Connect to your deployment”Replace {api_host} with your API hostname, without a scheme or path. Replace {api_key} with a backend-only static key. The SDK sets the Authorization: Static … header for you.
curl 'https://{api_host}/api/v1/profile' \ --header 'Authorization: Static {api_key}'import { ProxyRequestClient } from "@proxyrequest/sdk";
const client = ProxyRequestClient.withApiKey( "{api_key}", { baseUrl: "https://{api_host}/api/v1" });
const result = await client.profile.get();from proxyrequest_sdk import Client
with Client.with_api_key( "{api_key}", base_url="https://{api_host}/api/v1") as client: result = client.profile.get()<?phprequire __DIR__ . '/vendor/autoload.php';
use ProxyRequest\Client;
$client = Client::withApiKey( '{api_key}', 'https://{api_host}/api/v1');
$result = $client->profile()->get();Selected fields
{ "id": "550e8400-e29b-41d4-a716-446655440001", "username": "customer_demo_42", "is_reseller": false, "is_superuser": false, "orders": []}Show full responseShow selected fields
{ "id": "550e8400-e29b-41d4-a716-446655440001", "username": "customer_demo_42", "email": "", "is_reseller": false, "is_marketer": false, "is_superuser": false, "date_joined": "2026-09-16T12:00:00Z", "date_joined_ts": 1789560000, "first_name": "", "last_name": "", "balance": 0, "language": "en", "country": "", "state": "", "city": "", "address": "", "zip": "", "company_name": "", "company_address": "", "company_city": "", "company_postal_code": "", "company_country": "", "company_vat_number": "", "allowed_ips": [], "blocked_domains": [], "connection_limit": 100, "parent_id": "550e8400-e29b-41d4-a716-446655440010", "sub_users": 0, "referrals": 0, "referral_id": "", "referral_code": "example42", "referral_data_earned": 0, "referral_data_pending": 0, "referral_balance_pending": 0, "referral_balance_earned": 0, "currency": { "code": "USD", "symbol": "$" }, "coupons": [], "orders": []}Replace placeholders in braces with your values. Responses use synthetic example data.Install SDKsAPI reference →
Select a language in any Request window. The choice carries across the guides. Each snippet includes imports, a client, and one operation; reuse a client in your application instead of creating one for every call.
The Response window shows example HTTP JSON, not a second request to execute. Python and PHP return typed models; JavaScript and TypeScript return the corresponding typed data. Expand Show full response for fields omitted from the preview. Some SDKs also send documented default values for optional fields; omitting those fields in cURL has the same effect. In proxy-generation examples, leave the format string’s tokens unchanged: the generator replaces them with the resulting proxy credentials.
For an account session, select the JWT example in API fundamentals. Use withBearerToken in JavaScript/PHP or with_bearer_token in Python. A proxy username/password is not an API credential.
Keep business operations safe
Section titled “Keep business operations safe”SDKs do not change permissions or accounting rules. Only an administrator can create an invoice with status: paid. Adding data to a virtual child order assigns a quota; it does not buy data or move purchased ledgers.
The SDK automatically protects supported writes during a small number of transient network retries in the same call. If the call still fails or the application restarts before saving the result, treat the outcome as uncertain: inspect the affected invoice, order, user or webhook before submitting another write.
Pass the current ETag as {etag} for examples using If-Match, including its quotes. A conflict requires re-reading the resource and deciding whether the write is still appropriate. See retries and concurrency.
Choose a complete workflow
Section titled “Choose a complete workflow”- Own billing quickstart: provision independently purchased customer data after a confirmed external payment.
- Reseller quickstart: allocate a child’s quota on an already funded parent package.
- Webhooks: authenticate raw deliveries before reading their JSON.
- All API workflows: find the guide for each supported operation.
The generated API Reference remains the HTTP contract, with its own raw HTTP examples. Use the SDK tabs in these guides for client-library examples. Once credentials are generated, use your application’s HTTP/SOCKS client or the cURL proxy smoke test to send traffic.