[metadata]
astro-view-transitions-enabled: true
astro-view-transitions-fallback: swap
description: Rate limits are restrictions that our API imposes on the number of times a user or client can access our services within a specified period of time.
generator: Astro v6.0.4
og:description: Rate limits are restrictions that our API imposes on the number of times a user or client can access our services within a specified period of time.
og:image: https://developers.openai.com/og/api/docs/guides/rate-limits.png
og:image:alt: Rate limits | OpenAI API
og:image:height: 630
og:image:width: 1200
og:site_name: OpenAI Developers
og:title: Rate limits | OpenAI API
og:type: website
og:url: https://developers.openai.com/api/docs/guides/rate-limits
title: Rate limits | OpenAI API
twitter:card: summary_large_image
twitter:description: Rate limits are restrictions that our API imposes on the number of times a user or client can access our services within a specified period of time.
twitter:image: https://developers.openai.com/og/api/docs/guides/rate-limits.png
twitter:image:alt: Rate limits | OpenAI API
twitter:image:height: 630
twitter:image:width: 1200
twitter:site: @OpenAIDevs
twitter:title: Rate limits | OpenAI API
twitter:url: https://developers.openai.com/api/docs/guides/rate-limits
viewport: width=device-width,initial-scale=1

[canonical-links]
https://developers.openai.com/api/docs/guides/rate-limits

[document-links]
AGENTS.md: /codex/agent-configuration/agents-md
API Dashboard: https://platform.openai.com/login
API Partner Setup: /ads/api-partner-setup
API reference: /api/reference/overview
API: /api/docs
API: /blog/topic/api
AWS: /api/docs/guides/workload-identity-federation/aws
Accuracy optimization: /api/docs/guides/optimizing-llm-accuracy
Actions: /api/docs/guides/chatkit-actions
Ad Account: /ads/api-reference/ad-account
Ad Groups: /ads/api-reference/ad-groups
Add UI to your MCP server (optional): /plugins/build/chatgpt-ui
Admin APIs: /api/docs/guides/admin-apis
Admin rollout guide: /codex/enterprise/admin-setup
Ads Overview: /ads
Ads Publish and measure ads in ChatGPT: /ads
Ads: /ads/api-reference/ads
Advanced Config: /codex/config-file/config-advanced
Advanced integrations: /api/docs/guides/custom-chatkit
Agent approvals & security: /codex/agent-approvals-security
Agent definitions: /api/docs/guides/agents/define-agents
Agents: /api/docs/guides/agents
Agents: /cookbook/topic/agents
Agents: /learn/agents
All posts: /blog
Amazon Bedrock: /api/docs/guides/amazon-bedrock
Amazon Bedrock: /codex/amazon-bedrock
Analytics API: /codex/enterprise/analytics-api
App Server: /codex/app-server
Apply Patch: /api/docs/guides/tools-apply-patch
Apps SDK: /blog/topic/apps-sdk
Appshots: /codex/appshots
Audio & Voice: /learn/audio
Audio and speech: /api/docs/guides/audio
Audio: /blog/topic/audio
Authenticate users: /plugins/build/auth
Authenticate with Workspace Agent access tokens: /workspace-agents/authentication
Authentication overview: /codex/auth
Authentication: /ads/api-reference/authentication
Auto-review: /codex/sandboxing/auto-review
Background mode: /api/docs/guides/background
Batch API: /api/docs/api-reference/batch/create
Batch API: /api/docs/guides/batch
Batch: /api/docs/guides/batch
Best practices: /api/docs/guides/evaluation-best-practices
Best practices: /api/docs/guides/fine-tuning-best-practices
Best practices: /commerce/guides/best-practices
Blog Learnings and experiences from developers: /blog
Brainstorm use cases: /plugins/plan/use-case
Browser: /codex/browser
Build an MCP server: /plugins/build/mcp-server
Build plugins: /codex/build-plugins
Build skills: /codex/build-skills
Build skills: /plugins/build/skills
Bulk API: /ads/bulk-api
CLI customization: /codex/cli-customization
Campaign Targeting: /ads/campaign-targeting
Campaigns: /ads/api-reference/campaigns
Changelog: /api/docs/changelog
Changelog: /codex/changelog
Changelog: /codex/security/plugin/changelog
Changelog: /plugins/changelog
ChatGPT Work Overview: /codex/enterprise/chatgpt-work-overview
ChatGPT Work admin FAQ: /codex/enterprise/work-admin-faq
ChatGPT desktop app: /codex/app
ChatGPT on the web: /codex/web
ChatGPT: /
ChatGPT: /chatgpt
ChatGPT: /cookbook/topic/chatgpt
Checkout API reference: /plugins/build/monetization
Chrome extension: /codex/chrome-extension
Citation formatting: /api/docs/guides/citation-formatting
Cloud environment: /codex/environments/cloud-environment
Code generation: /api/docs/guides/code-generation
Code interpreter: /api/docs/guides/tools-code-interpreter
Code review: /codex/code-review
Codex Ambassadors: /community/codex-ambassadors
Codex Ambassadors: https://developers.openai.com/community/codex-ambassadors
Codex CLI: /codex/cli
Codex IDE extension: /codex/ide
Codex Micro: /codex/features/codex-micro
Codex SDK: /codex/codex-sdk
Codex cloud: /codex/cloud
Codex for Open Source: /community/codex-for-oss
Codex for Open Source: https://developers.openai.com/community/codex-for-oss
Codex for Students: /community/students
Codex for Students: https://developers.openai.com/community/students
Codex: /blog/topic/codex
Codex: /cookbook/topic/codex
Codex: /learn/codex
Codex: https://learn.chatgpt.com/docs
Collections: /codex/use-cases/collections
Commands: /codex/reference/commands
Commerce Build commerce flows in ChatGPT: /commerce
Community Programs, meetups, and support for builders: /community
Community: /community
Compaction: /api/docs/guides/compaction
Company blog: https://openai.com/news/
Compliance API and audit events: /codex/enterprise/compliance-api
Computer History: /codex/customization/computer-history
Computer Use: /learn/cua
Computer use: /api/docs/guides/tools-computer-use
Computer use: /codex/computer-use
Config Basics: /codex/config-file/config-basic
Config Reference: /codex/config-file/config-reference
Connect and test your plugin: /plugins/deploy/connect-chatgpt
Content provenance: /api/docs/guides/content-provenance
Conversation state: /api/docs/guides/conversation-state
Conversion Setup: /ads/api-reference/conversion-setup
Conversion-Optimized Campaigns: /ads/conversion-optimized-campaigns
Conversions API: /ads/conversions-api
Cookbook Notebook examples for building with OpenAI models: /cookbook
Cookbook on GitHub: https://github.com/openai/openai-cookbook
Cost optimization: /api/docs/guides/cost-optimization
Counting tokens: /api/docs/guides/token-counting
Custom Code Review rules for Codex: /blog/custom-code-review-rules-for-codex
Customize: /api/docs/guides/chatkit-themes
Cybersecurity checks: /api/docs/guides/safety-checks/cybersecurity
Deep dive: /api/docs/assistants/deep-dive
Deep research: /api/docs/guides/deep-research
Define tools: /plugins/plan/tools
Delta Feeds API: /ads/delta-feeds
Demo apps: /learn/code
Deployment checklist: /api/docs/guides/deployment-checklist
Deprecations: /api/docs/deprecations
Designing delightful frontends with GPT-5.4: /blog/designing-delightful-frontends-with-gpt-5-4
Desktop app: /codex/linux/linux-app
Desktop app: /codex/windows/windows-app
Developer Forum: https://community.openai.com/
Developer blog: https://developers.openai.com/blog
Developer commands: /codex/developer-commands
Developer settings: /codex/developer-settings
Direct preference optimization: /api/docs/guides/direct-preference-optimization
Discord: https://discord.com/invite/openai
Docs Guides, concepts, and product docs for Codex: https://learn.chatgpt.com/docs
Docs MCP: /learn/docs-mcp
Docs: /codex
Docs: https://learn.chatgpt.com/docs
Embeddings: /api/docs/guides/embeddings
Environment Variables: /codex/config-file/environment-variables
Error codes: /api/docs/guides/error-codes
Evals: /cookbook/topic/evals
Evals: /learn/evals
Evaluate agent workflows: /api/docs/guides/agent-evals
Examples: /plugins/build/examples
Explore use cases: /codex/use-cases
Export and track findings: /codex/security/plugin/export-findings
External models: /api/docs/guides/external-models
FAQ: /codex/security/cli/faq
FAQ: /codex/security/faq
Fast mode: /api/docs/guides/fast-mode
Feature Maturity: /codex/feature-maturity
Feeds: /commerce/specs/api/feeds
File inputs: /api/docs/guides/file-inputs
File search: /api/docs/guides/tools-file-search
File transcription: /api/docs/guides/speech-to-text
Files: /ads/api-reference/files
Fine-tuning: /learn/fine-tuning
Fix findings: /codex/security/plugin/fix-findings
Flex processing: /api/docs/guides/flex-processing
Frontend prompting: /api/docs/guides/frontend-prompt
Function calling: /api/docs/guides/function-calling
GPTs and Sharing: /codex/enterprise/gpts-and-sharing
General: /blog/topic/general
Get Quote spec: /plugins/guides/local-services-request-quote-conversion-spec
Get started with Work: /codex/get-started-with-work
Get started: /commerce/guides/get-started
Getting started: /api/docs/guides/evaluation-getting-started
Git worktrees: /codex/environments/git-worktrees
GitHub Action: /codex/github-action
GitHub Actions: /api/docs/guides/workload-identity-federation/github-actions
GitHub: /codex/third-party/github
Glossary: /codex/glossary
Google Cloud: /api/docs/guides/workload-identity-federation/google-cloud
Governance: /codex/enterprise/governance
Graders: /api/docs/guides/graders
Groups and provisioning: /codex/enterprise/groups-and-provisioning
Guardrails: /api/docs/guides/agents/guardrails-approvals
Guardrails: /cookbook/topic/guardrails
HIPAA configuration: /codex/hipaa-configuration
Home: /
Home: /api/docs
Home: /codex
Home: /codex/resources
Home: /commerce
Home: /cookbook
Home: /learn
Home: /plugins
Home: /workspace-agents
Hooks: /codex/hooks
How Perplexity Brought Voice Search to Millions Using the Realtime API: /blog/realtime-perplexity-computer
IP allowlist: /api/docs/guides/ip-allowlist
IP egress ranges: /api/docs/guides/ip-addresses
Image Tag: /ads/image-tag
Image generation: /api/docs/guides/image-generation
Image generation: /api/docs/guides/tools-image-generation
Image generation: /codex/image-generation
Image generation: /learn/imagegen
Image inputs: /codex/image-inputs
Images and vision: /api/docs/guides/images-vision
Import and reconciliation: /api/docs/guides/terraform/import-and-reconcile
Import from another agent: /codex/import
Improving the threat model: /codex/security/threat-model
Insights: /ads/api-reference/insights
Integrated terminal: /codex/integrated-terminal
Integrations and observability: /api/docs/guides/agents/integrations-observability
Internet access: /codex/cloud/internet-access
Key concepts: /api/docs/concepts
Kubernetes: /api/docs/guides/workload-identity-federation/kubernetes
Latency optimization: /api/docs/guides/latency-optimization
Learn Docs, videos, and demo apps for building with OpenAI: /learn
Learn more in the Batch API guide: /api/docs/guides/batch
Linear: /codex/third-party/linear
Live translation: /api/docs/guides/realtime-translation
Local environments: /codex/environments/local-environment
Local shell: /api/docs/guides/tools-local-shell
Long-running work: /codex/long-running-work
MCP Server: /codex/mcp-server
MCP and Connectors: /api/docs/guides/tools-connectors-mcp
MCP server review requirements: /plugins/deploy/app-review
MCP server: /plugins/concepts/mcp-server
MCP: /codex/extend/mcp
Making private MCP servers reachable without making them public: /blog/connect-private-mcp-servers-to-openai-products
Manage app updates: /codex/enterprise/manage-app-updates
Managed configuration: /codex/enterprise/managed-configuration
Managing conversations: /api/docs/guides/realtime-conversations
Managing costs: /api/docs/guides/realtime-costs
Mastering remote engineering work from your phone: /blog/mastering-codex-remote-for-engineering
Measurement Pixel: /ads/measurement-pixel
Meetups: /community/meetups
Meetups: https://developers.openai.com/community/meetups
Memories: /codex/customization/memories
Microsoft Azure: /api/docs/guides/workload-identity-federation/microsoft-azure
Migration guide: /api/docs/assistants/migration
Migration guide: /api/docs/guides/agent-builder/migrate-from-agent-builder
Migration guide: /api/docs/guides/prompting/migrate-from-prompt-object
Model catalog: /api/docs/models
Model selection: /api/docs/guides/model-selection
Model, tool, and data controls: /api/docs/guides/terraform/project-controls
Models & Trusted Access: /codex/cyber-safety
Models and providers: /api/docs/guides/agents/models
Models: /api/docs/models
Models: /codex/models
Moderation: /api/docs/guides/moderation
Modes: /codex/environments/modes
Multi-agent: /api/docs/guides/responses-multi-agent
Multimodal: /cookbook/topic/multimodal
Multiple Pixels (Advanced): /ads/multiple-pixels
Node reference: /api/docs/guides/node-reference
Non-interactive mode: /codex/non-interactive-mode
Notifications: /codex/notifications
Online trainings: https://academy.openai.com/home/events
Open Source: /codex/open-source
OpenAI Academy: https://openai.com/academy/
OpenAI CLI: /api/docs/libraries/openai-cli
OpenAI Crawlers: /api/docs/bots
OpenAI Developers plugin: /learn/developers-codex-plugin
OpenAI SDK: /api/docs/libraries
OpenAI for Startups: https://openai.com/business/why-openai/startups/
Optimization cycle: /api/docs/guides/model-optimization
Optimization: /cookbook/topic/optimization
Optimize Metadata: /plugins/guides/optimize-metadata
Oracle Cloud Infrastructure: /api/docs/guides/workload-identity-federation/oracle-cloud
Orchestration: /api/docs/guides/agents/orchestration
Overview: /ads/api-overview
Overview: /api/docs
Overview: /api/docs/guides/agent-builder
Overview: /api/docs/guides/agents
Overview: /api/docs/guides/chatkit
Overview: /api/docs/guides/prompting
Overview: /api/docs/guides/realtime
Overview: /api/docs/guides/terraform
Overview: /api/docs/guides/tools
Overview: /codex/administration
Overview: /codex/configuration
Overview: /codex/customization/overview
Overview: /codex/developers
Overview: /codex/features
Overview: /codex/security
Overview: /codex/security-administration
Overview: /commerce/specs/api/overview
Overview: /commerce/specs/file-upload/overview
Package your plugin: /plugins/build/plugins
Permissions: /api/docs/guides/rbac
Permissions: /codex/permission-modes
Personal Access Tokens: /codex/enterprise/access-tokens
Personalize ChatGPT: /codex/personalize
Pets: /codex/pets
Plugin UI reference: /plugins/reference
Plugin architecture: /plugins/concepts/plugins
Plugin controls: /codex/enterprise/apps-and-connectors
Plugin guidelines: /plugins/app-guidelines
Plugins Extend ChatGPT and Codex: /plugins
Plugins: /codex/plugins
Predicted Outputs: /api/docs/guides/predicted-outputs
Pricing: /api/docs/pricing
Pricing: /codex/pricing
Prisma AIRS: /codex/enterprise/prisma-airs
Private Link: /api/docs/guides/private-link
Product Feeds: /ads/product-feeds
Product checkout spec: /plugins/guides/product-checkout-conversion-spec
Production best practices: /api/docs/guides/production-best-practices
Production: /api/docs/guides/production-best-practices
Products: /commerce/specs/api/products
Products: /commerce/specs/file-upload/products
Profiles: /codex/permissions
Programmatic tool calling: /api/docs/guides/tools-programmatic-tool-calling
Projects and access: /api/docs/guides/terraform/projects-and-access
Projects and chats: /codex/projects
Promotions: /commerce/specs/api/promotions
Prompt caching: /api/docs/guides/prompt-caching
Prompt engineering: /api/docs/guides/prompt-engineering
Prompt generation: /api/docs/guides/prompt-generation
Prompt optimizer: /api/docs/guides/prompt-optimizer
Prompting: /codex/prompting
Propose security hardening: /codex/security/plugin/security-hardening
Python notebook: /cookbook/examples/how_to_handle_rate_limits
Python script: https://github.com/openai/openai-cookbook/blob/main/examples/api_request_parallel_processor.py
Quickstart: /ads/api-quickstart
Quickstart: /api/docs/guides/agents/quickstart
Quickstart: /api/docs/quickstart
Quickstart: /codex/quickstart
Quickstart: /codex/security/cli
Quickstart: /codex/security/plugin
Quickstart: /plugins/quickstart
RFT use cases: /api/docs/guides/rft-use-cases
Rate limits and spend: /api/docs/guides/terraform/rate-limits-and-spend
Rate limits: /api/docs/guides/rate-limits
Realtime prompting guide: /api/docs/guides/realtime-models-prompting
Realtime transcription: /api/docs/guides/realtime-transcription
Realtime with tools: /api/docs/guides/realtime-mcp
Reasoning best practices: /api/docs/guides/reasoning-best-practices
Reasoning models: /api/docs/guides/reasoning
Recommended configuration: /codex/cyber-safety/recommended-configuration
Record & Replay: /codex/extend/record-and-replay
Red teaming: /api/docs/guides/red-teaming
Reddit: https://www.reddit.com/r/OpenAI/
Reference: /codex/security/cli/reference
Reinforcement fine-tuning: /api/docs/guides/reinforcement-fine-tuning
Remote connections: /codex/remote-connections
Remote: /codex/remote
Resources: /codex/resources
Resources: /learn
Responses API: /api/docs/guides/migrate-to-responses
Restaurant reservation spec: /plugins/guides/restaurant-reservation-conversion-spec
Results and state: /api/docs/guides/agents/results
Retrieval: /api/docs/guides/retrieval
Review code changes: /codex/security/plugin/code-changes
Roles and workspace permissions: /codex/enterprise/roles-and-workspace-permissions
Rules: /codex/agent-configuration/rules
Run a deep scan: /codex/security/plugin/deep-scans
Run a security scan: /codex/security/plugin/scans
Run bulk scans: /codex/security/cli/bulk-scans
Run scans in CI: /codex/security/cli/ci
Running agents: /api/docs/guides/agents/running-agents
SIP: /api/docs/guides/realtime-sip
SPIFFE: /api/docs/guides/workload-identity-federation/spiffe
Safety best practices: /api/docs/guides/safety-best-practices
Safety checks: /api/docs/guides/safety-checks
Safety in building agents: /api/docs/guides/agent-builder-safety
Sample Config: /codex/config-file/config-sample
Sandbox agents: /api/docs/guides/agents/sandboxes
Sandboxing: /codex/sandboxing
Scaling: /learn/scaling
Scheduled tasks: /codex/automations
Secure MCP Tunnel: /api/docs/guides/secure-mcp-tunnels
Security & Privacy: /plugins/guides/security-privacy
Security Review: /codex/security/security-review
Service accounts: /api/docs/guides/terraform/service-accounts
Service accounts: /codex/enterprise/service-accounts
Settings: /codex/reference/settings
Setup: /codex/security/setup
Shell: /api/docs/guides/tools-shell
Showcase Demo apps to get inspired: /showcase
Showcase: /showcase
Showcase: https://developers.openai.com/showcase
Sites: /codex/sites
Skill controls: /codex/enterprise/skills
Skills & Plugins: /codex/skills-and-plugins
Skills: /api/docs/guides/tools-skills
Skills: /plugins/concepts/skills
Slack: /codex/third-party/slack
Slash commands: /codex/reference/slash-commands
Speech generation: /api/docs/guides/text-to-speech
Speed: /codex/agent-configuration/speed
Spend limits: /api/docs/guides/spend-limits
Streaming: /api/docs/guides/streaming-responses
Structured output: /api/docs/guides/structured-outputs
Subagents: /codex/agent-configuration/subagents
Submission error reference: /plugins/deploy/submission-errors
Submit a Claude Code plugin: /plugins/guides/submit-claude-plugin
Submit and publish: /plugins/deploy/submission
Supervised fine-tuning: /api/docs/guides/supervised-fine-tuning
Supported Events: /ads/supported-events
Supported countries: /api/docs/supported-countries
Terms and policies: https://openai.com/policies
Terraform provider: /api/docs/guides/terraform
Text generation: /api/docs/guides/text
Text: /cookbook/topic/text
Tool search: /api/docs/guides/tools-tool-search
Tools: /api/docs/assistants/tools
Tools: /api/docs/guides/tools
Tools: /learn/tools
Transcription: /api/docs/guides/transcription
Triage a backlog: /codex/security/plugin/triage-backlog
Trigger workspace agent runs: /workspace-agents/trigger-runs
Troubleshooting: /codex/reference/troubleshooting
Troubleshooting: /plugins/deploy/troubleshooting
Try ChatGPT: https://chatgpt.com/
TypeScript SDK: /codex/security/sdk
UI guidelines: /plugins/concepts/ui-guidelines
Under 18 API Guidance: /api/docs/guides/safety-checks/under-18-api-guidance
Use ChatGPT: /codex/use-chatgpt
Use cases Example workflows and tasks teams can take on with ChatGPT or Codex: https://learn.chatgpt.com/use-cases
Use cases: /codex/use-cases
Use cases: https://learn.chatgpt.com/use-cases
Use the Security workbench: /codex/security/plugin/workbench
Using GPT-5.6: /api/docs/guides/latest-model
Video generation: /api/docs/guides/video-generation
Video generation: /learn/videogen
Videos: /codex/videos
Videos: /learn/videos
Vision fine-tuning: /api/docs/guides/vision-fine-tuning
Visualizations: /codex/visualizations
Voice & Audio: /api/docs/guides/realtime
Voice activity detection: /api/docs/guides/realtime-vad
Voice agents: /api/docs/guides/voice-agents
Voice: /codex/features/voice
WSL: /codex/windows/wsl
Web search: /api/docs/guides/tools-web-search
Web search: /codex/web-search
WebRTC: /api/docs/guides/realtime-webrtc
WebSocket mode: /api/docs/guides/websocket-mode
WebSocket: /api/docs/guides/realtime-websocket
Webhooks and server-side controls: /api/docs/guides/realtime-server-controls
Webhooks: /api/docs/guides/webhooks
What's new: /codex/whats-new
Widgets: /api/docs/guides/chatkit-widgets
Windows app deployment: /codex/enterprise/windows-deployment
Windows sandbox: /codex/windows/windows-sandbox
Work with files: /codex/artifacts-viewer
Working with evals: /api/docs/guides/evals
Workload identity federation: /api/docs/guides/workload-identity-federation
Workspace Agents Trigger published ChatGPT workspace agents: /workspace-agents
Workspace analytics: /codex/enterprise/workspace-analytics
Workspace model availability: /codex/enterprise/workspace-model-availability
Write vulnerability reports: /codex/security/plugin/vulnerability-reports
X.509 certificates (beta): /api/docs/guides/workload-identity-federation/x509
X: https://x.com/OpenAIDevs
Your data: /api/docs/guides/your-data
account page: https://platform.openai.com/settings/organization/limits
allowed geography: /api/docs/supported-countries
backoff: https://pypi.org/project/backoff/
developer console: https://platform.openai.com/settings/organization/limits
found in the dashboard as well: https://platform.openai.com/settings/organization/limits
gpt-oss: /cookbook/topic/gpt-oss
gpt-oss: /learn/gpt-oss
limits: https://platform.openai.com/settings/organization/limits
llms.txt: /llms.txt
model: /api/docs/models
models page: /api/docs/models
official OpenAI SDK: /api/docs/libraries#install-an-official-sdk
organization level: /api/docs/guides/production-best-practices
organizations limit page: https://platform.openai.com/settings/organization/limits
spend limits: /api/docs/guides/spend-limits

[content]
Rate limits | OpenAI API
For the complete documentation index, see
llms.txt
. Markdown versions of documentation pages are available by appending
.md
to the page URL.
ChatGPT
Home
API
Codex
Docs
Guides, concepts, and product docs for Codex
Use cases
Example workflows and tasks teams can take on with ChatGPT or Codex
Docs
Use cases
Resources
ChatGPT
Plugins
Extend ChatGPT and Codex
Workspace Agents
Trigger published ChatGPT workspace agents
Commerce
Build commerce flows in ChatGPT
Ads
Publish and measure ads in ChatGPT
Resources
Showcase
Demo apps to get inspired
Blog
Learnings and experiences from developers
Cookbook
Notebook examples for building with OpenAI models
Learn
Docs, videos, and demo apps for building with OpenAI
Community
Programs, meetups, and support for builders
Start searching
API Dashboard
Try ChatGPT
Overview
Models
Agents
Tools
Voice & Audio
Production
API reference
Search the API docs
Search docs
Suggested
responses create
reasoning_effort
realtime
prompt caching
Primary navigation
API
Codex
ChatGPT
Docs
Use cases
Resources
Resources
Search docs
Suggested
responses create
reasoning_effort
realtime
prompt caching
Overview
Models
Agents
Tools
Voice & Audio
Production
API reference
Overview
Models
Agents
Tools
Voice & Audio
Production
API reference
Docs section
Production
Home
Get started
Quickstart
Using GPT-5.6
Key concepts
Core concepts
Responses API
Conversation state
Background mode
Streaming
WebSocket mode
Multi-agent
Webhooks
File inputs
Compaction
Counting tokens
SDKs and CLI
OpenAI SDK
OpenAI CLI
Resources
Changelog
Deprecations
Supported countries
OpenAI Crawlers
Terms and policies
Legacy APIs
Agent Builder
Overview
Migration guide
Node reference
Safety in building agents
Evals
Getting started
Working with evals
Prompt optimizer
External models
Best practices
Graders
Fine-tuning
Optimization cycle
Supervised fine-tuning
Vision fine-tuning
Direct preference optimization
Reinforcement fine-tuning
RFT use cases
Best practices
Assistants API
Migration guide
Deep dive
Tools
Model catalog
Choose a model
Pricing
Model selection
Text and code
Text generation
Code generation
Structured output
Prompting
Overview
Prompt engineering
Citation formatting
Migration guide
Prompt generation
Frontend prompting
Reasoning
Reasoning models
Reasoning best practices
Images and video
Images and vision
Image generation
Video generation
Realtime and audio
Audio and speech
Overview
Voice agents
Specialized models
Deep research
Embeddings
Moderation
Overview
Agents SDK
Quickstart
Agent definitions
Models and providers
Running agents
Sandbox agents
Orchestration
Guardrails
Results and state
Integrations and observability
Evaluate agent workflows
ChatKit
Overview
Customize
Widgets
Actions
Advanced integrations
Overview
Function calling
Search and retrieval
Web search
File search
Retrieval
Connect tools and data
MCP and Connectors
Secure MCP Tunnel
Build tool workflows
Skills
Tool search
Programmatic tool calling
Computer and code
Shell
Computer use
Apply Patch
Local shell
Code interpreter
Media
Image generation
Overview
Get started
Voice agents
Live translation
Realtime prompting guide
Audio
Audio and speech
Transcription
File transcription
Realtime transcription
Speech generation
Connection methods
WebRTC
WebSocket
SIP
Sessions and operations
Managing conversations
Voice activity detection
Realtime with tools
Webhooks and server-side controls
Managing costs
Go live
Production best practices
Deployment checklist
Performance and quality
Latency optimization
Predicted Outputs
Fast mode
Accuracy optimization
Cost and throughput
Cost optimization
Prompt caching
Batch
Flex processing
Safety and governance
Safety best practices
Red teaming
Safety checks
Cybersecurity checks
Under 18 API Guidance
Content provenance
Your data
Permissions
Infrastructure and access
Terraform provider
Overview
Projects and access
Service accounts
Rate limits and spend
Model, tool, and data controls
Import and reconciliation
Private Link
IP allowlist
Workload identity federation
X.509 certificates (beta)
Kubernetes
AWS
Microsoft Azure
Google Cloud
Oracle Cloud Infrastructure
GitHub Actions
SPIFFE
IP egress ranges
Amazon Bedrock
Operations
Rate limits
Spend limits
Admin APIs
Error codes
Docs
Use cases
Docs
Use cases
Docs section
Docs
Plugins
Workspace Agents
Commerce
Ads
Plugins
Workspace Agents
Commerce
Ads
Docs section
Select...
Home
Quickstart
Core concepts
Plugin architecture
Skills
MCP server
Plan
Brainstorm use cases
Define tools
Build
Build an MCP server
Add UI to your MCP server (optional)
Authenticate users
Build skills
Package your plugin
Examples
Test and publish
Connect and test your plugin
Submit and publish
Submission error reference
Conversion specs
Restaurant reservation spec
Get Quote spec
Product checkout spec
Guides
UI guidelines
Optimize Metadata
Submit a Claude Code plugin
Security & Privacy
Troubleshooting
Resources
Changelog
Plugin guidelines
MCP server review requirements
Plugin UI reference
Checkout API reference
Home
Get started
Trigger workspace agent runs
Authenticate with Workspace Agent access tokens
Home
Guides
Get started
Best practices
File Upload
Overview
Products
API
Overview
Feeds
Products
Promotions
Ads Overview
Measurement
Measurement Pixel
Multiple Pixels (Advanced)
Image Tag
Conversions API
Supported Events
Advertiser API
Overview
API Partner Setup
Quickstart
Bulk API
Product Feeds
Delta Feeds API
Campaign Targeting
Conversion-Optimized Campaigns
API Reference
Authentication
Ad Account
Campaigns
Ad Groups
Ads
Insights
Files
Conversion Setup
Overview
Features
Configuration
Developers
Security
Administration
Use Cases
Resources
Overview
Features
Configuration
Developers
Security
Administration
Use Cases
Resources
Docs section
Overview
Home
Get started
Quickstart
Use ChatGPT
Get started with Work
Import from another agent
Foundations
Prompting
Personalize ChatGPT
Skills & Plugins
Permissions
Explore
What's new
Models
Pricing
Glossary
Available on
ChatGPT desktop app
Remote
ChatGPT on the web
Codex CLI
Codex IDE extension
Codex cloud
Releases
Changelog
Feature Maturity
Open Source
Overview
Workflows
Projects and chats
Sites
Visualizations
Scheduled tasks
Long-running work
Notifications
Pets
Codex Micro
Capabilities
Browser
Computer use
Voice
Plugins
Web search
Image generation
Image inputs
Appshots
Chrome extension
Work with files
Reference
Commands
Slash commands
Settings
Troubleshooting
Overview
Customization
Overview
Memories
Computer History
Config file
Config Basics
Advanced Config
Config Reference
Environment Variables
Sample Config
Agent configuration
AGENTS.md
Subagents
Speed
Rules
Extend ChatGPT and Codex
Record & Replay
MCP
Linux
Desktop app
Windows
Desktop app
Windows sandbox
WSL
Overview
Development workflows
Code review
Integrated terminal
Extend and automate
Build skills
Build plugins
Hooks
Environments
Modes
Local environments
Cloud environment
Git worktrees
Build with Codex
Codex SDK
App Server
MCP Server
GitHub Action
Non-interactive mode
Third-party integrations
GitHub
Slack
Linear
Reference
CLI customization
Developer commands
Developer settings
Overview
Permissions
Profiles
Sandboxing
Auto-review
Agent approvals & security
Internet access
Codex Security
Overview
Codex Security plugin
Quickstart
Run a security scan
Run a deep scan
Review code changes
Use the Security workbench
Triage a backlog
Fix findings
Propose security hardening
Write vulnerability reports
Export and track findings
Changelog
Codex Security CLI
Quickstart
Run bulk scans
Run scans in CI
Reference
FAQ
TypeScript SDK
Codex Security cloud
Setup
Security Review
Improving the threat model
FAQ
Cyber safety
Models & Trusted Access
Recommended configuration
Overview
Getting started
Admin rollout guide
ChatGPT Work Overview
ChatGPT Work admin FAQ
Identity and authentication
Authentication overview
Personal Access Tokens
Service accounts
Workspace access, policy, and models
Groups and provisioning
Roles and workspace permissions
GPTs and Sharing
Managed configuration
Prisma AIRS
HIPAA configuration
Workspace model availability
Plugin and connector controls
Plugin controls
Skill controls
Usage, governance, and compliance
Governance
Workspace analytics
Analytics API
Compliance API and audit events
Deployment and model providers
Manage app updates
Windows app deployment
Remote connections
Amazon Bedrock
Explore use cases
Collections
Home
Videos
Showcase
OpenAI Academy
Online trainings
Community
Codex Ambassadors
Codex for Students
Codex for Open Source
Meetups
Blog
Company blog
Developer blog
Explore use cases
Collections
Home
Videos
Showcase
OpenAI Academy
Online trainings
Community
Codex Ambassadors
Codex for Students
Codex for Open Source
Meetups
Blog
Company blog
Developer blog
Showcase
Blog
Cookbook
Learn
Community
Showcase
Blog
Cookbook
Learn
Community
Docs section
Select...
All posts
Recent
Custom Code Review rules for Codex
Mastering remote engineering work from your phone
Making private MCP servers reachable without making them public
How Perplexity Brought Voice Search to Millions Using the Realtime API
Designing delightful frontends with GPT-5.4
Topics
General
API
Apps SDK
Audio
Codex
Home
Topics
Agents
Evals
Multimodal
Text
Guardrails
Optimization
ChatGPT
Codex
gpt-oss
Contribute
Cookbook on GitHub
Home
OpenAI Developers plugin
Docs MCP
Categories
Demo apps
Videos
Topics
Agents
Audio & Voice
Computer Use
Codex
Evals
gpt-oss
Fine-tuning
Image generation
Scaling
Tools
Video generation
Community
Programs
Codex Ambassadors
Codex for Students
Codex for Open Source
OpenAI for Startups
Events
Meetups
Spaces
Developer Forum
Discord
Reddit
X
API Dashboard
Try ChatGPT
Go live
Production best practices
Deployment checklist
Performance and quality
Latency optimization
Predicted Outputs
Fast mode
Accuracy optimization
Cost and throughput
Cost optimization
Prompt caching
Batch
Flex processing
Safety and governance
Safety best practices
Red teaming
Safety checks
Cybersecurity checks
Under 18 API Guidance
Content provenance
Your data
Permissions
Infrastructure and access
Terraform provider
Overview
Projects and access
Service accounts
Rate limits and spend
Model, tool, and data controls
Import and reconciliation
Private Link
IP allowlist
Workload identity federation
X.509 certificates (beta)
Kubernetes
AWS
Microsoft Azure
Google Cloud
Oracle Cloud Infrastructure
GitHub Actions
SPIFFE
IP egress ranges
Amazon Bedrock
Operations
Rate limits
Spend limits
Admin APIs
Error codes
Copy Page
Rate limits
Understand API rate limits and restrictions.
Copy Page
Rate limits are restrictions that our API imposes on the number of times a user or client can access our services within a specified period of time.
Why do we have rate limits?
Rate limits are a common practice for APIs, and they’re put in place for a few different reasons:
They help protect against abuse or misuse of the API.
For example, a malicious actor could flood the API with requests in an attempt to overload it or cause disruptions in service. By setting rate limits, OpenAI can prevent this kind of activity.
Rate limits help ensure that everyone has fair access to the API.
If one person or organization makes an excessive number of requests, it could bog down the API for everyone else. By throttling the number of requests that a single user can make, OpenAI ensures that the most number of people have an opportunity to use the API without experiencing slowdowns.
Rate limits can help OpenAI manage the aggregate load on its infrastructure.
If requests to the API increase dramatically, it could tax the servers and cause performance issues. By setting rate limits, OpenAI can help maintain a smooth and consistent experience for all users.
Please work through this document in its entirety to better understand how OpenAI’s rate limit system works. We include code examples and possible solutions to handle common issues. We also include details around how your rate limits are automatically increased in the usage tiers section below.
How do these rate limits work?
Rate limits use metrics such as
RPM
(requests per minute),
RPD
(requests per day),
TPM
(tokens per minute),
TPD
(tokens per day),
IPM
(images per minute), and audio minutes per minute for some streaming audio models. Rate limits can be hit across any of the options depending on what occurs first. For example, you might send 20 requests with only 100 tokens to the ChatCompletions endpoint and that would fill your limit (if your RPM was 20), even if you didn’t send 150k tokens (if your TPM limit was 150k) within those 20 requests.
Batch API
queue limits are calculated based on the total number of input tokens queued for a given model. Tokens from pending batch jobs are counted against your queue limit. Once a batch job is completed, its tokens are no longer counted against that model’s limit.
Other important things worth noting:
Rate limits are defined at the
organization level
and at the project level, not user level.
Rate limits vary by the
model
being used.
For long context models like GPT-5.5, there is a separate rate limit for long context requests. You can view these rate limits in
developer console
.
OpenAI sets an approved monthly usage limit for each organization. This is separate from the
spend limits
that you can configure for an organization or project.
Some model families have shared rate limits. Any models listed under a “shared limit” in your
organizations limit page
share a rate limit between them. For example, if the listed shared TPM is 3.5M, all calls to any model in the given “shared limit” list will count towards that 3.5M.
Vector store ingestion is also rate limited per vector store ID.
/vector_stores/{vector_store_id}/files
and
/vector_stores/{vector_store_id}/file_batches
share a limit of 300 requests per minute for each vector store. For larger ingests, prefer
/vector_stores/{vector_store_id}/file_batches
.
Usage tiers
You can view the rate and usage limits for your organization under the
limits
section of your account settings. As your spend on our API goes up, we automatically graduate you to the next usage tier. This usually results in an increase in rate limits across most models.
Tier
Qualification
Usage limits
Free
User must be in an
allowed geography
$100 / month
Tier 1
$5 paid
$100 / month
Tier 2
$50 paid
$500 / month
Tier 3
$100 paid
$1,000 / month
Tier 4
$250 paid
$5,000 / month
Tier 5
$1,000 paid
$200,000 / month
To view a high-level summary of rate limits per model, visit the
models page
.
Rate limits in headers
In addition to seeing your rate limit on your
account page
, you can also view important information about your rate limits such as the remaining requests, tokens, and other metadata in the headers of the HTTP response.
Responses can include the following header fields:
Field
Sample Value
Description
Retry-After
56
The minimum number of seconds to wait before retrying a temporary rate-limit error, when present.
x-ratelimit-limit-requests
60
The maximum number of requests that are permitted before exhausting the rate limit.
x-ratelimit-limit-tokens
150000
The maximum number of tokens that are permitted before exhausting the rate limit.
x-ratelimit-remaining-requests
59
The remaining number of requests that are permitted before exhausting the rate limit.
x-ratelimit-remaining-tokens
149984
The remaining number of tokens that are permitted before exhausting the rate limit.
x-ratelimit-reset-requests
1s
The time until the rate limit (based on requests) resets to its initial state.
x-ratelimit-reset-tokens
6m0s
The time until the rate limit (based on tokens) resets to its initial state.
x-ratelimit-limit-project-tokens
60000
The token limit for the project.
x-ratelimit-remaining-project-tokens
57000
The remaining number of tokens permitted before exhausting the project-scoped token rate limit.
x-ratelimit-reset-project-tokens
3s
The time until the project-scoped token rate limit resets to its initial state.
Project-token headers may be present when a project-scoped token limit applies.
Retry-After
may be present on
429
responses caused by a temporary rate limit. It does not mean that quota, billing, or other errors that require user action can be resolved by retrying.
Fine-tuning rate limits
The fine-tuning rate limits for your organization can be
found in the dashboard as well
, and can also be retrieved via API:
curl
https://api.openai.com/v1/fine_tuning/model_limits
\
-H
"Authorization: Bearer
$OPENAI_API_KEY
"
Error mitigation
What are some steps I can take to mitigate this?
The OpenAI Cookbook has a
Python notebook
that explains how to avoid rate limit errors, as well an example
Python script
for staying under rate limits while batch processing API requests.
You should also exercise caution when providing programmatic access, bulk processing features, and automated social media posting - consider only enabling these for trusted customers.
To protect against automated and high-volume misuse, set a usage limit for individual users within a specified time frame (daily, weekly, or monthly). Consider implementing a hard cap or a manual review process for users who exceed the limit.
Retrying with exponential backoff
When a request exceeds a temporary rate limit, the API returns a
429
error. The response can include a
Retry-After
header that tells you how many seconds to wait before trying again. Treat this value as a minimum: wait at least that long and add a small random delay so multiple clients don’t retry at the same time.
Each
official OpenAI SDK
automatically retries eligible rate-limit errors and honors
Retry-After
when it’s present. You don’t need to parse the header or add another retry loop for standard API calls.
If you’re using your own HTTP client, follow
Retry-After
when the header is present and contains a valid value. If it’s missing or invalid, fall back to exponential backoff with jitter. Limit both the number of attempts and the total time spent retrying. If you add application-level retries, account for the retries your SDK already performs. Don’t retry quota, billing, or other errors that require you to take action.
Exponential backoff means waiting briefly after an unsuccessful request, then increasing the delay after each unsuccessful retry. This continues until the request succeeds or reaches a configured retry limit.
This approach has many benefits:
Automatic retries means you can recover from rate limit errors without crashes or missing data
Exponential backoff means that your first retries can be tried quickly, while still benefiting from longer delays if your first few retries fail
Adding random jitter to the delay helps retries from all hitting at the same time.
Note that unsuccessful requests contribute to your per-minute limit, so continuously resending a request won’t work.
Below are a few example solutions
for Python
that use exponential backoff.
Example 1: Using the Tenacity library
Tenacity is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything. To add exponential backoff to your requests, you can use the
tenacity.retry
decorator. The below example uses the
tenacity.wait_random_exponential
function to add random exponential backoff to a request.
Using the Tenacity library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from
openai
import
OpenAI
from
tenacity
import
(
retry,
stop_after_attempt,
wait_random_exponential,
)
# for exponential backoff
client
=
OpenAI()
@retry
(
wait
=
wait_random_exponential(
min
=
1
,
max
=
60
),
stop
=
stop_after_attempt(
6
))
def
completion_with_backoff
(
**
kwargs):
return
client.completions.create(
**
kwargs)
completion_with_backoff(
model
=
"gpt-3.5-turbo-instruct"
,
prompt
=
"Once upon a time,"
,
)
Note that the Tenacity library is a third-party tool, and OpenAI makes no guarantees about its reliability or security.
Example 2: Using the backoff library
Another python library that provides function decorators for backoff and retry is
backoff
:
Using the Tenacity library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
backoff
import
openai
from
openai
import
OpenAI
client
=
OpenAI()
@backoff.on_exception
(backoff.expo, openai.RateLimitError)
def
completions_with_backoff
(
**
kwargs):
return
client.completions.create(
**
kwargs)
completions_with_backoff(
model
=
"gpt-3.5-turbo-instruct"
,
prompt
=
"Once upon a time,"
,
)
Like Tenacity, the backoff library is a third-party tool, and OpenAI makes no guarantees about its reliability or security.
Example 3: Manual backoff implementation
If you don’t want to use third-party libraries, you can implement your own backoff logic following this example:
Using manual backoff implementation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# imports
import
random
import
time
import
openai
from
openai
import
OpenAI
client
=
OpenAI()
# define a retry decorator
def
retry_with_exponential_backoff
(
func,
initial_delay:
float
=
1
,
exponential_base:
float
=
2
,
jitter:
bool
=
True
,
max_retries:
int
=
10
,
errors:
tuple
=
(openai.RateLimitError,),
):
"""Retry a function with exponential backoff."""
def
wrapper
(
*
args,
**
kwargs):
# Initialize variables
num_retries
=
0
delay
=
initial_delay
# Loop until a successful response or max_retries is hit or an exception is raised
while
True
:
try
:
return
func(
*
args,
**
kwargs)
# Retry on specific errors
except
errors:
# Increment retries
num_retries
+=
1
# Check if max retries has been reached
if
num_retries
>
max_retries:
raise
Exception
(
f
"Maximum number of retries (
{
max_retries
}
) exceeded."
)
# Increment the delay
delay
*=
exponential_base
*
(
1
+
jitter
*
random.random())
# Sleep for the delay
time.sleep(delay)
# Raise exceptions for any errors not specified
except
Exception
:
raise
return
wrapper
@retry_with_exponential_backoff
def
completions_with_backoff
(
**
kwargs):
return
client.completions.create(
**
kwargs)
Again, OpenAI makes no guarantees on the security or efficiency of this solution but it can be a good starting place for your own solution.
Reduce the
max_tokens
to match the size of your completions
Your rate limit is calculated as the maximum of
max_tokens
and the estimated number of tokens based on the character count of your request. Try to set the
max_tokens
value as close to your expected response size as possible.
Batching requests
If your use case does not require immediate responses, you can use the
Batch API
to more easily submit and execute large collections of requests without impacting your synchronous request rate limits.
For use cases that
do
requires synchronous responses, the OpenAI API has separate limits for
requests per minute
and
tokens per minute
.
If you’re hitting the limit on requests per minute but have available capacity on tokens per minute, you can increase your throughput by batching multiple tasks into each request. This will allow you to process more tokens per minute, especially with our smaller models.
Sending in a batch of prompts works exactly the same as a normal API call, except you pass in a list of strings to the prompt parameter instead of a single string.
Learn more in the Batch API guide
.
Ask AI
Docs agent
Loading docs agent...
