Using an API key

Every call to the public Face API needs an X-Api-Key header carrying the full key string. There are no other credential surfaces today.

The header

X-Api-Key: bfq_live_…

Send the full string the dashboard showed you at mint time. Don't truncate.

What the key controls

A valid key identifies the caller's account and the project the call belongs to. The project binding determines:

  • Which gallery identify and verify search.
  • Which budget the call draws from.
  • Which rate-limit bucket the call counts against.
  • Where the call shows up in Analytics and Money Audit.

In Isolated mode the gallery is scoped to that project only; in Shared mode all Shared projects in the same account share a gallery.

A canonical call

bash
curl -X POST https://api.biofrq.com/v1/face/execute \
  -H "X-Api-Key: bfq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "action": "biofrq.detect",
    "params": {
      "images": [
        { "kind": "image", "bytes": "<base64>", "contentType": "image/jpeg" }
      ]
    }
  }'

See Envelope for the full request shape that every action follows.

What the dashboard sees

Every billable call produces a RequestLog row pinned to your key. You can drill into it from the Money Audit tab — by key, by project, by action, by error code, by date range.

Auth failure modes

CodeWhenWhat to do
UNAUTHORIZEDHeader missing or string unknownVerify you're sending the full key string, not a truncated copy.
UNAUTHORIZED (revoked)Key was revoked in the dashboardMint a new one or rotate the existing one.
UNAUTHORIZED (expired)Key past its expiresAtUtcMint a new one.
FORBIDDENKey valid but lacks permission for this action / projectCheck the project binding; this is rare in v0.
PAYMENT_REQUIREDProject budget exhaustedAllocate more from the wallet.
RATE_LIMITEDProject burst or sustained RPS exceededBack off with jitter; consider raising the limit in the dashboard.

UNAUTHORIZED and FORBIDDEN never bill. PAYMENT_REQUIRED and RATE_LIMITED never bill either — the gate runs before the model.

What's next