For the complete documentation index, see llms.txt. This page is also available as Markdown.

API-Key Authentication

Pay with a card, get an sr_live_… key, and authenticate every request through the proxy gateway.

Step 1 — Get an API key

  1. Visit the billing portal.

  2. Sign in with your email and pick a plan.

  3. Copy the sr_live_… key shown on screen. Treat it like a password.

Lost your key? You can rotate it at any time at /billing/reissue. Your existing key stops working as soon as you reissue.

Step 2 — Send a request

HTTP proxy (port 8080)

curl -x "http://gateway.spacerouter.org:8080" \
     -U "sr_live_YOUR_API_KEY:" \
     https://httpbin.org/ip

SOCKS5 proxy (port 1080)

curl -x "socks5://sr_live_YOUR_API_KEY:@gateway.spacerouter.org:1080" \
     https://httpbin.org/ip

Geo targeting

Append routing parameters to the username segment of the URL. Order doesn't matter; pairs are separated by hyphens.

Parameter
Values
Example

country

2-letter ISO country code

country-US, country-KR

type

residential, mobile, business, hosting

type-residential

Endpoints

Protocol
Host
Port

HTTP

gateway.spacerouter.org

8080

SOCKS5

gateway.spacerouter.org

1080

Common errors

HTTP code
Meaning
What to do

407

Bad or missing API key.

Double-check the key, especially the trailing colon in sr_live_KEY: for curl -U.

402

Monthly data quota exceeded.

Upgrade your plan in the billing portal.

429

Rate limited.

Slow down. The response includes a Retry-After header.

503

No Provider matches your region/type filter.

Drop the filter or pick another region.

For the full error catalogue, see Errors & Troubleshooting.

Use it in your code

Most users will use the SDK rather than raw curl:

Python SDKSpaceRouter("sr_live_…") — full HTTP method coverage, retries, async client.

JavaScript SDKnew SpaceRouter("sr_live_…") — fetch-style API, TypeScript types.

Last updated

Was this helpful?