Rate Limits
The Txtly API implements rate limiting to ensure fair use and maintain service stability. Rate limits vary depending on your plan.
Rate Limit Plans
Different plans have different rate limits:
| Plan | Rate Limit | Description |
|---|---|---|
| Free | 5 req/s | 5 requests per second |
| Pro | 20 req/s | 20 requests per second |
| Scale | 100 req/s | 100 requests per second |
| Enterprise | Custom | Custom rate limits available |
Rate Limit Headers
Every API response includes headers that show your current rate limit status:
| Parameter | Type | Description |
|---|---|---|
X-RateLimit-Limit | string | Your plan's rate limit (requests per second). |
X-RateLimit-Remaining | string | Number of requests remaining in the current window. |
X-RateLimit-Reset | string | Unix timestamp when the rate limit window resets. |
Rate Limit Exceeded
When you exceed your rate limit, you'll receive a 429 response with a Retry-After header:
{
"status_code": 429,
"name": "rate_limit_exceeded",
"message": "You have exceeded the rate limit. Please try again later."
}The response will also include a Retry-After header indicating how many seconds to wait before retrying.
Best Practices
To avoid hitting rate limits:
- •Implement exponential backoff: When you receive a 429 response, wait and retry with increasing delays (1s, 2s, 4s, etc.)
- •Batch requests: Use batch endpoints when available to send multiple items in a single request
- •Cache results: Cache API responses when appropriate to reduce unnecessary requests
- •Monitor rate limit headers: Check remaining requests and adjust your request rate accordingly