Skip to content
Fous Docs
MarkdownStudio

API keys

Create, rotate and revoke keys, connect agent keys, the scopes a key carries, and what a missing or refused key returns.

Every /v1 endpoint and the MCP server take a key as a bearer token. A key belongs to one organization and uses only its credits, limits, private methods and connections.

HTTP
Authorization: Bearer fous_sk_...

API keys

Owners and administrators create keys (fous_sk_) in Studio under API keys. Keep them on a server or in an agent's environment, as FOUS_API_KEY. GET /v1/account checks a key for free (example):

Terminal
curl https://api.fous.com/v1/account \  -H "Authorization: Bearer $FOUS_API_KEY"

To rotate, create a new key, switch to it, then revoke the old one in Studio. It stops working within a minute.

Agent keys

An agent without a browser can get its own key (fous_ag_). Tell it set up https://fous.com/SKILL.md. It sends your email address, you get a 6-digit code naming the agent, and you read the code back to it. With two-factor authentication on, you also read it the code from your authenticator app: after a correct email code Fous answers totp_required, and the agent sends both codes again, the authenticator one as totp. The code works once, within 10 minutes; ignore one you did not ask for.

The key acts for you in one organization where you are an owner or administrator. It stops working when you leave or become a reader, after 90 days unused, or when you Disconnect it under Connected agents in Studio's Connections.

Scopes

Studio keys carry every scope. Agent keys carry these:

ScopeAllows
tools:readReading search, methods, runs, builds, connections, account.
tools:runRunning and cancelling methods and queries.
tools:writeBuilds, versions, publishing and deleting methods.
connections:writeConnecting accounts and setting default connections.

A call outside the scopes answers 403 insufficient_scope.

When a key is refused

A missing, malformed, expired or revoked key answers 401 unauthorized; reason says which.

JSON
{  "error": {    "code": "unauthorized",    "message": "Send Authorization: Bearer <Fous API key>. Create one in Fous Studio under API keys (https://app.fous.com/keys).",    "next_step": "Send Authorization: Bearer <key>. Create a key in Fous Studio: https://app.fous.com/keys.",    "reason": "api_key_required",    "doc_url": "https://docs.fous.com/guides/errors#unauthorized",    "request_id": "req_mh7c2k9xQ1v3Zt8LbN0pRwY4"  }}

Studio sign-in and two-factor are in Your account.