Citera home
Browse documentation

Authentication and access

Authentication and access

Enroll in the beta, create keys, and authenticate every request.

Summarize with AIChatGPTClaudePerplexity

Availability

Scale and Enterprise only. Your account must be enrolled in the invite-only beta, your chosen surface must be enabled, and write scopes must be approved for your cohort. Free, Trial, Starter and Growth accounts cannot create or use keys. Quota overrides cannot grant plan access.

Requests also require an active, unexpired key, all required scopes, an owned brand bound to the key, and an eligible account and brand. Feature availability and entitlement are checked again for operations. Recovery actions have specific exceptions documented in their reference pages.

API keys

Property

Value

Format

rk_live_ + 43 chars base64url (32 random bytes). rk_test_ is also recognized

Display prefix

rk_live_ + first 8 secret chars, e.g. rk_live_ab12cd34 (safe to share with support)

Storage

Only a cryptographic verifier is stored; the raw key is never stored

Shown

Once, in the create/rotate response (token field)

Transport

Only Authorization: Bearer rk_live_…. Query string or cookie carriers are rejected

Binding

A set of surfaces (api, mcp), scopes, brands (at least 1), optional expiry

Create keys in the app (Settings → API keys) or via POST /v1/api-keys.

curl -s "${CITERA_API_BASE_URL%/}/v1/brands" \
  -H "Authorization: Bearer $CITERA_API_KEY" \
  -H "Accept: application/json"
curl -s "${CITERA_API_BASE_URL%/}/v1/brands" \
  -H "Authorization: Bearer $CITERA_API_KEY" \
  -H "Accept: application/json"
curl -s "${CITERA_API_BASE_URL%/}/v1/brands" \
  -H "Authorization: Bearer $CITERA_API_KEY" \
  -H "Accept: application/json"
curl -s "${CITERA_API_BASE_URL%/}/v1/brands" \
  -H "Authorization: Bearer $CITERA_API_KEY" \
  -H "Accept: application/json"

A 401 response includes WWW-Authenticate: Bearer realm="rankad", error="invalid_token".

Session tokens (key management and usage only)

The routes /v1/api-keys* and /v1/usage also accept a Citera (Supabase) session JWT. This is how the Settings page works. A session principal:

  • is verified by the service;

  • receives only the keys:manage scope and no brands;

  • is accepted on the API surface only (never on MCP);

  • must still satisfy api.enabled and the Scale/Enterprise plan check.

Browser key-management calls are restricted to approved application origins.

Optional client headers

Header

Purpose

X-Client-Name, X-Client-Version

Telemetry only (≤ 64 printable chars); never affect authorization

X-Request-Id

Your own correlation ID (8–64 [A-Za-z0-9_-]); logged, not echoed