Skip to main content

Rate Limits

To ensure fair usage and system stability, the Tokencraft API implements rate limiting on all endpoints.

Current Limits

100 requests per minute per API token This limit applies to all endpoints collectively. Whether you’re calling one endpoint 100 times or spreading requests across multiple endpoints, the total cannot exceed 100 requests per minute.

How It Works

Rate limits are calculated using a fixed window:
  • Window: 60 seconds (1 minute)
  • Limit: 100 requests
  • Reset: Fixed window (resets every minute)
Example timeline:

Rate Limit Headers

Every API response includes rate limit information in the headers:

When Limit Is Exceeded

When you exceed the rate limit, you’ll receive a 429 Too Many Requests response:
What to do:
  1. Wait until the reset time
  2. Implement exponential backoff
  3. Reduce request frequency

Checking Rate Limits

JavaScript Example

Python Example

Handling Rate Limits

1. Exponential Backoff

Retry with increasing delays:

2. Request Queuing

Queue requests to respect rate limits:

3. Request Batching

Combine multiple operations into single requests:

4. Caching

Cache responses to reduce API calls:

Best Practices

1. Monitor Your Usage

Track rate limit headers in your application:

2. Use Multiple Tokens

For high-volume applications, use separate tokens:

3. Optimize Request Patterns

4. Handle Gracefully

Always handle rate limit errors:

Rate Limit Increases

Need higher limits? Contact us at support@tokencraft.dev with:
  • Your use case
  • Expected request volume
  • API token ID
We’ll review and can adjust limits for legitimate high-volume use cases.

Monitoring

Track Your Usage

Set Up Alerts

Next Steps

Error Handling

Learn about error responses

Best Practices

API best practices