Authentication

All API requests require authentication using an API key.

Getting Your API Key

  1. Sign in to the dashboard
  2. Navigate to API Keys
  3. Click "Create API Key"
  4. Copy your key (you won't see it again!)

Using Your API Key

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

curl -X GET "https://api.getneji.com/api/projects" \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxx"

API Key Format

API keys follow this format:

  • Live keys: sk_live_xxxxxxxxxxxxxxxxxxxxxxxx
  • Test keys: sk_test_xxxxxxxxxxxxxxxxxxxxxxxx (coming soon)

Security Best Practices

  1. Never expose keys in client-side code - Keep keys server-side only
  2. Rotate keys regularly - Create new keys and revoke old ones
  3. Use environment variables - Don't hardcode keys in source code
  4. Limit key scope - Create separate keys for different applications

Rate Limits

TierRequests/monthTokens/month
Free10050,000
Pro5,0001,000,000
Enterprise50,00010,000,000

When you exceed rate limits, you'll receive a 429 Too Many Requests response.

Error Responses

401 Unauthorized

{
  "error": "Missing or invalid Authorization header"
}

This means:

  • The Authorization header is missing
  • The API key is invalid or revoked
  • The key format is incorrect