Rate Limits
API rate limits help ensure fair usage and system stability. Rate limits are applied per API key.Default Rate Limits
- Sandbox Creation: 100 requests per minute
- Code Execution: 1000 requests per minute
- File Operations: 500 requests per minute
- Command Execution: 500 requests per minute
Rate limits may vary based on your plan. Check your dashboard for your specific limits.
Handling Rate Limits
Handle rate limit errors gracefully:- Python
- JavaScript/TypeScript
Quotas
Quotas limit the total usage over a time period (typically per month).Default Quotas
- Sandbox Hours: Varies by plan
- API Requests: Varies by plan
- Data Transfer: Varies by plan
Check your dashboard for your specific quotas and current usage.
Best Practices
✅ DO: Implement Retry Logic
✅ DO: Implement Retry Logic
Always implement retry logic with exponential backoff for rate limit errors.
✅ DO: Monitor Rate Limit Usage
✅ DO: Monitor Rate Limit Usage
Monitor your rate limit usage to avoid hitting limits unexpectedly.
✅ DO: Batch Operations
✅ DO: Batch Operations
Batch operations when possible to reduce API calls.
❌ DON'T: Ignore Rate Limit Errors
❌ DON'T: Ignore Rate Limit Errors
Don’t ignore rate limit errors - implement proper handling.
❌ DON'T: Make Unnecessary Requests
❌ DON'T: Make Unnecessary Requests
Don’t make unnecessary API requests - cache results when possible.
Checking Rate Limits
Rate limit information is included in API responses:- X-RateLimit-Limit: Maximum requests per time window
- X-RateLimit-Remaining: Remaining requests in current window
- X-RateLimit-Reset: Time when rate limit resets

