Rate Limits
Understanding and working with Prisme.ai API rate limits
Prisme.ai implements rate limiting to ensure platform stability and fair usage across all users. This page explains the rate limits in place, how to monitor your usage, and best practices for working within these limits.
Rate Limit Overview
Most API endpoints have rate limits applied based on:
- User or API Key: Limits are tracked per authenticated user or API key
- Endpoint category: Different endpoint categories have different limits
- Workspace: Some limits are applied per workspace
Standard APIs
Most API endpoints: 100 requests per minute
Write Operations
Create/update operations: 60 requests per minute
Search/List
Search and list operations: 30 requests per minute
These are general guidelines. Specific endpoints may have custom rate limits based on their resource intensity.
Most API endpoints have rate limits applied based on:
- User or API Key: Limits are tracked per authenticated user or API key
- Endpoint category: Different endpoint categories have different limits
- Workspace: Some limits are applied per workspace
Standard APIs
Most API endpoints: 100 requests per minute
Write Operations
Create/update operations: 60 requests per minute
Search/List
Search and list operations: 30 requests per minute
These are general guidelines. Specific endpoints may have custom rate limits based on their resource intensity.
While executing workspace automations, the Runtime enforces four distinct rate limits:
Automations Execution
- Default: 100 automations per second
- Burst: 400 automations
- Environment Variable:
RATE_LIMIT_AUTOMATIONS
- Workspace Secret:
prismeai_ratelimit_automations
Event Emits
- Default: 30 emits per second
- Burst: 100 emits
- Environment Variable:
RATE_LIMIT_EMITS
- Workspace Secret:
prismeai_ratelimit_emits
HTTP Fetches
- Default: 50 fetches per second
- Burst: 200 fetches
- Environment Variable:
RATE_LIMIT_FETCHS
- Workspace Secret:
prismeai_ratelimit_fetchs
Repeat Loops
- Default: 1000 iterations per second
- Burst: 4000 iterations
- Environment Variable:
RATE_LIMIT_REPEATS
- Workspace Secret:
prismeai_ratelimit_repeats
These rate limits are applied per workspace and per Runtime instance. They are not shared across instances in a cluster deployment.
Understanding Runtime Rate Limits
Rate Limit Headers
When making API requests, rate limit information is returned in the response headers:
X-RateLimit-Limit
The maximum number of requests allowed in the current time window
X-RateLimit-Remaining
The number of requests remaining in the current time window
X-RateLimit-Reset
The time when the current rate limit window resets, in Unix epoch seconds
Retry-After
Present only when rate limited, indicates seconds to wait before retrying
Rate Limit Response
When you exceed a rate limit, the API returns a 429 “Too Many Requests” response with details about the limit:
For Runtime automations, a payload.throttled
field in the runtime.automations.executed
event indicates the throttling duration.
Configuration Options
Rate limits can be configured globally using environment variables:
Environment Variable | Description | Default Value |
---|---|---|
RATE_LIMIT_AUTOMATIONS | Automations per second | 100 |
RATE_LIMIT_EMITS | Event emits per second | 30 |
RATE_LIMIT_FETCHS | HTTP fetches per second | 50 |
RATE_LIMIT_REPEATS | Repeat iterations per second | 1000 |
RATE_LIMIT_AUTOMATIONS_BURST | Automations burst limit | 400 |
RATE_LIMIT_EMITS_BURST | Event emits burst limit | 100 |
RATE_LIMIT_FETCHS_BURST | HTTP fetches burst limit | 200 |
RATE_LIMIT_REPEATS_BURST | Repeat iterations burst limit | 4000 |
RATE_LIMIT_DISABLED | Disable all rate limits | false |
Setting any of these environment variables to 0 disables the corresponding rate limit for all workspaces.
Rate limits can be configured globally using environment variables:
Environment Variable | Description | Default Value |
---|---|---|
RATE_LIMIT_AUTOMATIONS | Automations per second | 100 |
RATE_LIMIT_EMITS | Event emits per second | 30 |
RATE_LIMIT_FETCHS | HTTP fetches per second | 50 |
RATE_LIMIT_REPEATS | Repeat iterations per second | 1000 |
RATE_LIMIT_AUTOMATIONS_BURST | Automations burst limit | 400 |
RATE_LIMIT_EMITS_BURST | Event emits burst limit | 100 |
RATE_LIMIT_FETCHS_BURST | HTTP fetches burst limit | 200 |
RATE_LIMIT_REPEATS_BURST | Repeat iterations burst limit | 4000 |
RATE_LIMIT_DISABLED | Disable all rate limits | false |
Setting any of these environment variables to 0 disables the corresponding rate limit for all workspaces.
Rate limits can be configured per workspace using workspace secrets:
Workspace Secret | Description | Default Value |
---|---|---|
prismeai_ratelimit_automations | Automations per second | 100 |
prismeai_ratelimit_emits | Event emits per second | 30 |
prismeai_ratelimit_fetchs | HTTP fetches per second | 50 |
prismeai_ratelimit_repeats | Repeat iterations per second | 1000 |
prismeai_ratelimit_automations_burst | Automations burst limit | 400 |
prismeai_ratelimit_emits_burst | Event emits burst limit | 100 |
prismeai_ratelimit_fetchs_burst | HTTP fetches burst limit | 200 |
prismeai_ratelimit_repeats_burst | Repeat iterations burst limit | 4000 |
prismeai_ratelimit_disabled | Disable rate limits for this workspace | false |
These workspace secrets are restricted to super admins. Regular workspace admins cannot modify these values.
Best Practices
Monitor Your Usage
Track your API usage and rate limit headers to understand your consumption patterns:
Implement Backoff and Retry
When rate limited, implement exponential backoff with jitter:
Optimize Automation Distribution
Design automations to distribute work effectively:
- Use events to distribute processing across multiple Runtime instances
- Batch operations where possible instead of making multiple single calls
- Implement queuing for high-volume operations
- Use parallel processing for independent operations
Cache Responses
Implement caching for frequently accessed data:
Monitoring Throttling
You can monitor throttling in Runtime automations through the following methods:
Each automation execution generates a runtime.automations.executed
event that includes throttling information:
If throttled
is greater than zero, the automation was rate limited.
Each automation execution generates a runtime.automations.executed
event that includes throttling information:
If throttled
is greater than zero, the automation was rate limited.
The Prisme.ai dashboard provides metrics on automation execution, including:
- Execution counts
- Average duration
- Throttling rates
- Error rates
Common Rate Limit Scenarios
High-Volume Data Processing
When processing large datasets, use batching and distributed processing:
- Split large datasets into manageable chunks
- Process chunks in parallel using events
- Implement checkpointing to resume interrupted processing
- Consider scheduled automations for very large datasets
User-Generated Events
For systems handling many user-triggered events:
- Implement client-side throttling for UI interactions
- Queue events server-side for processing
- Consider debouncing or deduplicating similar events
- Prioritize critical user actions in your processing queue
Integration Synchronization
When synchronizing with external systems:
- Use webhooks where possible instead of polling
- Implement incremental synchronization (only changed data)
- Schedule large synchronization jobs during off-peak hours
- Prioritize critical data for real-time sync
Scheduled Reports
For generating scheduled reports or analytics:
- Pre-compute and cache common metrics
- Generate reports during off-peak hours
- Split large reports into smaller segments
- Implement progressive loading for user interfaces