Skip to content

Authentication

Every API call sends an API key as a Bearer token to https://www.brainpercent.app/api/v1. You create keys in the app. The same key works for the REST API and for the MCP server.

01Get a key

Sign in and open Developer settings (API Keys in the menu). Name the key, pick its permissions, and copy it. The full key is shown once. Brainpercent stores only a SHA-256 hash, so a lost key cannot be shown again: revoke it and make a new one.

FactValue
Formatbp_ followed by 64 hex characters
Active keys per account10
Default permissionread. Tick write in the dialog to generate or publish.
Default scopesarticles, social, projects, user. The dialog does not narrow them.
ExpiryNone from the dialog. The create route accepts expires_in_days (1 to 365).

02Send it

Put the key in the Authorization header on every request.

Your serverBrainpercent
  1. Your server to Brainpercent: Authorization: Bearer bp_…The key you copied, sent to the www host.
  2. Brainpercent to Your server: 200 with success: trueThe key is good. The answer is in data.
  3. Your server to Brainpercent: The same request with no header, or a key that is wrong, revoked or expired
  4. Brainpercent to Your server: 401 UNAUTHORIZEDsuccess is false. The reason is in error.message.
export BP_KEY="bp_your_key"

curl https://www.brainpercent.app/api/v1/user/credits \
  -H "Authorization: Bearer $BP_KEY"
401No header, or a key that is wrong, revoked or expired
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or revoked API key"
  },
  "meta": {
    "request_id": "req_f1502f0744604d9c",
    "timestamp": "2026-10-29T15:46:34.145Z"
  }
}

03Permissions

A key with only read can call every GET. Calls that start work or publish need write and return 403 FORBIDDEN without it. Nothing is charged on a 403.

PermissionNeeded for
readEvery GET: projects, articles, social content, credits, usage, Actors, approvals
writePOST /articles/generate, /social/generate, /social/publish, /actors, /actors/{id}/regenerate. Every paid MCP tool and the MCP publish tool.
deleteAccepted when you create a key, but no Bearer route checks it

04Scopes

Keys carry scopes (articles, social, projects, user). Today only projects is enforced: the Actor routes and POST /projects/preflight return 403 without it. The other three are stored but not checked. Keys made in the app have all four, so this only matters for a key created with a narrower list through the create route.

05Managing keys over HTTP

/api/v1/api-keys uses the signed-in browser session, not a Bearer key. A key cannot create or revoke keys. See API keys.

If the account owner has not accepted the current Terms and Privacy Policy, every call returns 403 with code CONSENT_REQUIRED. Sign in to the app once, accept them, then retry.

07Rate limits

Counted per key over a rolling minute and a rolling 24 hours. Details in Rate limits.

PlanPer minutePer day
Free1005,000
Starter, Plus, Pro, Business100050,000
Enterprise10000Unlimited

08Call from a server, not a browser

Responses carry Access-Control-Allow-Origin: *, but a browser on another site cannot complete the CORS preflight for a request with an Authorization header: the preflight answer has no CORS headers. That is the safe outcome anyway, because a key in front-end code is a key anyone can copy. Call the API from your server, a serverless function, an automation tool, or from Claude over MCP.