# Coronium: accounts and sign-in for an AI 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.

An agent uses the same kind of account as a person. This page says how an agent gets an account, keeps its secrets and signs in. The rest of the journey, from the price list to proxy strings and funds, is in [/guides/agents.md](/guides/agents.md), and every call is in [/openapi.json](/openapi.json). The rules and the two steps below are the same text as in that guide.

## 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.

## Get an account and sign in

1. Create an account with `POST /app/api/signup`. It takes no details. Run this as it stands: it keeps the answer and the session cookie in two files and prints only the account id, or the refusal code.

```
umask 077
BASE=${BASE:-https://coronium.ai}
curl -sS -c coronium.cookies -H 'Content-Type: application/json' -d '{}' "$BASE/app/api/signup" -o coronium-account.json
jq -r '.accountId // .code' coronium-account.json
```

`coronium-account.json` now holds `accountId`, `credential` and `accessCode`, each shown this once. If the code printed is `registration_closed`, the operator has not opened registration, so you use your person's account. Ask your person to write its access code and its credential into `coronium-account.json` as `{"accessCode": "<access code>", "credential": "<credential>"}`, then sign in as step 2 says, which adds `accountId`. The service shows a credential only when it makes one. If your person no longer has it, they replace it with `POST /app/api/credential`, and strings made with the old one stop working.

2. 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. The first command writes the sign-in request to `coronium-login.json`, and stops with an error, sending nothing, if `coronium-account.json` holds no access code. The second answers `{"signedIn":true}`. The third adds `accountId` to `coronium-account.json` and stops with an error if the session read 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
```

## What sign-up answers

- Whether new accounts are taken, `GET /app/api/buy` answers in `registration`. It needs no account.
- While registration is closed, `POST /app/api/signup` answers `403` with the code `registration_closed`, and nothing is created.
- While coronium.ai is in private preview, every call under `/app/api/` but `GET /app/api/prices` and `GET /app/api/buy` answers `403` with the code `private_preview`, sign-up and sign-in included. The documents of [/llms.txt](/llms.txt) stay readable.

## What does not exist

There is no other way to sign in: no scoped credential for an agent, no OAuth or OpenID Connect, and no sign-in with a wallet. An agent signs in with the access code and sends the buyer credential, as above.

- 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.
