Uses · Agents and scripts
A VPN your agent can buy by itself
Submarine VPN can be bought end to end over plain HTTP. A script or an AI agent with a crypto wallet lists the plans, creates an invoice, pays it and receives a subscription link, with no account, no email and no human in the loop. $3 for 30 days, $8.55 for 90 days, $16.20 for 180 days, $27 for 365 days.
Choose your dive →The whole flow in four calls
| Step | Call | What comes back |
|---|---|---|
| 1. Read the menu | GET /api/plans |
the plan, the four lengths with their discounts, and the current USD rate of each accepted coin |
| 2. Order | POST /api/invoices |
invoiceId, amountCrypto, priceUsd, recipient, payUri, expiresAt |
| 3. Pay | your wallet | send exactly amountCrypto to recipient (or use payUri) |
| 4. Collect | GET /api/invoices/<invoiceId> |
status, and subscriptionUrl once it is ISSUED |
Base URL: https://submarinevpn.com. JSON in, JSON out. No API key: the payment is the authorisation.
1. Read the plans
curl -s https://submarinevpn.com/api/plans
The answer lists one tier ("id": "standard", 5 devices, all three modes) and four durations: 1, 3, 6 and 12 months, with 0, 5, 10 and 25 per cent off. It also carries btcUsd, xmrUsd, zecUsd, ethUsd and bnbUsd, the rates the checkout uses. A coin appears only while it can be quoted.
2. Create an invoice
curl -s https://submarinevpn.com/api/invoices \
-H 'content-type: application/json' \
-d '{"planId":"standard-1m","username":"agent-7k2q9x","currency":"xmr","src":"sm-agent"}'
planIdis the tier id plus the length:standard-1m,standard-3m,standard-6morstandard-12m(30, 90, 180 or 365 days).usernameis any string of 3 to 64 letters, digits,_or-that you make up. It is not an account and needs no password. Keep it: an order with the same username later extends the same subscription, so the link does not change.currencyisbtc,xmr,zec,ethorbnb. Any other value is refused.srcis an optional tag of up to 32 characters. Usesm-agentso we can see that agents buy.
The response (HTTP 201) contains invoiceId, amountCrypto, priceUsd, recipient, payUri and expiresAt.
3. Pay
Send exactly amountCrypto of the chosen coin to recipient, on the right network: Bitcoin on-chain (no Lightning), Monero, Zcash, Ether on Ethereum mainnet, BNB on BNB Smart Chain. If your wallet takes a fee out of the amount, add it on top so the full amount arrives. payUri is a standard payment URI if your wallet library prefers one. Paying a little after expiresAt still counts: late payments are credited.
4. Poll and collect
curl -s https://submarinevpn.com/api/invoices/<invoiceId>
Poll every few seconds. status moves from PENDING to PAID and then to ISSUED, at which point subscriptionUrl holds the private link. EXPIRED means the quote ran out with nothing received. Typical time to ISSUED: about a minute for BNB, two for Monero, three for Ether, a few for Zcash and about ten for Bitcoin (one confirmation).
5. Connect
subscriptionUrl is a standard subscription link. Imported into a client such as sing-box or Hiddify, it gives entries for every port of call: Netherlands (Amsterdam), Poland (Warsaw), Finland (Helsinki), Estonia (Tallinn), Switzerland (Zurich), Czechia (Prague), Germany (Frankfurt), United Kingdom (London), United States (California) and United States (Arizona, Phoenix). Opened in a browser, it shows the setup page with every mode, including the AmneziaWG config. For a headless box, sing-box is the easiest to run from a config file. Store the link as a secret: anyone who has it can use the subscription.
Limits and errors
- 400 with an error message: a bad
planId,usernameorcurrency. - 429: too many orders from your network in a short time. Reuse the open invoice instead of creating new ones, and try again later (the limit can last up to an hour).
- 404 on an invoice id: the id is wrong.
Create one invoice per purchase and poll it; do not create a fresh invoice on every retry.
Why a real tunnel and not a proxy
Submarine sells a per-subscription VPN, not an open HTTP or SOCKS proxy. Shared open proxies are found and blocklisted fast. A subscription bound to 5 devices stays clean and reachable. Run a client on the subscription, and point your agent's traffic at that client's local port.
More on the modes in how it works and on payment in crypto VPN. People who use AI services from restricted regions may also want VPN for AI tools.
FAQ
Can an AI agent buy a VPN on its own?
Yes. Submarine has no sign-up, email or KYC step. An agent with a wallet can call /api/plans, create an invoice, pay it on chain and read the subscription link from /api/invoices/<id>.
Do I need an API key?
No. The endpoints are public, and the payment itself is what grants access.
Which coins can a script pay with?
Bitcoin on-chain, Monero, Zcash, Ether on Ethereum and BNB on BNB Smart Chain. Set currency to btc, xmr, zec, eth or bnb.
How does my agent renew the subscription?
Create a new invoice with the same username and pay it. The same subscription is extended and the link stays the same.
Is there an HTTP or SOCKS5 proxy endpoint?
No. You receive a VPN subscription and run a standard client such as sing-box, which can expose a local SOCKS or HTTP port for your software.
What happens if I get HTTP 429?
Too many orders came from your network in a short time. Keep polling the invoice you already have, and create new ones later.