API Keys
All API requests require authentication using an API key.Creating an API Key
- Go to Dashboard → API Keys
- Click Create New Key
- Give it a name (e.g., “Production”, “Development”)
- Copy the key - it will only be shown once!
Key Types
| Prefix | Type | Use Case |
|---|---|---|
rt_live_ | Production | Production applications |
rt_test_ | Test | Development and testing |
Using Your API Key
HTTP Header
Include your API key in theX-API-Key header:
SDK
CLI
Environment Variables
Store your API key in environment variables:.env
Scopes
API keys can have restricted scopes:| Scope | Permissions |
|---|---|
* | Full access (default) |
sandboxes | Create, read, update, delete sandboxes |
sandboxes:read | Read-only sandbox access |
agents | Run agents |
tools | Execute tools |
templates | Manage templates |
Rate Limits
Each API key has rate limits based on your plan:| Tier | Requests/Minute | Concurrent |
|---|---|---|
| Free | 60 | 5 |
| Pro | 300 | 20 |
| Team | 1,000 | 100 |
| Enterprise | Custom | Custom |
Handling Rate Limits
Key Rotation
Rotate keys regularly for security:- Create a new key in the dashboard
- Update your applications to use the new key
- Verify the new key works
- Delete the old key
Security Best Practices
Use environment variables
Use environment variables
Never hardcode API keys. Use environment variables or secret managers.
Use scoped keys
Use scoped keys
Create keys with only the permissions they need.
Rotate regularly
Rotate regularly
Rotate keys periodically, especially after team changes.
Monitor usage
Monitor usage
Check the dashboard for unusual API activity.
Use test keys for development
Use test keys for development
Don’t use production keys during development.