OP-ProxyOP-Proxy/ API
openapi.json
API Keys
Overview
  • Introduction
  • Quickstart
  • Authentication
  • Retries
  • Rate limits
Endpoints
  • GET/account
  • GET/catalog/plans
  • POST/purchase
  • GET/services
  • GET/services/{id}
  • GET/services/{id}/proxies
  • POST/services/{id}/extend
  • PUT/services/{id}/whitelist
  • POST/services/{id}/credentials
  • PUT/services/{id}/country
  • PUT/services/{id}/rotation
  • GET/logs
Reference
  • Error codes
  • OpenAPI spec
  • FAQ
OP-Proxy API · v1

REST API for proxy automation

Purchase rotating IPv4 and IPv6 proxies, manage services, and read account state from your own code. Bearer-token authentication, predictable JSON shapes, OpenAPI 3.1 spec for code generation.

Bearer auth

One token per key. Optional IP allowlist. 2FA-gated key creation.

Instant provisioning

Rotating proxies are created on the spot. No webhooks needed.

OpenAPI 3.1

Generate clients in TypeScript, Python, or any OAS-compatible language.

Quickstart

  1. 1Top up your balance — rotating purchases via API are charged from balance (RUB).
  2. 2Create an API key in your dashboard. The full token is shown only once. Copy it.
  3. 3Make your first call:
curl https://op-proxy.com/api/v1/account \
  -H "Authorization: Bearer opx_live_..."

curl https://op-proxy.com/api/v1/catalog/plans \
  -H "Authorization: Bearer opx_live_..."

curl -X POST https://op-proxy.com/api/v1/purchase \
  -H "Authorization: Bearer opx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"type":"ipv4_rotating","plan_id":"<from step 2>"}'

Authentication

Pass your API key in the Authorization header on every request:

Authorization: Bearer opx_live_<32 hex characters>
  • Keys are bound to a single account and give full control over that account. Treat them like passwords.
  • You can optionally pin a key to a list of source IPs at creation time.
  • Creating or revoking a key requires your account password (and TOTP if 2FA is on).
  • Card / crypto / Robokassa payments are not API-callable — they require browser redirects. Top up via the dashboard.

Retries

Do not blindly retry POST /purchase or POST /extend on timeout.

Each call creates a separate service or extends by another period. If a request fails mid-flight, call GET /services first to see what happened before retrying.

Rate limits

Limits are per API key. Every response includes the rate-limit headers below. 429 responses include a Retry-After header.

BucketLimit
Global300 req/min, 5 000 req/hour
POST /purchase60 / hour
POST /services/{id}/credentials30 / hour

Endpoints

All endpoints accept and return JSON unless noted. Base URL: https://op-proxy.com/api/v1

GET/account

Get account summary

Returns your username, email, balance (RUB) and currency. Call this before /purchase to check funds.

curl https://op-proxy.com/api/v1/account \
  -H "Authorization: Bearer $OPX_TOKEN"
Response
{
  "status": "ok",
  "data": {
    "username": "alice",
    "email": "alice@example.com",
    "balance": 1500,
    "currency": "RUB"
  }
}
GET/catalog/plans

List purchasable plans

Returns only rotating plans. Filter by ?type=ipv4_rotating or ?type=ipv6_rotating.

Query parameters
  • typequerystring

    Filter the catalog by service type.

    Enum:ipv4_rotatingipv6_rotating
curl "https://op-proxy.com/api/v1/catalog/plans?type=ipv4_rotating" \
  -H "Authorization: Bearer $OPX_TOKEN"
Response
{
  "status": "ok",
  "data": {
    "plans": [
      {
        "plan_id": "65a9f0c1b2c3d4e5f6a7b8c9",
        "type": "ipv4_rotating",
        "name": "IPv4 Rotating 100 threads",
        "threads": 100,
        "days": 30,
        "price": 1500,
        "currency": "RUB"
      }
    ]
  }
}
POST/purchase

Purchase a rotating proxy package

Charges your balance and provisions a new service. Each call creates a separate service — do NOT blindly retry on network errors; call GET /services first to check what happened.

Request body
{
  "type": "ipv4_rotating",
  "plan_id": "65a9f0c1b2c3d4e5f6a7b8c9",
  "country": "mixed",
  "rotation": "instant"
}
curl -X POST https://op-proxy.com/api/v1/purchase \
  -H "Authorization: Bearer $OPX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "ipv4_rotating",
    "plan_id": "65a9f0c1b2c3d4e5f6a7b8c9",
    "country": "mixed",
    "rotation": "instant"
  }'
Response
{
  "status": "ok",
  "data": {
    "service_id": "65aa1100b2c3d4e5f6a7b8d0",
    "type": "ipv4_rotating",
    "threads": 100,
    "expires_at": "2026-06-17T12:34:56.000Z",
    "country": "mixed",
    "rotation": "instant",
    "auth": { "login": "abc...", "password": "def..." },
    "whitelist": []
  }
}
GET/services

List your services

Cursor pagination. ?status=active (default), expired, or all. ?type filter, ?limit up to 100.

Query parameters
  • typequerystring

    Filter by service type.

    Enum:ipv4_rotatingipv6_rotating
  • statusquerystring

    Filter by lifecycle state.

    Default: activeEnum:activeexpiredall
  • limitqueryinteger

    Page size. Max 100.

    Default: 50
  • cursorquerystring

    service_id from the previous page's next_cursor.

curl "https://op-proxy.com/api/v1/services?status=active&limit=50" \
  -H "Authorization: Bearer $OPX_TOKEN"
GET/services/{id}

Get a service by id

Returns credentials, whitelist, expiry, country, rotation.

Path parameters
  • idpathstringrequired

    24-char hex service id from POST /purchase or GET /services.

curl https://op-proxy.com/api/v1/services/65aa1100b2c3d4e5f6a7b8d0 \
  -H "Authorization: Bearer $OPX_TOKEN"
GET/services/{id}/proxies

Download proxy list

IPv6 services span 3 country gateways (nl/de/at), IPv4 services use the nl gateway. If the service country is "mixed" you get lines from every available country. Use ?country=nl|de|at to filter. ?format=txt (default) returns text/plain. ?format=json returns JSON with a structured servers array. ?layout=user_pass_at_host_port for URL-style. ?auth=false to omit credentials.

Path parameters
  • idpathstringrequired

    24-char hex service id from POST /purchase or GET /services.

Query parameters
  • formatquerystring

    Response format. txt returns text/plain. json returns the structured envelope.

    Default: txtEnum:txtjson
  • layoutquerystring

    Proxy line layout. host_port_user_pass = host:port:login:password. user_pass_at_host_port = login:password@host:port.

    Default: host_port_user_passEnum:host_port_user_passuser_pass_at_host_port
  • authqueryboolean

    Include login/password in each line. Set to false for IP-whitelisted use.

    Default: true
  • countryquerystring

    Filter to one country's gateway. IPv6 supports nl/de/at. IPv4 supports nl.

    Enum:nldeat
curl "https://op-proxy.com/api/v1/services/65aa1100b2c3d4e5f6a7b8d0/proxies?format=txt" \
  -H "Authorization: Bearer $OPX_TOKEN"
POST/services/{id}/extend

Extend service by 30 days

Charges plan price. Each call adds another period — do NOT blindly retry on network errors.

Path parameters
  • idpathstringrequired

    24-char hex service id from POST /purchase or GET /services.

curl -X POST https://op-proxy.com/api/v1/services/65aa1100b2c3d4e5f6a7b8d0/extend \
  -H "Authorization: Bearer $OPX_TOKEN"
PUT/services/{id}/whitelist

Replace whitelist IPs

Full replacement (PUT, not PATCH). Max 50 entries. Optional parallel labels[] array.

Path parameters
  • idpathstringrequired

    24-char hex service id from POST /purchase or GET /services.

Request body
{
  "whitelisted_ips": ["203.0.113.10", "198.51.100.4"],
  "labels": ["home", "office"]
}
curl -X PUT https://op-proxy.com/api/v1/services/65aa1100b2c3d4e5f6a7b8d0/whitelist \
  -H "Authorization: Bearer $OPX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "whitelisted_ips": ["203.0.113.10", "198.51.100.4"],
    "labels": ["home", "office"]
  }'
POST/services/{id}/credentials

Regenerate login and password

Rate-limited to 30/hour per API key. Old credentials stop working immediately. Use this to rotate proxy login/password if they leak.

Path parameters
  • idpathstringrequired

    24-char hex service id from POST /purchase or GET /services.

curl -X POST https://op-proxy.com/api/v1/services/65aa1100b2c3d4e5f6a7b8d0/credentials \
  -H "Authorization: Bearer $OPX_TOKEN"
PUT/services/{id}/country

Change country/region

IPv6-Rotating only. IPv4-Rotating always routes through the nl gateway and returns 400 unsupported_for_type.

Path parameters
  • idpathstringrequired

    24-char hex service id from POST /purchase or GET /services.

Request body
{ "country": "us" }
curl -X PUT https://op-proxy.com/api/v1/services/65aa1100b2c3d4e5f6a7b8d0/country \
  -H "Authorization: Bearer $OPX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"country": "us"}'
PUT/services/{id}/rotation

Change rotation mode

IPv6-Rotating only. IPv4-Rotating rotation is instant by design and returns 400 unsupported_for_type.

Path parameters
  • idpathstringrequired

    24-char hex service id from POST /purchase or GET /services.

Request body
{ "rotation": "instant" }
curl -X PUT https://op-proxy.com/api/v1/services/65aa1100b2c3d4e5f6a7b8d0/rotation \
  -H "Authorization: Bearer $OPX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rotation": "instant"}'
GET/logs

Read API action logs

Cursor pagination. ?since= / ?until= ISO timestamps. Records every API request to your account.

Query parameters
  • sincequerystring (ISO 8601)

    ISO-8601 timestamp. Only logs at or after this point.

  • untilquerystring (ISO 8601)

    ISO-8601 timestamp. Only logs at or before this point.

  • limitqueryinteger

    Page size. Max 200.

    Default: 50
  • cursorquerystring

    service_id from the previous page's next_cursor.

curl "https://op-proxy.com/api/v1/logs?limit=20" \
  -H "Authorization: Bearer $OPX_TOKEN"

Error codes

All error responses use the shape { status: "error", error: { code, message } }. The code field is stable and machine-readable.

CodeHTTPMeaning
invalid_token401Missing, malformed, expired, or revoked API key. Or source IP outside allowlist.
invalid_request400Body is not valid JSON, or required fields are missing.
invalid_id400Path id parameter is not a valid 24-char hex id.
invalid_plan_id400plan_id does not exist or does not match the requested type.
invalid_type400type must be ipv4_rotating or ipv6_rotating.
invalid_country400country must be a 2-32 char alphanumeric string.
invalid_rotation400rotation must be a 2-32 char alphanumeric string.
invalid_ip400An entry in whitelisted_ips is not a valid IPv4 address.
too_many_ips400Whitelist exceeds the 50-entry limit.
insufficient_balance402Account balance is below the plan price. Top up via the dashboard.
not_found404Service id does not belong to your account, or doesn't exist.
method_not_allowed405Wrong HTTP verb for this endpoint.
rate_limited429Rate limit exceeded. Check Retry-After header.
server_error500Unexpected error. Retry after a short delay.
unsupported_for_type400Operation not available for this service type (e.g. country/rotation on IPv4-Rotating).
country_unavailable400Requested country is not available for this service type.

OpenAPI spec

A strict OpenAPI 3.1 spec is published at /api/v1/openapi.json. Use it to generate clients automatically:

TypeScript client

Generates typed `fetch` definitions using openapi-typescript.

npx openapi-typescript \
  https://op-proxy.com/api/v1/openapi.json \
  -o opx-types.ts
Python client

Generates a typed async client with openapi-python-client.

openapi-python-client generate \
  --url https://op-proxy.com/api/v1/openapi.json
AI assistant prompt

Paste this into Cursor, Claude, ChatGPT, or any AI coding tool that can fetch URLs. Produces a production-ready typed client.

Build a typed TypeScript client for the OP-Proxy v1 REST API.

Spec:  https://op-proxy.com/api/v1/openapi.json
Base:  https://op-proxy.com/api/v1
Auth:  every request needs the header  Authorization: Bearer YOUR_TOKEN  where YOUR_TOKEN is read from process.env.OPX_TOKEN at runtime.

Requirements:
1. Generate types from the OpenAPI schema (use openapi-typescript or equivalent).
2. Expose one async function per operationId, named in camelCase.
3. Read the token from process.env.OPX_TOKEN; throw if missing.
4. On 2xx, return only the parsed data field. On non-2xx, throw an ApiError carrying code, message, and httpStatus. The API uses a uniform envelope: status plus an error object containing code and message.
5. Map 429 to a RateLimitError that exposes the Retry-After header value in seconds.
6. Do NOT auto-retry POST /purchase or POST /services/:id/extend on network failure. Both are non-idempotent — each retry creates a new service or extends another period. If a retry is needed, the caller should first GET /services to check what happened.
7. For GET /services/:id/proxies?format=txt return the raw text body, not the JSON envelope.
8. All prices and balances are integers in RUB (Russian rubles).
9. Honor X-RateLimit-Remaining: if it reaches 0, surface that to the caller rather than silently retrying.

Deliverable: a single client file plus the generated types file. Include a short usage example at the bottom (account balance check, list rotating plans, purchase the cheapest plan, fetch the proxy list as plain text).

FAQ

Can I pay by card or crypto via the API?▾
No. Card / crypto / Robokassa require browser redirects. The API only charges from account balance. Top up via the dashboard, then use the balance.
Can I buy IPv4-Static or Datacenter IPv4 via the API?▾
No — those require manual provisioning and aren't exposed in the v1 API. Purchase them via the dashboard.
Why no webhooks?▾
Intentional. All rotating provisioning is instant. Poll GET /services if you need to confirm state.
What currency is balance and pricing in?▾
Russian rubles (RUB). All prices and balance values are in RUB.
What if my key leaks?▾
Revoke it immediately from /dashboard/api-keys. Past requests are visible in GET /logs.
On this page
  • Introduction
  • Quickstart
  • Authentication
  • Retries
  • Rate limits
  • Endpoints
  • Error codes
  • OpenAPI spec
  • FAQ