Authentication
Meter uses API keys to authenticate requests. All API requests must include your API key to identify your account and track usage.Getting your API key
- Sign up or log in at meter.sh
- Navigate to your dashboard
- Click Generate API Key
- Copy your API key immediately—it will only be shown once
Managing API keys
Creating a new key
- Go to your dashboard
- Click Generate API Key
- Copy the full key (starts with
sk_live_) - Store it securely
Deleting a key
To revoke an API key:- Go to your dashboard
- Find the key by its prefix (e.g.,
sk_live_abc...) - Click Delete
- Confirm deletion
Deleting a key immediately revokes access. Any requests using that key will return
401 Unauthorized.Key rotation
Manual rotation is supported:- Generate a new API key
- Update your applications with the new key
- Verify the new key works
- Delete the old key from the dashboard
API key format
API keys follow this format:- Live keys:
sk_live_+ random characters - Used for production and development (during beta)
Using API keys
Python SDK
Store your API key in an environment variable:REST API
Include your API key in theAuthorization header using the Bearer scheme:
Best practices
Use Environment Variables
Store API keys in environment variables, never in code
Rotate Keys Regularly
Generate new keys periodically and delete old ones
Use Secrets Management
Use tools like AWS Secrets Manager or HashiCorp Vault in production
Monitor Usage
Check your dashboard for unusual API activity
Storing API keys securely
Development
Use environment variables or a.env file (add to .gitignore):
.env
Production
- AWS
- Docker
- Kubernetes
- Vercel/Netlify
Use AWS Secrets Manager or Systems Manager Parameter Store:
Error responses
401 Unauthorized
Your API key is missing or invalid:- Verify your API key is correct
- Check that you’re including the
Authorizationheader - Ensure the key hasn’t been deleted from the dashboard
403 Forbidden
Your API key doesn’t have permission for the requested resource:- Verify you’re accessing your own resources
- Check that the resource exists
Rate limits
Rate limits are not yet enforced during beta. Reasonable usage is expected. Production rate limits will be announced before enforcement.
- Requests per minute
- Strategies generated per day
- Jobs executed per hour
Security model
Meter follows security best practices for API key handling:- One-time display: Full keys are shown only once during creation
- Prefix storage: Only the key prefix is stored and displayed after creation
- Hashed storage: Full keys are hashed using bcrypt before storage
- Immediate revocation: Deleted keys are invalidated instantly
- Per-user isolation: API keys can only access resources belonging to the authenticated user