Skip to main content

Rate Limiting

The Tella API implements rate limiting to ensure fair usage and protect the service for all users.

Current limits

LimitValue
Requests per minute100
ScopePer user
Rate limits are applied per user within an organization. All API keys created by the same user share the same rate limit.

Rate limit headers

Every API response includes headers with rate limit information:
HeaderDescriptionExample
X-RateLimit-LimitMaximum requests per window100
X-RateLimit-RemainingRemaining requests in current window95
X-RateLimit-ResetUnix timestamp when the window resets1704067200

Example response headers

HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1704067200
Content-Type: application/json

Handling rate limits

429 Too Many Requests

When you exceed the rate limit, you’ll receive a 429 status code:
{
  "error": "rate_limit_exceeded",
  "description": "Rate limit exceeded. Please retry after 45 seconds."
}

Best practices

Monitor the X-RateLimit-Remaining header and slow down before hitting the limit.
const response = await fetch('https://api.tella.com/v1/videos', {
  headers: { 'Authorization': `Bearer ${apiKey}` }
});

const remaining = response.headers.get('X-RateLimit-Remaining');
if (parseInt(remaining) < 10) {
  console.log('Approaching rate limit, slowing down...');
}
When you receive a 429, wait before retrying with increasing delays:
async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, options);

    if (response.status === 429) {
      const waitTime = Math.pow(2, i) * 1000; // 1s, 2s, 4s
      console.log(`Rate limited. Waiting ${waitTime}ms...`);
      await new Promise(r => setTimeout(r, waitTime));
      continue;
    }

    return response;
  }
  throw new Error('Max retries exceeded');
}
The X-RateLimit-Reset header tells you exactly when your limit resets:
const resetTime = response.headers.get('X-RateLimit-Reset');
const waitMs = (parseInt(resetTime) * 1000) - Date.now();

if (waitMs > 0) {
  console.log(`Waiting ${waitMs}ms until rate limit resets`);
  await new Promise(r => setTimeout(r, waitMs));
}
Instead of making many small requests, use pagination efficiently:
// Instead of fetching videos one by one
// Fetch them in batches using the list endpoint
let cursor = null;
const allVideos = [];

do {
  const url = cursor
    ? `https://api.tella.com/v1/videos?cursor=${cursor}`
    : 'https://api.tella.com/v1/videos';

  const response = await fetch(url, { headers });
  const data = await response.json();

  allVideos.push(...data.data);
  cursor = data.pagination.next_cursor;
} while (cursor);

Rate limit scope

Rate limits are calculated per user within an organization:
  • All API keys created by the same user share the same 100 requests per minute limit
  • Different users in the same organization have independent limits
  • The limit applies across all endpoints

Need higher limits?

If your use case requires higher rate limits, please contact us to discuss your needs.