← All docs

Authentication

Two kinds of credentials: session cookies for the dashboard, API keys for the gateway.

API keys (gateway)

All /v1 requests require an API key in the Authorization header: "Authorization: Bearer nxr_live_...". Keys are looked up by SHA-256 hash, must be active and unexpired, and are checked against your wallet balance and any per-key model allowlist or token limit.

Session cookies (dashboard)

Logging in at /login sets an HttpOnly cookie named nexora_session (JWT, 7-day expiry). The /api endpoints (wallet, usage, keys) use this cookie. Frontend code never reads the token directly.

Key safety

A key is shown in full exactly once, at creation. Never commit a key to source control or share it in chat. Revoke a compromised key immediately from the dashboard — revocation takes effect at once.

Errors

Missing or invalid keys return 401. An expired or revoked key returns 401 as well. Insufficient wallet balance returns 402 before the request is forwarded.