Skip to main content
Every request carries Authorization: Bearer <key>. Scopes are fixed by route — headers and body fields cannot change them.

Key format and lifecycle

  • New portal-issued keys look like pai- followed by 43 URL-safe characters. Existing ds- and older keys continue to work.
  • The raw bearer is shown once at creation and cannot be retrieved later; a lost key must be revoked and re-created.
  • Revocation takes effect within seconds; brand-new keys work immediately.
  • Keys never expire by default; an expiry can be set at issuance.

Scopes by route

Credit gate

Inference requires a positive prepaid credit balance. Keys with free access skip the balance check (usage is still recorded, at zero cost). Balance empty → 402 insufficient_credits; add credits on the platform Billing page. For Responses WebSockets, send the bearer header when opening the connection. The upgrade and each generated turn require authorization and credit checks; a connected socket does not lock in access indefinitely. Use a backend relay for browser apps—never expose a Particle API key in frontend code, a query string, or a WebSocket subprotocol.

Error shapes

Auth failures are consistent, sanitized, OpenAI-shaped JSON: 401 — missing, malformed, expired, disabled, or unknown key (includes WWW-Authenticate: Bearer)
403 — valid key, wrong scope
402 — empty credit balance

Security boundaries

  • Your key is verified on our secure servers. It is never logged and never shared with any third party.
  • Usage is attributed to your account per key, so rotating a key never affects your billing history.