Skip to content

Authentication

All API requests must include an API key in the Authorization header as a Bearer token.

Authorization: Bearer bp_sk_live_YOUR_KEY

API keys are created in the Bindery Press dashboard under Settings > API Keys. Each key belongs to a team and has a mode.

PrefixModeDescription
bp_sk_live_LiveProduction renders. Counts against your monthly quota.
bp_sk_test_TestTest renders. Watermarked output. Does not count against quota.

You can create multiple keys per team. Each key has a name for identification. Keys can be revoked at any time from the dashboard — revocation is immediate and the key will stop working on the next request.

When a request arrives with an API key:

  1. The key is hashed (SHA-256) and looked up in the key store.
  2. The key’s team, mode, and metadata are resolved.
  3. Rate limits and quotas are checked against the team’s plan.
  4. The request proceeds to the endpoint handler.

If the key is invalid or missing, the API returns 401 AUTH_REQUIRED.

Every response from rate-limited endpoints includes these headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window.
X-RateLimit-RemainingRequests remaining in the current window.
X-RateLimit-ResetUnix timestamp when the window resets.

When the rate limit is exceeded, the API returns 429 RATE_LIMITED with a Retry-After header.

The Bindery Press dashboard uses session-based authentication via BetterAuth. Session tokens are used internally for dashboard operations (template editing, thumbnail generation, etc.) and are not intended for external API usage.