OpenAI API
GPT-5.6, GPT-5.6 Mini, embeddings, and vision — every error, every fix.
180+ errors documentedModel catalog & pricing
GPT-5.6
Flagship reasoning and multimodal. Production default for chat, extraction, coding, agents.
GPT-5.6 Mini
High-volume, cost-sensitive workloads: classification, routing, embeddings preprocessing.
o4-mini
Structured reasoning with thinking tokens; best for math, code, hard analytical tasks.
text-embedding-3-large
Embeddings for RAG, semantic search, similarity. 3,072 dimensions.
API endpoints
- Chat Completions/v1/chat/completions
The primary endpoint for chat, function calling, and streaming.
- Responses API/v1/responses
Newer unified endpoint for chat, tools, structured output — simpler shape than chat completions.
- Assistants API/v1/threads
Stateful assistants with threads, file search, and code interpreter.
- Realtime API/v1/realtime
WebSocket-based low-latency voice and multimodal streaming.
- Batch API/v1/batches
Asynchronous processing at 50% discount.
- Embeddings/v1/embeddings
Vector embeddings for text-embedding-3 models.
Errors by category
Requests-per-minute or tokens-per-minute exceeded for your tier.
Daily token budget hit; resets at UTC midnight.
Usage limit reached for billing period.
Hard billing limit hit; raise in dashboard.
Exceeded your tier's rate limit; upgrade tier for higher ceiling.
API key invalid, revoked, or from wrong project.
OpenAI-Organization header references non-existent org.
Payment method needs updating.
Key doesn't have permission for this resource.
Billing account inactive due to failed payment.
Request body violates schema or has missing fields.
Total tokens exceed model's context window.
Model ID doesn't exist or isn't accessible to your org.
Model past deprecation date; migrate to current.
Model exists but your org tier can't access it.
max_tokens exceeds model's output ceiling.
Function arguments don't match schema.
Model called a function not in your tools.
Schema violates strict-mode constraints.
Response not parseable JSON despite response_format.
response_format conflicts with tools + tool_choice.
Rate limits & quotas
OpenAI uses a 5-tier system (Tier 1 through Tier 5) based on payment history and spend. Higher tiers unlock higher rate limits, lower per-token pricing (via committed spend), and access to newer models.
# 2026 approximate limits — verify current values in OpenAI dashboard
Tier 1 (default, $5+ payment history):
RPM (per model): 500 (chat), 3,000 (embeddings)
TPM (per model): 30,000-60,000
Tier 2 ($50+ spent, 7 days ago):
RPM: 5,000
TPM: 80,000-450,000
Tier 3 ($100+ spent, 7 days ago):
RPM: 5,000
TPM: 160,000-1,000,000
Tier 4 ($250+ spent, 14 days ago):
RPM: 10,000
TPM: 800,000-2,000,000
Tier 5 ($1,000+ spent, 30 days ago):
RPM: 10,000
TPM: 2,000,000-10,000,000
Enterprise: Custom via sales — typical 10-30% discount at $100K+/month.
Rate-limit headers appear on every response:
x-ratelimit-remaining-requests: 4998
x-ratelimit-reset-requests: 30s
x-ratelimit-remaining-tokens: 79500
x-ratelimit-reset-tokens: 30s
When you hit 429, the response body includes retry-after in seconds. Different models have separate rate-limit buckets — you can hit the GPT-5.6 limit while GPT-5.6 Mini still has capacity, which is the basis for the model-routing pattern in G10.
Related pillar guides
G1. Handling Rate Limits Across AI APIs
Rate limit patterns for OpenAI's tier structure, including per-model bucket routing.
G7. Function Calling Reliability Patterns
OpenAI function calling in production with strict mode, tool_choice, and multi-tool orchestration.
G8. Structured Output Reliability
OpenAI's response_format with strict mode, additionalProperties constraints, and repair patterns.
G4. Fallback Strategies: Claude → GPT → Gemini
OpenAI as the second or first fallback in a multi-provider stack.
Related blog posts
Frequently asked questions
What's the difference between chat completions and the Responses API?
Chat completions is the classic endpoint (messages array in, choices out). Responses is the newer unified endpoint that simplifies tool use and structured output. For new code, use Responses. For existing code, chat completions continues to work indefinitely. Both endpoints support all current models.
How do OpenAI tiers work?
Tiers are based on cumulative spend + time since spend. Each tier unlocks higher rate limits and sometimes model access. You move up automatically based on spending. To skip ahead, contact sales for enterprise tier. Once you're at Tier 5, further limit increases are custom negotiations.
What's the max context window for GPT-5.6?
300K tokens as of 2026. This is the input context; max_tokens for output is separately configurable up to model-specific ceilings (typically 16K-32K). Practical advice: don't send maximum context by default — cost grows linearly with input tokens and quality degrades at extreme lengths.
Is OpenAI's Realtime API worth it?
For voice apps yes, for chat no. Realtime provides low-latency bidirectional audio streaming — the right choice for phone agents, voice assistants, live translation. For text chat, the extra WebSocket complexity isn't worth it; SSE streaming on chat completions is simpler and sufficient.
How does the Batch API work?
Submit a JSONL file with up to 50K requests; OpenAI processes them asynchronously and returns results within 24 hours. 50% off input and output pricing. Best for: nightly summarization, evaluation runs, dataset generation, any workload without a real-time constraint.
Should I use fine-tuning?
Only when prompt engineering plus RAG isn't enough. Fine-tuning is expensive (training data curation, iterative training, evaluation) and locks you into your fine-tuned model. Most workloads that seem to need fine-tuning don't — they need better prompts, better examples, better retrieval. Try those first.
What's the difference between o-series and GPT models?
o-series (o1, o3, o4-mini) uses thinking tokens — the model deliberates before answering, producing better results on math, code, and structured reasoning at the cost of higher output tokens and higher latency. GPT models respond more quickly and cheaply. Use o-series for the hard 5-10% of your workload; GPT for the rest.
How does OpenAI handle data privacy?
API data is not used to train models by default (opt-in required, and only for specific programs). Enterprise DPAs give additional guarantees. Zero-data-retention endpoints available for regulated workloads. HIPAA and SOC 2 covered under enterprise agreements.