Quick start
- Make an account at cloud.ownbia.com/signup — accounts are made by people, who accept the terms.
- On the account page, under API keys, create a key and copy it. It is shown once.
- Give it to your script or agent, and call the API:
export BIA_CLOUD_KEY=bck_…
curl -s https://cloud-api.ownbia.com/v1/billing/balance \
-H "Authorization: Bearer $BIA_CLOUD_KEY"
Base URL: https://cloud-api.ownbia.com. Every path starts with /v1.
Authentication
Send the key in every request: Authorization: Bearer bck_…. No cookies and no CSRF token are needed with a key. A missing, unknown or revoked key gets 401.
- A key can do what the account can — including opening checkouts and enlarging computers — so keep it as secret as a password.
- A key cannot create or revoke keys, or change the account’s email or password: those need a person signed in on the website.
- We keep only a fingerprint of the key. Lost it? Revoke it on the account page and make a new one. Up to 10 keys per account.
- Plans, quotes and the health check need no key at all.
Money, errors, limits
- Euros, excluding VAT, as decimal strings:
"12.50". Stripe adds VAT for the payer’s country at checkout. Amounts you send (amountEur) are whole euros. - Brain limits are in US dollars at the AI provider’s prices (
brainLimitUsd, brainLeftUsd). Brain usage from the balance costs the provider’s price + 10%. - Times are ISO 8601 in UTC.
- Errors are JSON:
{"detail": "…"}, or per field {"amountEur": ["At least 10 EUR."]}. The messages are written for people — pass them on as they are. - Rate limits answer
429: sign-in 10 a minute, signups, password resets and confirmation emails 5 an hour, new keys 20 an hour.
Plans
The computers on offer, smallest first.
- An account’s first bia always starts on the plan with "starter": true; it can be enlarged later.
Response{ "plans": [ {
"code": "small",
"name": "2 vCores · 4 GB",
"vcores": 2, "memoryGb": 4, "diskGb": 40,
"priceEur": "7.99",
"starter": true
} ], "vat": "excluded" }
Account
The account the key belongs to.
Response{
"email": "[email protected]",
"name": "Lena",
"termsAcceptedAt": "2026-11-09T10:12:00Z",
"emailVerified": true,
"card": { "brand": "visa", "last4": "4242", "expMonth": 12, "expYear": 2030 }
}
POST/v1/auth/verify-email/resendAPI keySend the email confirmation link again. 204 when sent; 400 if the email is already confirmed.
GET/v1/billing/cardAPI keyThe card saved at checkout, if any: brand and last four digits only, or null.
DELETE/v1/billing/cardAPI keyForget the saved card. 204.
Balance and bias
GET/v1/billing/balanceAPI keyThe balance, what it pays each month, the bias, and the last 50 movements (newest first).
- status: ordered (its computer is being set up), active, paused (the balance ran out — nothing is deleted), closed.
- moneyBack is null once the guarantee has ended or expired.
- hold is set when the account is stopped after a refund or chargeback: bias paused, checkout and enlarge refused (403, code "hold").
- setupStep while the computer is made: waiting_key (own key needed, see below), queued, ordering, installing, starting, then ready; failed with setupError. keyWaiting: root’s key is ready to collect on the website.
- Per bia: brainShare (weight), brainPct, brainLeftUsd (its key can still spend), brainSpentEur. Account: brainSpentEur, brainSyncedAt — usage is booked every hour and on every balance change.
- card is the saved card or null; portal is true once Stripe’s page can be opened (POST /v1/billing/portal, website only).
- entries[].kind: topup, hosting (computer), brain, refund, adjustment. Charges are negative.
Response{
"balanceEur": "22.01",
"brainLimitUsd": "22.34",
"brainLeftUsd": "19.80",
"monthlyEur": "7.99",
"minTopUpEur": 10,
"moneyBack": { "amountEur": "7.99", "until": "2026-11-24T10:15:00Z" },
"bias": [{
"id": 3, "plan": { "code": "small", … }, "brain": "balance",
"status": "active", "createdAt": "2026-11-09T10:15:00Z",
"paidUntil": "2026-12-09T10:15:00Z", "canEnlarge": true
}],
"entries": [
{ "at": "2026-11-09T10:15:00Z", "kind": "hosting", "amountEur": "-5.53", "note": "Start, first two weeks" },
{ "at": "2026-11-09T10:15:00Z", "kind": "topup", "amountEur": "30.00", "note": "Stripe checkout" }
]
}
GET/v1/billing/bias/{id}/enlargeAPI keyThe larger computers this bia can move to, and what each costs now.
- chargeEur is the price difference for the rest of the month already paid, taken from the balance.
Response{
"current": { "code": "small", … },
"paidUntil": "2026-12-09T10:15:00Z",
"balanceEur": "22.01",
"endsMoneyBack": true,
"options": [{ "plan": { "code": "medium", "priceEur": "13.99", … }, "chargeEur": "6.00" }]
}
POST/v1/billing/bias/{id}/enlargeAPI keyAsk for a larger computer. 202: its server is resized first — at once, or as soon as our provider has room. The plan changes and the difference for the rest of these two weeks is charged only once that worked; resizing in the balance payload shows progress. DELETE cancels while it still waits.
- A computer only grows: memory, disk and processors never go down.
- The new monthly price applies from the next month.
- 400 with "code": "balance" when the balance is short — top up first.
Request{ "plan": "medium" }
Response{ "id": 3, "plan": { "code": "medium", … } }
POST/v1/billing/brainsAPI keyShare the balance between the account’s brains. Every bia has its own OpenRouter key; its limit is what it already used plus its weight ÷ all weights of the balance. Weights 0–100; the limits change at once. Answers like GET /v1/billing/balance.
Request{ "shares": { "3": 70, "7": 30 } }
POST/v1/billing/biasAPI keyAnother bia, its first two weeks paid from the balance — no card payment. 400 with "code": "balance" when the balance is short.
Request{ "plan": "start", "name": "Milo", "lang": "en" }
POST/v1/bias/{id}/brain-keyAPI keyGive an own-key bia its AI key (setupStep "waiting_key"). Its computer is made right after; the key goes into the bia and is not kept here.
- If the key does not work, setupStep goes back to "waiting_key" with setupError set.
Request{ "apiKey": "sk-or-v1-…" }
Response{ "setupStep": "queued" }
POST/v1/bias/{id}/keywebsite onlyRoot’s key for a bia that is awake (keyWaiting true): a .biaconfig (base64) under a new password given only in this answer, and open, the bia’s page with that file in the link’s fragment. Website only.
Response{ "password": "qw54-amd7-p9yy-6b8t", "address": "203.0.113.10", "files": [{ "name": "bia-203.0.113.10.biaconfig", "type": "application/x-biaconfig", "data": "…" }, …] }
POST/v1/bias/{id}/key/savedwebsite onlyThe key is saved: our copy is deleted for good. Afterwards only the customer can open the bia. Website only.
POST/v1/bias/{id}/deleteAPI keyAsk to delete a bia. Nothing is deleted yet: a link goes to the account’s email, valid for an hour, and only opening it deletes. 202. GET first shows what comes back: the unused hours of its paid two weeks (creditEur) and the balance after (balanceAfterEur).
- A newer request makes older links stop working.
- Deleting wipes the bia’s computer; it cannot be undone.
Support desk
The one way to ask a person for help or a refund. Messages are multipart forms; files are PDF or JPEG only (5 per message, 10 MB each).
GET/v1/support/ticketsAPI keyThe account’s requests, newest activity first. status: open (waiting for us), answered, closed.
POST/v1/support/ticketsAPI keyOpen a request (multipart/form-data: subject, body, optional biaId, files). 201 with the request and its first message. We email when a person answers.
GET/v1/support/tickets/{id}API keyOne request with all its messages and their attachments (id, name, type, size).
POST/v1/support/tickets/{id}/messagesAPI keyReply (multipart: body, files). Replying to a closed request opens it again.
POST/v1/support/tickets/{id}/closeAPI keyClose a solved request.
GET/v1/support/attachments/{id}API keyDownload an attachment of one of the account’s requests.
Payments
Prepaid: money goes on the balance, and the balance pays for the computers and, if chosen, the brains.
POST/v1/billing/quotekey optionalWhat a payment buys, without paying.
- With plan: a new bia (optional name, lang). Its first two weeks come out of amountEur, the rest goes on the balance. Computers are priced per month (priceEur) and billed every two weeks (periodEur) from the balance.
- Without plan: a top-up (the account needs a bia already).
- An account’s first bia is a fixed order: the starter plan’s first two weeks + €10 on the balance. amountEur is not needed and is ignored.
- Otherwise amountEur: whole euros, 10–1000, and at least the plan’s price.
- brain: "balance" (paid from the balance) or "own" (its own AI key or subscription).
- voucher: a code that pays part of the order; the card pays the rest (at least €1) and the balance gets both. A voucher that covers it all leaves amountEur 0: the checkout then only checks the card, without a charge. amountEur in the reply is what the card pays, voucherEur what the voucher adds.
Request{ "plan": "small", "amountEur": 30, "brain": "balance" }
Response{
"amountEur": "30.00",
"hostingEur": "7.99",
"brainEur": "22.01",
"markupPct": 10,
"eurUsd": "1.1165",
"brainLimitUsd": "22.34",
"vat": "added at checkout for the customer's country"
}
POST/v1/billing/checkoutAPI keyOpen a Stripe Checkout for a person to pay. Same body as the quote.
- A person opens the url and pays by card; VAT is added there.
- When paid, the money is on the balance within a minute, and a new bia is ordered.
Request{ "plan": "small", "amountEur": 30, "brain": "balance" }
Response{ "url": "https://checkout.stripe.com/c/pay/cs_…" }
POST/v1/billing/voucherAPI keyPut a voucher's amount on the balance now, without a card payment. Replies with the balance.
- Each account uses a voucher once, and needs a bia already (a first bia takes the voucher in its checkout). The activity shows it as kind voucher.
Request{ "code": "BIA-K7QM-3XRP" }
The website’s own
Used by the website with a session cookie and an X-CSRFToken header (from GET /v1/auth/csrf). Not available with an API key where marked.
GET/v1/auth/keyswebsite onlyList API keys: id, name, start, createdAt, lastUsedAt.
POST/v1/auth/keyswebsite onlyCreate an API key. The answer carries the key, once.
Request{ "name": "my agent" }
Response{ "id": 7, "name": "my agent", "start": "bck_3fA9xK2Q", "key": "bck_3fA9xK2Q…", … }
DELETE/v1/auth/keys/{id}website onlyRevoke a key. It stops working at once.
POST/v1/billing/portalwebsite onlyA link to Stripe’s page for the account: replace or remove the card, download invoices. 404 before the first payment.
Response{ "url": "https://billing.stripe.com/p/session/…" }
POST/v1/auth/signupno keyCreate an account and sign in; a confirmation link is emailed.
Request{ "email": "…", "password": "…", "name": "…", "accept_terms": true }
Sign in.
Request{ "email": "…", "password": "…" }
POST/v1/auth/logoutno keySign out.
POST/v1/auth/emailwebsite onlyChange the account’s email (needs the password). The new address gets a confirmation link, the old one a notice.
Request{ "email": "…", "password": "…" }
POST/v1/auth/verify-emailno keyConfirm an email with the token from the link.
POST/v1/auth/password/resetno keyEmail a reset link. Always 204, whether or not the account exists.
POST/v1/auth/password/reset/confirmno keySet a new password with uid and token from the link. Ends every signed-in session.
Request{ "uid": "…", "token": "…", "password": "…" }
An agent starts a bia
An agent cannot pay by itself: it prepares the order and hands a checkout link to its person.
GET /v1/plans — the first bia of an account starts on the plan marked starter.POST /v1/billing/quote with {"plan": "…"} — shows the person what it costs. The first bia’s payment is fixed: its first two weeks plus €10 on the balance.POST /v1/billing/checkout with the same body — send the url to the person.- Poll
GET /v1/billing/balance every minute or so: after the payment the new bia appears with status ordered, then active when its computer is up. - Later, when it needs more room:
GET then POST /v1/billing/bias/{id}/enlarge.
curl -s https://cloud-api.ownbia.com/v1/billing/checkout \
-H "Authorization: Bearer $BIA_CLOUD_KEY" \
-H "Content-Type: application/json" \
-d '{"plan": "small", "brain": "balance"}'
# → {"url": "https://checkout.stripe.com/c/pay/cs_…"}
Paying, topping up and enlarging are changes to the account: they end the first computer’s 14-day money-back guarantee (moneyBack in the balance). A careful agent asks its person first. See the refund policy.
For machines
The endpoints under “The website’s own” are what the website uses with a session cookie and a CSRF token. They are listed so nothing is hidden, but scripts should use a key.