services
16

Account API keys

run the account by API, for scripts and agents

An account API key runs your account from a script or AI agent: service keys, their policies, webhooks and usage.

account-api/two keys
service keyaccount API key
starts withc_serv_c_acct_
made inthe Keys panel, or POST /v1/keysthe Account page or user menu
opensRPC, DAS, WebSocket, the carbon stream and quotes on services.carbium.shthe account API on carbium.sh
refused bythe account APIevery plane of services.carbium.sh
its valuereadable again in the Keys panelshown once
costscredits per call, by methodnothing

create one

account-api/create
stepwhat
1 openACCOUNT, Create API key on the Account API keys card or the user menu
2 name1 to 48 characters
3 accessFull control, or Read only for monitoring
4 expires90 days unless you pick 30 days, 1 year or never; expired keys answer 401
5 addressesoptional: up to 16 IPv4 or IPv6 addresses or CIDRs; others get 403
6 copyshown once; the list shows only its prefix
by APIPOST /v1/account/api-keys with a dashboard session and {name, access: "full" or "read", expires_in_days: 30, 90, 365 or null, ip_allow}; an agent signed in with its wallet uses its session

send it

$Send Authorization: Bearer <c_acct_ key> to https://carbium.sh; a JSON body needs Content-Type: application/json. Answers carry x-api-key-expires: the RFC 3339 expiry or never (none on a 401).
carbium://account-api · quickstart.sh
# 1 who am I: the key's own record (name, access, scopes, expiry)curl -s https://carbium.sh/v1/api-key -H 'Authorization: Bearer <c_acct_ key>'# -> {"api_key_id":12,"name":"ci-agent","access":"full","scopes":["keys:read","keys:write",...],"expires_at":"2027-02-16T15:10:00Z",...}# 2 make a service key for one app, RPC and WebSocket only, then lock it to the app's address#   (FREE holds one service key: there this answers 409 until the starter key is revoked)curl -s https://carbium.sh/v1/keys -H 'Authorization: Bearer <c_acct_ key>' \  -H 'Content-Type: application/json' -d '{"name":"indexer","scope":["rpc","ws"]}'# -> {"key_id":13,"prefix":"c_serv_AbCd","raw_key":"c_serv_...","name":"indexer"}   the value is shown once: store itcurl -s -X PATCH https://carbium.sh/v1/keys/13/allowlist -H 'Authorization: Bearer <c_acct_ key>' \  -H 'Content-Type: application/json' -d '{"ip_allow":["203.0.113.7"]}'# 3 watch it: this month's calls and credits per key, then the last day by hourcurl -s https://carbium.sh/v1/keys/usage -H 'Authorization: Bearer <c_acct_ key>'curl -s 'https://carbium.sh/v1/usage/hourly?key_id=13' -H 'Authorization: Bearer <c_acct_ key>'# 4 retire it: every door refuses the key at oncecurl -s -X POST https://carbium.sh/v1/keys/13/revoke -H 'Authorization: Bearer <c_acct_ key>'

full control and read only

account-api/access
full controlread only
service keyscreate, rename, rotate, revoke, deletelist
a key's policiesplanes, per-method caps, IP allowlist, connection and in-flight limitsread
webhookscreate, change, pause, resume, test, rotate the secret, delete; the delivery loglist, read, the delivery log
usage and telemetryreadread
the accountplan, status, credits, payments and modules: read; add a free module planread

never by key

account-api/never
a key cannotwhy
buy or upgrade a plan or a paid module
open the billing portal, cancel or resume a renewalchanges the card or restarts charges
remove a moduleends it at once, no refund
make, list or revoke account API keys
link a wallet, log out, delete the accountchanges who can sign in
read a service key's stored valuereturned only on create or rotate
fetch an invoice documentthe link opens for anyone holding it
»These, and calls not listed below, answer 401 to an account API key; they need a dashboard sign-in.

limits and refusals

$Up to 5 live account API keys per account, every plan; the plan's service key count applies. Deleting the account revokes every key.
account-api/refusals
httpmessagewhat to do
401authentication requiredkey unknown, revoked or expired, made on the other dashboard name, or call closed to account API keys
403this key is read onlyuse a Full control key
403this key may not be used from this addresscall from an allowed address
403account is not activeaccount suspended, banned or closed: see the dashboard, or contact support
409account API key limit reached (5)on create: revoke a key first
429600 calls per key per 10-minute window: retry after Retry-After seconds
429too many wrong keys from this address20 wrong keys from one address in 10 minutes block that address for the window, right key included
429too many key changesover 120 service-key changes per account in 10 minutes (webhooks answer "too many webhook changes" the same way): wait, then send it again

calls

account-api/calls
callrequestanswer
service keys · keys:read
GET /v1/keysnoneyour service keys, oldest first, revoked ones included: key_id, prefix, name, tier, scope, status, per_method_caps, max_connections, max_inflight, ip_allow, created_at, rotated_at, revoked_at (allow_domains and allow_ips are old lists the doors do not use). Never a key's value
service keys and their policies · keys:write
POST /v1/keys{name, scope}, both optional: name up to 48 characters, scope a list of rpc, ws, grpc, quote and das (rpc, ws, grpc and das when left out; quote needs the Quote module){key_id, prefix, raw_key, name}: the key's value, shown here once and mailed to the account's email address when it has one. 409 at your plan's count of service keys, or for quote without the module
POST /v1/keys/{id}/rotatenone{prefix, raw_key}: a new value for the same key, mailed like a new key's; the old one is refused at once
POST /v1/keys/{id}/revokenone{applied}: true the first time, false on a repeat; every door refuses the key at once, and the first revoke mails a notice
DELETE /v1/keys/{id}none{deleted}: the key is gone from the list, and a live one is refused at every door; a repeat is 404
POST /v1/keys/{id}/name{name}: up to 48 characters, "" clears it{name}
PATCH /v1/keys/{id}/scope{scope}: the whole new list of planes (rpc, ws, grpc, quote, das), at least one; a plane left out is removed{key_id, scope}; the doors follow within a second
PATCH /v1/keys/{id}/caps{per_method_caps}: the whole new list of {method_class, rps_ceiling (0 or left out: no ceiling), allow (true when left out)}; [] clears every cap. method_class is o1_cached, bounded_read, bounded_slot, write_send, compute, bounded_disk, range, scan, gpa or das (the 10 DAS methods together)the stored list; the doors follow at once
PATCH /v1/keys/{id}/allowlist{ip_allow}: the whole new list of IPv4 or IPv6 addresses and CIDRs, 16 at most; [] admits any address{key_id, ip_allow}; a call from any other address is 403 at the door
PATCH /v1/keys/{id}/limits{max_connections, max_inflight}: 0 to 10,000 each; 0 or left out is the plan's own number, and both are replaced together{max_connections, max_inflight}; the WebSocket and stream doors follow within 5 minutes
webhooks · webhooks:read
GET /v1/webhooksnoneyour webhooks, without their address lists
GET /v1/webhooks/{id}nonethe webhook with its addresses
GET /v1/webhooks/{id}/deliveriesnone; ?limit=, ?before=its delivery log, newest first
webhooks · webhooks:write (fields and answers: Webhooks)
POST /v1/webhooksthe create fields{webhook, secret}: the signing secret, shown here once
PATCH /v1/webhooks/{id}any create field, statusthe webhook
DELETE /v1/webhooks/{id}none{"deleted": true}
POST /v1/webhooks/{id}/rotatenone{secret, secret_hint, previous_valid_until}
POST /v1/webhooks/{id}/testnonehow one signed test event went
usage and telemetry · usage:read
GET /v1/usagenone; ?from= and ?to= as YYYY-MM-DD, given together, both days included (the last 7 days when left out; over 90 days is 400), ?key_id=, ?group=key[{utc_day, method, method_class, call_count, credits_charged}], oldest day first; with group=key each row also carries its key_id (null for calls made before a key was rotated, or by a key since deleted). A key_id that is not yours is 404, and an answer of more than 50,000 rows is 400: narrow the range or name a key. Answers are kept 15 s
GET /v1/keys/usagenone{period_start, period_end, account_credits, keys: [{key_id, credits, calls}]}: this calendar month (UTC) per service key, revoked ones included. Calls made before a key was rotated, or by a key since deleted, count in account_credits only; account_credits is null when the read failed
GET /v1/keys/loadnone[{key_id, rps_current, class_rps}]: calls a second over the last 20 s for each live key, in all and per method class
GET /v1/usage/hourlynone; ?from= and ?to= as RFC 3339 times, given together (the last 24 hours when left out; over 7 days is 400), ?key_id=[{hour, key_id, method_class, calls, credits_charged, errors, resp_bytes}], kept 90 days; the newest hour can be two hours behind. Answers are kept 60 s
GET /v1/usage/latencynone; the same ?from=, ?to= and ?key_id=[{hour, key_id, method_class, calls, p50_ms, p95_ms, p99_ms}]: milliseconds with up to 3 decimals, kept 90 days. Answers are kept 60 s
the account · account:read
GET /v1/accountnone{account_id, email, wallet, status, created_at, tier, term, payments}: the plan and its term, and the last 24 payments
GET /v1/balancenone{granted, used, remaining}, in credits
GET /v1/invoicesnone[{period_start, period_end, granted, used, current}]: credits per month, the running month first
GET /v1/paymentsnoneyour payments, newest first, 1,000 at most: id, amount_minor, currency, status, method, tier or module and plan, months, credits_granted, reference, paid_at
GET /v1/modulesnoneevery module with its plans and what the account holds of it
GET /v1/billing/crypto-intent/{id}noneone on-chain payment of yours and its status: open, paid, held or expired
modules · modules:write
POST /v1/modules/{module}{plan}, or {} for the cheapest: a plan with no price (a priced one is 400 "plan '<name>' must be purchased")the module as the account now holds it; 409 "module not available yet", 429 past the change limit
the key itself · any account API key
GET /v1/api-keynonethe calling key's own record
what a key did · a session, or the key for its own id
GET /v1/account/api-keys/{id}/activitynone; ?limit= (50, at most 200), ?before= (a Unix-ms time)[{ts, action, request_id, detail}]: what the key changed, newest first; another key's id is 404
making and revoking account API keys · dashboard session only
POST /v1/account/api-keys{name, access, expires_in_days, ip_allow}: name 1 to 48 characters and access "full" or "read", both required; expires_in_days 30, 90 or 365 (null or left out: no expiry); ip_allow up to 16 addresses or CIDRs (left out: any address)the new key's record with its raw_key, this once; 409 at 5 live keys, 403 while the account is not active
GET /v1/account/api-keysnonethe live keys' records, newest first
DELETE /v1/account/api-keys/{id}none{api_key_id, revoked}; a repeat answers the same
$Errors answer {"error": "<code>", "message": "<text>"}; a missing key, webhook or payment, or another account's, answers 404. Webhook details: webhooks. GET /v1/plans needs no key. Also at https://carbium.sh/openapi.json and the SKILL.md.

if a key leaks

!Revoke it on the Account page; its next call answers 401. Until then its holder can do what its access allows: with Full control, manage service keys, spend credits through them, and re-point or delete webhooks. It cannot sign in as you or read a signing secret or a webhook's Authorization header in use. An IP allowlist makes a leaked key useless from other addresses. Its changes are logged at GET /v1/account/api-keys/{id}/activity; mails about your service keys still reach your address.