Skip to main content

Rate Limits & Quotas

Creatoria Agent API Documentation

#Rate Limits & Quotas

The Creatoria Agent API uses multi-level rate limiting to protect service stability. Limits are based on your subscription plan and calculated independently across different time windows.

#Plan Limits

PlanPer MinutePer HourPer Day
Free601,00010,000
Pro60010,000100,000
Team3,00050,000500,000
Enterprise10,000200,0002,000,000

#Rate Limit Levels

Rate limits are enforced at three independent levels. Exceeding any level returns a 429 error:

LevelScopeWindowDescription
Level 1API Key1 minutePer-key request rate limit
Level 2Organization1 hourOrganization-level hourly request total
Level 3Organization24 hoursOrganization-level daily request total

#Response Headers

Every API response includes rate limit information:

HeaderDescriptionExample
X-RateLimit-LimitMaximum requests in the current window60
X-RateLimit-RemainingRemaining requests in the current window55
X-RateLimit-ResetUnix timestamp when the window resets1708416060
Retry-AfterSeconds to wait when rate limited45

#Rate Limit Error Response

When a request exceeds the limit, the API returns 429 Too Many Requests:

json{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please retry after 45 seconds.",
    "retryAfter": 45
  }
}

#Best Practices

#Exponential Backoff Retry

javascriptasync function fetchWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, options);

    if (response.status === 429) {
      const retryAfter = response.headers.get('Retry-After');
      const delay = retryAfter
        ? parseInt(retryAfter) * 1000
        : Math.pow(2, i) * 1000;
      await new Promise(r => setTimeout(r, delay));
      continue;
    }

    return response;
  }
  throw new Error('Max retries exceeded');
}

#Request Throttling

Implement client-side request throttling to avoid sending too many requests in a short period:

javascriptclass RateLimiter {
  constructor(maxPerSecond = 10) {
    this.queue = [];
    this.interval = 1000 / maxPerSecond;
    this.lastCall = 0;
  }

  async throttle() {
    const now = Date.now();
    const wait = Math.max(0, this.lastCall + this.interval - now);
    this.lastCall = now + wait;
    if (wait > 0) {
      await new Promise(r => setTimeout(r, wait));
    }
  }
}

#Caching Strategy

For data that doesn't change frequently (such as Agent lists and knowledge base metadata), cache responses on the client side to reduce unnecessary API calls.

#Batch Operations

Use batch endpoints instead of individual operations when possible. For example, when uploading multiple documents to a knowledge base, use the import job endpoint to process multiple files at once.

#Token Quotas

In addition to request rate limits, there are token usage quotas based on your subscription plan:

MetricDescription
maxTokensPerDayMaximum daily token consumption
maxRequestsPerDayMaximum daily request count

Token quotas are tracked at the organization level and shared across all API Keys.