Authentication
Create, verify, rotate, and revoke NeuroAPI keys, plus common mistakes to avoid.
Every REST endpoint requires an X-API-Key header carrying a secret that you create in the dashboard. The REST API has no OAuth,
no session cookie, and no Authorization: Bearer flow.
Header format
X-API-Key: neuro_a1b2c3d4e5f6...Keys look like neuro_<random>. The leading neuro_<8 chars> is the
public prefix, which is what NeuroAPI displays in dashboards, logs, and
the key_prefix field on /health. The full secret is only ever shown
once, at creation time.
Create a key
Open the dashboard → API Keys.
Click Create key and label it (for example, prod-server or local-laptop).
Copy the secret immediately. Store it somewhere only your service can read: a secret manager such as Vault, or environment variables on the server.
If you lose a key, revoke it and create a new one. NeuroAPI stores only a hash, so it can't recover a lost key.
Verify a key
The fastest way to confirm a key works:
curl -s https://api.neurobro.ai/api/v1/health \
-H "X-API-Key: $NEUROAPI_KEY" | jq .authenticated
# → true/health is free. Use it as a smoke test in deploy pipelines.
Rotate a key
Create the new key, deploy it alongside the old one, switch traffic, then
revoke the old one from the dashboard. Revoked keys return 401 on the
next request. There is no grace period.
A key with an expiry date returns 401 once that date passes. To change
the expiry without rotating the secret, edit the key under API Keys.
Revoke every key at once
If a key may have leaked and you're not sure which, open the dashboard →
Account → Security and choose Revoke all keys, then confirm
with your password. Every active key returns 401 on its next request.
Mint new keys and redeploy. If your account itself may be compromised,
change your password on the same page too - that signs out every session.
What gets logged
NeuroAPI logs the prefix only. The full secret is never written to logs, dashboards, or error reports, and error-tracking payloads are scrubbed before being sent off-platform.
Common mistakes
Authorization: Bearer ...- wrong header. UseX-API-Key.- Trailing whitespace or newlines -
curl ... -H "X-API-Key: $KEY"is safe;echo $KEY | curloften isn't. - Wrong host - public traffic goes to
api.neurobro.ai, not the dashboard host. - Calling without an active plan - auth succeeds, but every endpoint
returns
403no_active_subscription, or402payment_requiredif a payment failed.