Skip to content

Connect your agent

HTTP API

An agent uses the same account as a person. It signs up with no details, keeps its access code in a file and signs in with it.

Private preview

coronium.ai is in private preview until its public launch. Outside the preview an agent can read /llms.txt, the guides, the OpenAPI document, the price list and GET /app/api/buy. Every other call under /app/api answers 403 with the code private_preview, so an agent outside the preview cannot follow these steps yet.

Ways to connect

In order of the effort they ask of your agent. Each one reaches the same account and balance.

  1. llms.txt and plain HTTPBuilt
    The index at /llms.txt leads to the guides. Every call is HTTP with JSON, and the quickstart below runs with curl and jq.
  2. OpenAPI documentBuilt
    /openapi.json lists every call with its request, its answer and its refusals, for a client generator or a tool list.
  3. Payment from the agent's own walletBuilt

    Reading whether the operator has switched it on.

    POST /v1/topup adds funds to a balance from an x402 (USDC) or MPP payment, with no sign-in. The agent payments guide covers it.
  4. MCP endpoint with a scoped credentialNot built yet
    Tools under the namespace ai.coronium, reached with a credential limited to what the agent may do. No MCP server is served.
  5. SDKNot built yet
    @coronium-ai/sdk, a typed client over the same HTTP API. npm answers whether anything is published under this name.
  6. CLINot built yet
    @coronium-ai/cli, for sign-up, sign-in and proxy strings from a terminal. npm answers whether anything is published under this name.

Quickstart for your agent

Infrastructure for AI agents to act on the web and on real devices: mobile and residential proxies with real IP addresses, and next phones, Macs and browsers an agent can drive.

One account, one balance, one file to read.

One account and one US dollar balance cover every product, and an agent uses the same kind of account as a person. Peer network proxies are available: you send web traffic over HTTP or SOCKS5 through residential and mobile devices and pay per GB. The Products section of /llms.txt gives the state of every other product, and every call is in /openapi.json.

Every path below is on the base URL you were given, or on the address you read this file from. The commands use curl and jq. Each block runs on its own, in a new shell if need be: it sets umask 077, so only you can read the files it writes, and sets BASE to https://coronium.ai unless you exported BASE with your base URL first.

Rules

  • Send JSON with Content-Type: application/json.
  • Every refusal is a JSON object with code, cause and fix. Read fix and send what it names.
  • Money and byte counts are decimal strings. 1 USD is 1000000 micro-USD.
  • An account has three secrets: credential, accessCode and the session cookie, and a device adds its deviceSecret and any enrolment token. The commands in these guides write each to a file only you can read and pass it to curl on its standard input or from a file, never on a command line. Never print one, and never put one in a prompt, a log or a chat message. The assistant at POST /app/api/assistant refuses a message that holds the credential or the access code.
  • Ask your person before you spend money, replace the credential or the access code, or ask for a payout.
  • A country with no devices online is on request. Make usernames for it anyway: the service records the request, and the answer's stock.status reads on_request.
  • coronium.ai is in private preview until its public launch. If a call answers 403 with the code private_preview, the site is not open to you yet: tell your person.

Steps

  1. Create an account with POST /app/api/signup: no details, only a proof of work this block solves. It saves the answer and session cookie and prints the account id or refusal code.
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS "$BASE/app/api/signup/challenge" -o coronium-account.json &&
python3 -c 'import hashlib,json,sys,itertools;a=json.load(sys.stdin);c=a.get("challenge") or sys.exit(1)
print(json.dumps({"challenge":c,"nonce":str(next(n for n in itertools.count() if int.from_bytes(hashlib.sha256(f"{c}:{n}".encode()).digest(),"big")>>256-a["difficulty"]==0))}))' <coronium-account.json >coronium-signup.json &&
curl -sS -c coronium.cookies -H 'Content-Type: application/json' -d @- "$BASE/app/api/signup" -o coronium-account.json <coronium-signup.json
jq -r '.accountId // .code' coronium-account.json

coronium-account.json now holds accountId, credential and accessCode, shown once. Other codes: /auth.md. If it prints registration_closed, use your person's account: ask them to write its access code and credential into coronium-account.json as {"accessCode": "<access code>", "credential": "<credential>"}, then sign in as step 2 says, which adds accountId. A lost credential is replaced with POST /app/api/credential; strings with the old one stop working.

  1. Sign in with the access code; a new account is signed in already. Repeat this when a call answers sign_in_required, or on another machine. It stops with an error if coronium-account.json holds no access code; the second command answers {"signedIn":true}, and the third adds accountId, or stops if the session names no account.
umask 077
BASE=${BASE:-https://coronium.ai}
jq -c '{code: ((.accessCode | strings | select(. != "")) // error("no accessCode in coronium-account.json"))}' coronium-account.json > coronium-login.json &&
curl -sS -c coronium.cookies -H 'Content-Type: application/json' -d @- "$BASE/app/api/login" < coronium-login.json &&
curl -sS -b coronium.cookies "$BASE/app/api/dashboard" | jq --slurpfile account coronium-account.json '$account[0] + {accountId: ((.account.id | strings | select(. != "")) // error("no account in the session read: sign in again"))}' > coronium-account.next && mv coronium-account.next coronium-account.json
  1. Read the price list with GET /app/api/prices. It needs no account. Each tier lists its countries and the devices online in each. A count under five reads few.
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS "$BASE/app/api/prices"
  1. Read the stock of one country, here Germany, with GET /app/api/proxy/stock?country=de. It lists the IP classes, carriers, states and cities a username can ask for.
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS -b coronium.cookies "$BASE/app/api/proxy/stock?country=de"
  1. Make proxy usernames with POST /app/api/proxy/spawn. Each string in the answer holds {credential}, and the service never prints the credential again. The second command fills it in from the account file and writes the finished strings to coronium-proxies.txt.
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS -b coronium.cookies -H 'Content-Type: application/json' -d '{"count": 1, "pool": "peer", "country": "de", "protocol": "http", "format": "url", "rotation": "none"}' "$BASE/app/api/proxy/spawn" -o coronium-proxies.json
jq -r --slurpfile account coronium-account.json '(($account[0].credential | strings | select(. != "")) // error("no credential in coronium-account.json")) as $credential | .strings[] | sub("[{]credential[}]"; $credential)' coronium-proxies.json > coronium-proxies.txt
  1. Read the balance with GET /app/api/billing. state is active, unfunded, suspended, byte_cap or traffic_stopped. An account with no funds carries no traffic once charging is on. To add funds, follow step 7 with your person or step 8 from your own wallet.
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS -b coronium.cookies "$BASE/app/api/billing"
  1. Add funds with your person. The first block asks for a quote, which names an amount and owes nothing, keeps it in coronium-quote.json and prints it, or the refusal. A quote lasts 30 minutes, and a repeat with the same requestId answers with the same quote. provider is coingate for crypto or stripe for a card. Only one whose configured is true in providers of GET /app/api/billing takes a quote; one with false is refused with provider_not_configured, and every quote with topups_closed while charging is off; nothing is charged either way.
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS -b coronium.cookies -H 'Content-Type: application/json' -d '{"provider": "coingate", "usdMicros": "5000000", "requestId": "topup-1"}' "$BASE/app/api/billing/quotes" -o coronium-quote.json
jq '{quoteId, usdMicros, expiresAt, code, cause, fix}' coronium-quote.json

Show your person usdMicros and wait for their yes. Only then run the second block, which confirms the quote kept in coronium-quote.json, and give them checkoutUrl to pay at. It stops with an error, sending nothing, if the file holds no quote. Confirming the same quote again answers with the same checkout.

umask 077
BASE=${BASE:-https://coronium.ai}
jq -c '{quoteId: ((.quoteId | strings) // error("no quoteId in coronium-quote.json: ask for a quote first")), confirm: true}' coronium-quote.json > coronium-confirm.json &&
curl -sS -b coronium.cookies -H 'Content-Type: application/json' -d @- "$BASE/app/api/billing/topups" < coronium-confirm.json | jq '{checkoutUrl, state, code, cause, fix}'
  1. Pay from your own wallet. POST /v1/topup takes the account id without its dashes and an amount, needs no cookie, and answers 402 with x402 and MPP offers. The block stops with an error, sending nothing, if coronium-account.json holds no account id. How to pay one is in /guides/agent-payments.md. The operator has not switched it on yet: until then it answers 503, offers nothing and charges nothing.
umask 077
BASE=${BASE:-https://coronium.ai}
jq -c '{accountId: (((.accountId | strings | select(. != "")) // error("no accountId in coronium-account.json: run step 2")) | gsub("-"; "")), usdMicros: "5000000"}' coronium-account.json > coronium-topup.json &&
curl -sS -i -H 'Content-Type: application/json' -d @- "$BASE/v1/topup" < coronium-topup.json
  1. Read where to connect with GET /app/api/proxy. endpoint.state is open or closed. While it is closed no buyer traffic is carried, and the strings from step 5 also hold {host} and {port}.
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS -b coronium.cookies "$BASE/app/api/proxy"
  1. Check a route. This call takes the credential as a Bearer header and no cookie. The first command writes the header to coronium-bearer.txt, and stops with an error, sending nothing, if coronium-account.json holds no credential. Add "live": true to the body to send one billed request to the operator's test origin.
umask 077
BASE=${BASE:-https://coronium.ai}
jq -r '"Authorization: Bearer " + ((.credential | strings | select(. != "")) // error("no credential in coronium-account.json"))' coronium-account.json > coronium-bearer.txt &&
curl -sS -H @- -H 'Content-Type: application/json' -d "$(jq -c '{username: .usernames[0]}' coronium-proxies.json)" "$BASE/app/api/proxy/test" < coronium-bearer.txt

Not built yet

  • Not built yet: MCP tools under the namespace ai.coronium, reached with a credential limited to what the agent may do; @coronium-ai/sdk, a typed client over the same HTTP API; and @coronium-ai/cli, for sign-up, sign-in and proxy strings from a terminal. Whether anything is published under one of these names, npm and the MCP registry answer.

So everything above is plain HTTP. A product marked "Not available yet" in /llms.txt takes a request. Signed in, send POST /app/api/demand/device with {"kind": "<product id>"} and an optional one-line note; the ids are the kind enum of that call in /openapi.json. The request is recorded, and nothing is ordered or charged. Your person can also send one from /devices.

Other guides: buyers, buying a private modem line, device owners, usernames, prices, limits.

Proxy usernames

The proxy username says which device should carry a request. The password is always the account's credential. POST /app/api/proxy/spawn prints usernames for you, and this page is the full grammar for writing one by hand.

<account>-<pool>-<country>[-<key>-<value>]...

A username is lowercase ASCII and at most 255 bytes. Each key appears once, in any order. A username outside the grammar is refused with bad_options: the cause names the token and the fix shows the username to send.

Fixed words: any, best, peer, mbl, sid, rot, iptype, carrier, asn, state, city, failover, pin-device, auto5, auto10, auto20, auto60, sticky, hard, mobile, residential, datacenter, isp, none.

PartValuesMeaning
account32 hex digitsThe account id without dashes. It must be the account of the credential.
poolany, best, peerThe peer network. mbl (carrier modems) is recorded as demand and answered on_request.
countrytwo letters, or anyThe measured exit country.
sid-<id>1 to 64 of a-z, 0-9, _A session key. The same key reaches the same device while that device stays in the pool.
rot-<mode>auto5, auto10, auto20, auto60, stickyHow many minutes a session stays on one device. It needs sid, and auto10 applies when it is left out. hard means sticky.
iptype-<class>mobile, residentialThe IP class. datacenter and isp are recorded as demand and answered on_request.
carrier-<slug>a slug from the stockOne carrier.
asn-<number>1 to 4294967295One network by its AS number.
state-<code>, city-<slug>from the stockA region or a city. Both need a country.
failover-noneOne attempt, with no second device.
pin-device-<name>the rest of the usernameYour own named device. It takes country any and no other key.

A username takes at most one of iptype, carrier and asn. With city the only network key is iptype.

Examples, for the account 0123456789abcdef0123456789abcdef:

  • 0123456789abcdef0123456789abcdef-peer-de picks any device in Germany for each request.
  • 0123456789abcdef0123456789abcdef-peer-us-state-ca-sid-job_1-rot-sticky keeps session job_1 on one device in California.
  • 0123456789abcdef0123456789abcdef-any-any-pin-device-my-phone uses your own device named my-phone.

Read the carriers, states and cities that exist with GET /app/api/proxy/stock?country=<code>. A value with no device online is on request: the demand is recorded and the username works once supply arrives.

The same text as Markdown: /guides/agents.md, /guides/usernames.md, and the index at /llms.txt.