🎓 All Courses | 📚 OpenAI API University Syllabus
Stickipedia University
📋 Study this course on TaskLoco

OpenAI enforces rate limits on API usage — requests per minute (RPM) and tokens per minute (TPM). Hitting them causes 429 errors.

Rate Limit Tiers

Limits increase automatically as you spend more. New accounts start at Tier 1 (lowest limits). Tier 5 has very high limits.

Handling Rate Limits in Code

import time
from openai import RateLimitError

def call_with_retry(client, **kwargs):
    for attempt in range(5):
        try:
            return client.chat.completions.create(**kwargs)
        except RateLimitError:
            wait = 2 ** attempt  # exponential backoff
            time.sleep(wait)
    raise Exception("Max retries exceeded")

YouTube • Top 10
OpenAI API University: Rate Limits — Avoiding 429 Errors
Tap to Watch ›
📸
Google Images • Top 10
OpenAI API University: Rate Limits — Avoiding 429 Errors
Tap to View ›

Reference:

Rate limits documentation

image for linkhttps://en.wikipedia.org/wiki/Special:Search?search=Rate%20Limits

📚 OpenAI API University — Full Course Syllabus
📋 Study this course on TaskLoco

TaskLoco™ — The Sticky Note GOAT