Overview
The Omnara API uses JWT-based Bearer token authentication. All API requests must include a valid API key in the Authorization header.Getting an API Key
Via CLI
~/.omnara/credentials.json.
Via Dashboard
- Visit omnara.com/dashboard
- Go to Settings → API Keys
- Click Generate New Key
- Copy the key (it’s only shown once)
Store your API keys securely. They provide full access to your Omnara account.
Using API Keys
HTTP Header
Include the API key in theAuthorization header:
Python SDK
Environment Variable
SetOMNARA_API_KEY to avoid hardcoding keys:
API Key Format
Omnara API keys are JWT tokens with this structure:- Format: Base64-encoded JWT (no prefix)
- Algorithm: RS256 (RSA with SHA-256)
- Claims:
sub: Your user IDiat: Issued at timestamp- No expiration (valid indefinitely)
Security Best Practices
Never commit keys to version control
Never commit keys to version control
Use environment-specific keys
Use environment-specific keys
Create separate API keys for:
- Development
- Staging
- Production
- CI/CD pipelines
Rotate keys regularly
Rotate keys regularly
Restrict key permissions
Restrict key permissions
When available, use scoped keys with limited permissions:
- Read-only keys for monitoring
- Write-only keys for agents
- Admin keys only where necessary
Monitor key usage
Monitor key usage
Check API key usage in your dashboard:
- Last used timestamp
- Request count
- Unusual activity patterns
Key Management
Listing Keys
View all your API keys in the dashboard: Settings → API Keys Each key shows:- Name/description
- Created date
- Last used
- Status (active/revoked)
Revoking Keys
Immediately invalidate a key:- Go to Settings → API Keys
- Find the key to revoke
- Click Revoke
Key Rotation
Safe key rotation process:1
Generate New Key
Create a new API key in the dashboard
2
Update Applications
Update your applications to use the new key:
- Environment variables
- Secret management systems
- Configuration files
3
Verify
Test that applications work with new key
4
Revoke Old Key
Once verified, revoke the old key
Error Responses
401 Unauthorized
Missing or invalid API key:- Missing Authorization header
- Invalid key format
- Revoked key
- Expired key (if expiration enabled)
403 Forbidden
Valid key but insufficient permissions:- Scoped key without required permissions
- Accessing another user’s resources