ChatGPT api
★★★★★ 4.8 CE

ChatGPT API: Access, Rate Limits & SDKs 2026

The OpenAI API is a REST API at api.openai.com/v1, built around the Responses API. Rate limits rise with spend, and cache hits get a 90% discount.

ChatGPT API verdict

Verified today·4 sources checked

The OpenAI API is a REST API at api.openai.com/v1.

You authenticate with an Authorization: Bearer key, or a short-lived WIF token, with optional OpenAI-Organization and OpenAI-Project headers. The primary surface is the Responses API, at POST /v1/responses, for tool use and multimodal input.

How to build on it

OpenAI's API is straightforward to adopt: one Bearer header, the Responses API as the main surface, and official client libraries that surface request IDs for support. Budget around three levers. Route non-interactive volume through the Batch API, which sits off the synchronous limit. Cache repeated context, since cache hits are billed at $0.50 per 1M, a 90% discount. Keep max_tokens close to the real response size, because it feeds the rate-limit estimate. Plan tier advancement ahead of launch, since limits rise automatically with cumulative spend from Free through Tier 5. High-volume long-context GPT-5.5 work needs the separate long-context limit checked in the console.

Honest limits
  • Model prompting behaviour can change between snapshots even within v1, so pin model versions and run evals for consistent output.
  • Rate limits are hit across whichever of RPM, RPD, TPM and TPD comes first. 20 small requests can exhaust a 20-RPM limit long before the token limit.
  • Long-context GPT-5.5 requests have a separate rate limit from standard requests, visible only in the developer console.
  • Failed requests still count toward the per-minute limit, so naive retry loops make 429s worse. Use exponential backoff with jitter.
Base URL
api.openai.com/v1
Primary endpoint
POST /v1/responses
Auth
Bearer key / WIF
Usage tiers
Free to Tier 5
Cache discount
90% ($0.50/1M)
View sources

Build with the ChatGPT API

Your first ChatGPT API request

curl https://api.openai.com/v1/responsesbash
curl https://api.openai.com/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "input": "Hello, GPT"
  }'

How to authenticate with the ChatGPT API

AspectDetailNotes
Base URLhttps://api.openai.com/v1 (REST)REST API, currently v1
AuthAuthorization: Bearer OPENAI_API_KEYAPI key or short-lived WIF token
Key typesStandard API key, Admin API key, WIF tokensAdmin key for Administration endpoints
Org / project headersOpenAI-Organization, OpenAI-ProjectMulti-org or legacy user keys
Version headeropenai-version (currently 2020-10-01)Returned on every response
Request IDsx-request-id on every response; X-Client-Request-Id optionalClient id: ASCII, <=512 chars
StabilityNo breaking changes within a major versionPin model snapshots for consistent behaviour

ChatGPT core endpoints

SurfaceMethod / pathPurpose
ResponsesPOST /v1/responsesDirect model requests: tool use, audio/image/text input, stateful interactions
Chat CompletionsPOST /v1/chat/completionsLegacy chat surface, still supported
RealtimeWebRTC / WebSocket / SIPLow-latency voice or audio sessions
ModelsGET /v1/modelsList models and details
Administration/v1 admin endpointsUsers, invites, projects, API keys, audit logs
EmbeddingsPOST /v1/embeddingsVector embeddings for search and RAG
Fine-tuningGET /v1/fine_tuning/model_limitsFine-tuning jobs and per-org limits

ChatGPT rate limits and tiers

LimitDetailNotes
DimensionsRPM, RPD, TPM, TPD (+ IPM, audio-min)Hit across any, whichever comes first
ScopePer organization and per projectNot per user; varies by model
Usage tiersFree, Tier 1-5; auto-graduated by spendTier 1 $5 paid, Tier 5 $1,000 paid
Monthly usage capFree/Tier1 $100, Tier3 $1,000, Tier5 $200,000Spend ceiling per month
Long-context limitSeparate rate limit for long-context GPT-5.5 requestsVisible in developer console
Shared limitsSome model families share one TPM poolAll calls count to the shared limit
Headersx-ratelimit-limit/remaining/reset for requests and tokense.g. limit-tokens 150000, reset-tokens 6m0s
Batch queueBatch API queue limit by total queued input tokensOff the synchronous limit

ChatGPT SDKs, error handling and developer fit

AspectDetailNotes
Official SDKsOfficial client libraries (libraries page)Released libraries follow semver
Backwards compatibilityNo breaking changes in a major version; pin snapshotsModel behaviour can shift between snapshots
Request tracingx-request-id auto; X-Client-Request-Id (ASCII, <=512)SDKs surface the request id on responses
Rate-limit errorsRetry with random exponential backoff + jitterFailed requests still count to the limit
Cost leversBatch API (off sync limit); cache hits at $0.50/1M; trim max_tokensmax_tokens counts toward the limit estimate
Processing metadataopenai-processing-ms, openai-organization headersOn every response
API pricing (GPT-5.5)$5/1M in, $30/1M out, cache hit $0.50/1MIndependent cross-reference

ChatGPT API FAQ

How do I authenticate with the OpenAI API?

Send an Authorization: Bearer header with your API key, or a short-lived token from workload identity federation, to https://api.openai.com/v1. If you belong to more than one organization or use a legacy user key, add OpenAI-Organization and OpenAI-Project headers to attribute usage. Never expose the key in client-side code. Load it from an environment variable or secret manager.

What are the core OpenAI API endpoints?

The primary surface is the Responses API, at POST /v1/responses, for direct model requests with tool use and text, image and audio input. There is also the Realtime API for low-latency voice over WebRTC, WebSocket or SIP, plus Administration endpoints for org workflows. Models at GET /v1/models handles discovery, and the still-supported legacy Chat Completions endpoint sits at POST /v1/chat/completions.

What are the OpenAI API rate limits?

Limits apply per organization and per project across requests per minute and day and tokens per minute and day, enforced on whichever is reached first. Usage tiers raise the ceiling automatically as cumulative spend grows, from Free through Tier 5, which needs $1,000 paid and allows $200,000 per month. Long-context GPT-5.5 requests carry a separate limit, and some model families share one pool. Response headers report live usage through x-ratelimit-limit, remaining and reset.

Which SDKs does OpenAI offer?

OpenAI publishes official client libraries, listed on the libraries page, that follow semantic versioning and surface the x-request-id on top-level response objects for troubleshooting. You can also call the HTTP API directly from any environment that supports HTTP. Pin model snapshots and run evals, because prompting behaviour can shift between snapshots even within the stable v1 surface.

How do I reduce OpenAI API costs and avoid rate-limit errors?

Three levers. Use the Batch API for non-interactive work, since it does not count against your synchronous request limit. Rely on prompt caching, where cache hits are billed at $0.50 per 1M, a 90% discount on GPT-5.5. Trim max_tokens to your real response size, because it feeds the rate-limit estimate. For 429s, retry with random exponential backoff and jitter, and note that failed requests still count toward the per-minute limit.

Sources & verification

Verified by ComparEdgeMethod: Vendor docs, official pages, and selected independent sources
SourceWhat was checkedLast checked
Chatgpt OfficialOfficial product pageJuly 10, 2026
Artificial AnalysisIndependent referenceJuly 10, 2026
OpenAI Guides Rate LimitsAPI Rate LimitsJuly 10, 2026
OpenAI Reference OverviewAPI OverviewJuly 10, 2026

Every fact on this ChatGPT page is tied to a named source and a verification date. Freshness-sensitive figures trace to the sources above; verify against the vendor before relying on them.