Authentication
Nebula API uses API keys as the primary authentication method. API keys provide granular permissions and are scoped to specific clusters.Recommended: load keys from environment variables; do not commit secrets. Always use HTTPS and send credentials via the Authorization header.
TL;DR
- Authorization header format:
Authorization: ApiKey neb_xxx
(never in query params) - Quick health check expects HTTP 200
- Initialize SDKs by reading the API key from an environment variable
API Keys
API keys are the primary authentication method for the Nebula API. They provide granular permissions and are scoped to specific clusters.Creating API Keys
API keys can be created through the Nebula dashboard.Via Dashboard
- Log in to your Nebula dashboard
- Navigate to API Keys section
- Click Create New API Key
- Configure permissions for specific clusters
- Copy the generated API key (it’s only shown once)
API keys are shown only once. Store them securely and never commit them to source control.
Permission Levels
API keys support different permission levels:Permission | Description |
---|---|
read | Can view and download files |
write | Can upload, create folders, delete, move, and rename files (includes read permissions) |
admin | Full access to the cluster |
none | No access |
Using API Keys
Retries and rate limits
Use capped exponential backoff with jitter for transient errors (e.g., 429/5xx). Avoid retrying non-idempotent writes unless the operation supports idempotency.Security Best Practices
API Key Security
- Keep API keys secret: Never commit API keys to version control
- Use environment variables: Store API keys in environment variables
- Limit permissions: Use the minimum required permissions for each API key
- Monitor usage: Regularly check API key usage in the dashboard
Environment Variables
Quick Test
Verify your key quickly:Common errors
- 401 Unauthorized: Missing/invalid Authorization header. Do not retry without fixing credentials.
- 403 Forbidden: Authenticated but insufficient permissions or wrong cluster scope. Do not retry without changing permissions/scope.
- 429 Too Many Requests: Back off with jitter and retry after delay; respect any rate-limit headers if present.
Rotation and revocation
- Prefer environment variables or a secrets manager; never hardcode keys.
- Rotate keys periodically and immediately after suspected exposure.
- Revoke unused keys in the dashboard and monitor usage for anomalies.
Next Steps
- Error Handling - Learn about NebulaException and error handling patterns
- Memory Operations - Start working with memories
- Conversations - Work with conversational AI
- API Reference - Explore all available endpoints