Limits vary by plan and endpoint. Designed to prevent abuse while keeping the API fair for all accounts.
Limits per plan for requests, messages, Dyvas, and knowledge documents.
Need higher limits? Upgrade your plan or contact us for custom enterprise quotas.
Every response includes rate limit headers. Use them to manage request flow proactively.
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 1741521600Exceeding the rate limit returns a 429 status. The response body includes a retry_after field with the seconds to wait before retrying.
{
"error": "rate_limit_exceeded",
"message": "You have exceeded the rate limit of 120 requests per minute. Please wait before retrying.",
"retry_after": 32
}retry_after value. Repeated violations may trigger longer back-off periods or temporary suspension.Build a resilient integration that stays within limits.
Reusable pattern for rate limit handling with exponential backoff.
async function fetchWithRetry(url, options = {}, maxRetries = 3) {
for (let attempt = 0; attempt <= maxRetries; attempt++) {
const res = await fetch(url, options);
if (res.status !== 429) return res;
// Parse retry delay from header or body
const retryAfter = res.headers.get("Retry-After");
const body = await res.json();
const delay = (retryAfter ? parseInt(retryAfter) : body.retry_after) || 1;
// Exponential backoff: retry_after * 2^attempt
const backoff = delay * Math.pow(2, attempt) * 1000;
console.warn(`Rate limited. Retrying in ${backoff / 1000}s...`);
await new Promise((resolve) => setTimeout(resolve, backoff));
}
throw new Error("Max retries exceeded");
}
// Usage
const res = await fetchWithRetry("https://api.dyva.ai/v1/dyvas", {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const data = await res.json();Resource-intensive endpoints have lower limits than the per-plan defaults. These apply regardless of plan unless noted.
Endpoint-specific limits are tracked independently from the global per-minute limit. A request can fail with 429 even if you have remaining global quota.