Overview
All API requests to buntime.sh require authentication using an API key. Authentication is performed via theAuthorization header using the Bearer token scheme.
Getting Your API Key
1
Sign up for an account
Visit buntime.sh/dashboard and create a free account.
2
Generate an API key
In the dashboard, navigate to API Keys and click Create New Key.
3
Copy and store securely
Copy your API key immediately—you won’t be able to see it again. Store it securely using environment variables or a secrets manager.
Using Your API Key
REST API
Include your API key in theAuthorization header with every request:
TypeScript SDK
Pass your API key when initializing the client:Managing API Keys
Creating Multiple Keys
You can create multiple API keys for different environments or applications:- Development: Use a separate key for local development
- Staging: Create a key for staging environments
- Production: Use a dedicated key for production
- CI/CD: Generate keys specifically for automated testing
Rotating Keys
It’s a best practice to rotate your API keys periodically:- Create a new API key in the dashboard
- Update your applications to use the new key
- Verify the new key works correctly
- Revoke the old key
Revoking Keys
If an API key is compromised or no longer needed:- Go to the dashboard
- Find the key in your API Keys list
- Click Revoke to immediately disable it
Revoking a key takes effect immediately. Any requests using the revoked key will fail with a 401 Unauthorized error.
Rate Limits
API keys are subject to rate limits based on your plan:| Plan | Rate Limit | Concurrent Sessions |
|---|---|---|
| Free | 100 requests/minute | 10 sessions |
| Paid | 1,000 requests/minute | 100 sessions |
| Enterprise | Custom | Custom |
429 Too Many Requests response with headers indicating when you can retry:
Best Practices
Store keys securely
Store keys securely
Use environment variables or secrets managers (AWS Secrets Manager, HashiCorp Vault, etc.) to store API keys. Never commit them to version control.
Rotate keys regularly
Rotate keys regularly
Rotate your API keys every 90 days or when team members leave. This minimizes the impact of potential key exposure.
Use separate keys per environment
Use separate keys per environment
Create different keys for development, staging, and production. This provides better isolation and easier debugging.
Monitor usage
Monitor usage
Regularly review your API usage in the dashboard. Unusual patterns might indicate a compromised key.
Set up alerts
Set up alerts
Configure alerts in the dashboard to notify you when usage approaches limits or shows suspicious activity.
Troubleshooting
401 Unauthorized
If you receive a 401 error, check:- ✅ The API key is correctly formatted
- ✅ The
Authorizationheader is included - ✅ The bearer scheme is used:
Bearer your_key - ✅ The key hasn’t been revoked
- ✅ Your account is active
429 Too Many Requests
If you’re hitting rate limits:- Implement exponential backoff with retry logic
- Cache responses when possible
- Consider upgrading your plan for higher limits
- Batch operations to reduce request count