API keys
Create, cap, rotate and revoke the keys your programs use to call the grid.
Creating a key
On the panel (/run/app), under API keys, give the key a label and, if you like, an expiry date and a daily cap. The panel shows the whole key once, right after you create it. We store only a hash of it and its first 12 characters, so a lost key cannot be shown again: create a new one.
A key looks like bgk_ followed by 43 letters and digits, an underscore and a 6-character checksum. The checksum lets secret scanners and the grid tell a real key from a mistyped one.
Using a key
Send it in the x-api-key header of every call:
curl -s https://grid-lab.zyxio.xyz/grid -H "x-api-key: $BROWSERGRID_API_KEY"
A revoked or expired key, a mistyped one, or any key of a suspended account, gets 401 unauthorized. If the account database does not answer in time, a call with a key gets 503 and {"error": "accounting_unavailable"} instead: nothing was done, and the call is safe to resend.
One identity for all your keys
Every key of your account acts as the same identity. A batch, job or session created with one key is visible to every other key of the account, so you can rotate keys without losing access to what the old key made.
Your Zyxio sign-in, used by the panel and by MCP clients that sign in, is a separate identity. Resources created with a key are not visible to it, and the other way round. Both are billed to the same account.
Daily cap
A key can carry a daily cap in euros. It counts what the key committed since 00:00 UTC: its charges plus its open reservations. A call whose reservation would take the key past its cap is refused with 402 and daily_cap_exceeded, even when the account has credit left. The cap resets at midnight UTC. Change or remove it on the panel at any time.
Rotating and revoking
To rotate, create the new key, move your programs to it, then revoke the old one. Revoking takes effect on the next call. The panel shows when each key was last used, which tells you whether anything still depends on it.
Keeping keys safe
- Keep keys in a secret store or environment variable, never in source code or a shared MCP configuration file.
- Use one key per program or machine, so you can revoke one without stopping the others.
- Give a key that runs unattended a daily cap.
See Credit and billing.