Access and policy
Sign in from the CLI or MCP, create API keys, and control compute with a policy.
Access briq through the CLI, MCP, or an API key. Each credential has a policy, checked before a machine is created or started.
| Connected client | API key | |
|---|---|---|
| For | A client on a machine with a browser: Claude Code, Cursor, VS Code, Codex, Claude…, the CLI | CI, containers, scripts, the REST API |
| How | Run briq login, or add the MCP URL; approve the browser sign-in | Create it on the API keys page, send Authorization: Bearer bq_live_… |
| Secret | Tokens the client keeps and refreshes; never shown to the model | The key, shown once |
| Policy | Set on the approval page | Set at creation |
Edit or revoke API keys on API keys, and browser sign-ins on Agents & CLI. Revoking takes effect immediately. A connected client lasts while its approver stays in the team.
Each credential shows the client that last used it (Claude Code 2.1.278, Cursor, curl 8.7.1), and the audit log records it on every row.
The policy
| Field | Default | Effect |
|---|---|---|
maxConcurrentBriqs | unset: the plan's | Live briqs the agent may have at once. Unset, the team's plan sets it (the Plans table lists the number) and follows the plan when it changes: after an upgrade the same key runs more. A number you set stays, still inside the plan's team limit |
dailySpendCapCents | 1000 | Daily spend. Checked before create; the agent's briqs stop when it is crossed, and sleep again from the next UTC day |
allowedSizes | every size the team can run | A new key gets each size the team's plan runs (a card on file opens more) and the host serves. The plan must allow what you list too |
allowedRegistries | docker.io, ghcr.io, quay.io | Image hosts allowed (docker.io covers unqualified images) |
maxSleep | "never" | The longest sleep the agent may give a briq, as a string ("1d"). "never" sets no bound of its own: the environment's longest window and the plan (always on is Pro and above) still apply |
expiresAt | none | The agent is rejected after this time |
A regular key is the team's: it sees and acts on everything in the team, every briq, stack, endpoint,
the audit log, the list of keys and agents, under the budget its policy sets. The policy bounds
what the key spends, not what it reaches. The one
thing a key never does is manage credentials: only a person signed in to the dashboard creates,
edits or revokes keys and connected clients, and an API key calling those routes gets
403 forbidden. So an agent cannot raise its own budget, mint itself a wider key, or cut off the
team's other agents. A policy is also bounded by the plan of the person setting it
(402 policy_violation past it), and it applies to a start as to a create: a key capped at one
briq cannot keep restarting others. Keys outlive the person who created them: removing a member
keeps the team's keys and lists the ones they created, for the team to rotate if it wants to. See
Budgets.
The team's plan sets its compute concurrency. API keys and connected clients share that capacity; their count does not determine the plan. Sleeping and stopped briqs do not use concurrency. Starting and stopping briqs hold their slot.
One sandbox
Where sandbox credentials are enabled, a signed-in person can mint one through the REST API:
POST /v1/keys
Content-Type: application/json
{"name":"customer","sandboxId":"bq_example"}Use the dashboard's authenticated session, including its origin protection, for this request.
The dashboard has no sandbox credential picker. The returned bq_sbox_… bearer is shown once.
Keep it in a secret store. Mint and rotation responses are not cached.
The owner checks availability through features.sandboxScopedCredentials in GET /v1/quota, using a session or team key.
Send it as Authorization: Bearer …. Its immutable sandbox ID permits these operations only:
| Operation | Route |
|---|---|
| Safe status | GET /v1/briqs/{id}/status |
| Commands, synchronous or asynchronous | POST /v1/briqs/{id}/exec |
| Command results or cancellation | GET or DELETE /v1/briqs/{id}/execs/{execId} |
| JSON files | GET or POST /v1/briqs/{id}/files |
| Raw files | PUT /v1/briqs/{id}/files, GET /v1/briqs/{id}/files/raw |
Execution and file calls can wake that sandbox, starting billable runtime. They never wake its stack. An explicit owner stop or a process exit stays stopped. Normal credit, policy and plan admission checks still apply. Status, result polling and cancellation do not wake it.
Runtime billing stays with the sandbox's original owner credential. The delegated key's daily budget is not a separate runtime meter.
Safe status omits configuration, endpoints and their independent access tokens.
Use SDK sandboxStatus(id) or Python sandbox_status(id) for that projection.
MCP, WebSockets, native sandbox adapters, logs, discovery, lifecycle and credential management are not supported.
Commands with stdinOpen are refused. No regional execution grant is issued.
| Surface | Sandbox credential support |
|---|---|
| REST | The target-only routes above. The owner mints, rotates and revokes through a person session |
TypeScript Briq | sandboxStatus, exec/result/cancel and file methods, using the exact ID. Not status or nativeSandbox |
| CLI | Set BRIQ_API_KEY for exec, exec --async, exec-result, exec-stop, files-put and files-get, using the exact ID. login --key, whoami, quota and status need a team credential. Use REST for safe status |
Python Briq and AsyncBriq | sandbox_status(id) only. sandbox(id) needs full status and a team credential. Use REST for delegated commands and files |
| MCP, WebSockets and native adapters | No supported delegation. Hosted MCP rejects the bearer |
Ask the owner for the sandbox ID and file-transfer limits. The scoped bearer cannot read quota or private limit details.
The general error tables below describe team credentials. Scoped policy, plan, credit and availability refusals use
fixed 409 invalid_state messages with no details. Invalid credentials, denied operations, missing resources and
invalid input retain their respective operation error codes, with fixed messages and no details.
Transport-level body rejections can retain their own messages and request-size ceilings.
Rotation replaces the bearer without changing its target. Revocation and expiry block subsequent requests. Already admitted calls, streaming files and asynchronous commands can finish; revocation does not undo guest changes. Execution grants access to the guest's files, processes, runtime secrets and reachable network. The scoped bearer does not add guest or network isolation.
Errors
| Code | HTTP | When |
|---|---|---|
policy_violation | 402 | Size, registry or sleep not allowed. The message says the longest sleep to send |
quota_exceeded | 402 | Concurrency limit or daily cap reached |
payment_required | 402 | The team is out of credits |
plan_limit | 403 | The team's plan does not allow it: a size, more disk, an always-on briq, a KVM sandbox, more concurrent compute or memory, another member |
Over MCP the same message comes back as a tool error. briq_quota (or GET /v1/quota) reports
what is left under both the credential policy and the team plan.