Authentication#
All API requests require a valid API key sent as a Bearer token.
Header format#
Authorization: Bearer hpx_your_api_keyGetting your API key#
- Sign in to the dashboard.
- Create a new API key.
- Copy the key — it's only shown once.
What the API checks#
When you make a request, the API verifies:
- Valid key — the key exists and hasn't been revoked.
- Active subscription — your account has an active or trialing subscription (canceled subscriptions work until the period ends).
If any check fails, you'll get a 401, 402, or 403 error. See Errors for details.
Security best practices#
- Store keys in environment variables — never hardcode them.
- Never expose keys in client-side code — mint URLs server-side only.
- Don't commit keys to version control — use
.envfiles and add them to.gitignore. - Rotate keys periodically — revoke old keys from the dashboard.
- Use separate keys for development and production — makes rotation and auditing easier.