NeuralSnapNeuralSnap/Docs

Authentication

NeuralSnap uses API keys for authentication. Every request must include a valid key in the Authorization header as a Bearer token.

Getting Your API Key

1

Go to your dashboard

Navigate to neuralsnap.ai/api-keys and sign in to your account.

2

Open API Keys settings

Click Settings in the sidebar, then select the API Keys tab.

3

Generate a new key

Click Generate New Key. Give it a descriptive name (e.g. "Production" or "Dev Testing") so you can identify it later.

4

Copy your key

Your key will be displayed once. Copy it immediately and store it securely — you won't be able to see it again.

Header Format

Include your API key in the Authorization header with every request:

bash
Authorization: Bearer ns_live_abc123def456...
bash
curl https://neuralsnap.ai/api/v1/snapshots \
-H "Authorization: Bearer ns_live_abc123def456"

Never expose keys client-side

API keys carry full access to your brain. Never embed them in frontend JavaScript, mobile apps, or public repositories. Use environment variables and server-side proxies to keep your keys safe.

Rate Limit Headers

Every API response includes headers to help you track your rate limit usage:

PropertyTypeDescription
X-RateLimit-LimitnumberMaximum number of requests allowed per hour for your plan.
X-RateLimit-RemainingnumberNumber of requests remaining in the current window.
X-RateLimit-ResettimestampUnix timestamp (seconds) when the rate limit window resets.
Example response headers
HTTP/1.1 200 OK
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1706140800

Error Responses

401 Unauthorized

Returned when the API key is missing, malformed, or revoked.

json
{
"error": "Invalid API key. Check your Authorization header.",
"code": "AUTH_INVALID_KEY"
}

429 Rate Limited

Returned when you exceed the request limit for your plan. Back off and retry after the reset window.

json
{
"error": "Rate limit exceeded. Try again in 342 seconds.",
"code": "RATE_LIMIT_EXCEEDED"
}

Handling rate limits

Implement exponential backoff in your client. Check the X-RateLimit-Remaining header proactively to avoid hitting the limit, and queue requests when remaining is low.