x-brimble-key header:
BRIMBLE_SANDBOX_KEY environment variable, or you can pass it explicitly to the client constructor. See SDKs → Authenticate.
Prerequisites
- A paid plan. API keys are not available on the Free tier.
- The key is scoped to a single subscription, so:
- On a personal account, the key belongs to your personal subscription.
- On a team workspace, the key belongs to that team’s subscription. Create it from inside the team workspace; copy the team’s ID from the team’s settings page if you need it for SDK calls that ask for
teamId.
Create an API key
- Open the dashboard.
- Click your avatar → API key (or open your team’s settings → API key for a team-scoped key).
- Click Generate API key.
- Copy the key immediately, this is the only time the plaintext key is shown. After you close the modal, you can rotate but you can’t view the previous one.
- Store it somewhere safe: your password manager, your CI/CD secret store, a
.envfile outside source control.
Use the key
With an SDK
With raw HTTP
Pass the key in thex-brimble-key header on every request:
x-brimble-key, not Authorization: Bearer .... Bearer-style auth is rejected.
To gate an MCP server you deploy on Brimble
If you deploy an MCP server on Brimble and turn on MCP authentication in Settings → Configuration, every request to that server has to carry your API key in thex-brimble-key header. Brimble validates the header at the edge and rejects unauthenticated calls with 401 before they reach your container, you don’t write any auth code yourself.
The same key gates every MCP server in your account; there’s no per-project key. Configure your MCP client (Claude Desktop, Cursor, etc.) to send the header:
Reset an API key
If a key is exposed, lost, or you just want to rotate on a schedule, generate a fresh one:- Open the dashboard.
- Go to the API key page (personal or team).
- Click Reset API key.
- Copy the new key right away.
401 Unauthorized. Update your secret stores, redeploy services that read the env var, and refresh any local .env files before resetting.
Rate limits
Each API key has a daily request quota that depends on your plan. The window is a rolling 24 hours, not a calendar day, the quota refills as old requests age out. When you exceed the quota, the server returns:RateLimitError (AuthError subclass tree, see SDKs → Error handling). The error carries a retryAfterSeconds (TS), retry_after_seconds (Python), or RetryAfterSeconds (Go) field telling you how long to wait before retrying. The Sandbox SDKs honour Retry-After automatically when their built-in retry policy is on; see Retries and idempotency.
A handful of practical guidelines:
- Cache reads where you can. Listing templates, regions, or sandboxes hasn’t usually changed between consecutive calls. Holding the response for a few seconds drops your request count materially.
- Batch file uploads with
putFilesinstead of loopingputFileper file, one HTTP call for up to 100 files. See SDKs → Batch file uploads. - Backoff on 429. If you write your own client, treat a 429 as terminal-for-now: stop, wait the time the server indicates, then resume.
- Hammering retries doesn’t unblock the quota. Each retry is another counted request. If you’re stuck at 429, slow your callers down, the limit only clears as the rolling window slides forward.
Looking for the exact number? Your current quota is shown on the API key page in the dashboard. The number depends on the plan attached to the subscription that owns the key.
Troubleshooting
401 Unauthorized (“Invalid API key”). Either the header is missing or the key is wrong. Check:
- The header name is exactly
x-brimble-key(lowercase, hyphens, not underscores). - The value is the full key including the
bk_prefix. - The key hasn’t been reset since you copied it.
- You’re hitting the right base URL (
https://sandbox.brimble.iofor the Sandbox API).
401 Unauthorized (“API key is required”). No x-brimble-key header was sent. Most likely the env var isn’t set in the process making the call. Print process.env.BRIMBLE_SANDBOX_KEY (or your language’s equivalent) to confirm.
429 Too Many Requests. You’ve exhausted the daily quota. See Rate limits above. Respect the retry-after window before issuing more calls.
“You don’t have an API key, you can create one if you want to.” You’re calling the dashboard’s get-key endpoint but you’ve never generated one. Click Generate API key on the dashboard’s API key page.
“You already have an API key, you can reset it if you want to create a new one.” A key already exists for this subscription. Click Reset API key to rotate, the old one will be invalidated.
Key works locally but fails in CI. The CI runner doesn’t have BRIMBLE_SANDBOX_KEY set. Add it to your CI secret store and reference it in the job config.
Next steps
- SDKs, authenticate, configure retries, handle
RateLimitError. - Sandbox API, the raw REST contract that the key authenticates.
- Deploy an MCP server, gate your MCP project behind the same key.
- Two-factor authentication, protect the account that owns the key.