Authentication
All API requests require authentication using an API key.
Getting Your API Key
- Sign in to the dashboard
- Navigate to API Keys
- Click "Create API Key"
- 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
- Never expose keys in client-side code - Keep keys server-side only
- Rotate keys regularly - Create new keys and revoke old ones
- Use environment variables - Don't hardcode keys in source code
- Limit key scope - Create separate keys for different applications
Rate Limits
| Tier | Requests/month | Tokens/month |
|---|---|---|
| Free | 100 | 50,000 |
| Pro | 5,000 | 1,000,000 |
| Enterprise | 50,000 | 10,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
Authorizationheader is missing - The API key is invalid or revoked
- The key format is incorrect