Canonical reference for everything OpenAI ships through the platform API: the GPT-5 / GPT-4o / o-series reasoning model line, the Responses API (the new unified primary endpoint), the legacy Chat Completions + Assistants APIs, automatic prompt caching, function calling + structured outputs, vision + audio + image generation, the Realtime API (WebSocket + WebRTC voice), the Agents SDK (openai-agents-python + JS), batch + Files + fine-tuning, and the Codex CLI. House style matches the Claude / Gemini sub-libraries; every non-obvious claim cites either platform.openai.com/docs, developers.openai.com, an openai/* GitHub repo, or an OpenAI blog post. Where the official docs are silent but behavior is observable, the entry is labelled “Undocumented as of 2026-05-25 — observed behavior” so a future reader knows to verify.
This sub-library lives inside Math-and-Compute/Compute/ alongside Claude/, GoogleGemini/, and the broader compute-systems notes. The OpenAI ecosystem moves fast — the Responses API is now the primary surface (Chat Completions is “previous standard but still supported”), the Agents SDK has become the official agentic-workflow toolkit, and the GPT-5 generation supplanted GPT-4o in 2025. Read this index for the map, then drill into the specific note.
See also
_index — sister sub-library for Anthropic; useful for cross-vendor comparisons
Choosing Responses vs Chat Completions — openai-api-and-sdks has the decision tree; new code should use Responses for everything except simple stateless completions.
Building voice apps — realtime-api-openai — choose WebSocket vs WebRTC based on whether you’re server-side or client-side, audio formats supported, interruption handling.
Model IDs are quoted verbatim (e.g. gpt-5, gpt-5-mini, gpt-4o-2024-11-20, o3-mini, text-embedding-3-large). OpenAI uses date-suffixed pinned snapshots + dateless aliases that resolve to the latest snapshot.
Pricing is in USD per million tokens (MTok). Where multiple \$ symbols appear on the same line they are backslash-escaped to avoid Obsidian MathJax interpretation.
Code examples use the unified openai Python SDK and @openai-ai/sdk Node SDK — both default to the Responses API in new docs; legacy code uses Chat Completions.
“Per platform.openai.com/docs 2026-05” tags a claim sourced from official documentation as of the file’s created date.
“Per openai/openai-python README” or openai/openai-agents-python README tags claims sourced from those repos.
The developers.openai.com MCP server (openai-docs skill on this machine — see AGENTS.md) is the authoritative source for live OpenAI docs since the public web pages are behind a 403 firewall for unauthenticated fetchers; this library uses GitHub-mirrored READMEs + the developers.openai.com MCP where direct docs aren’t fetchable.
Sources read while building this library (2026-05-25 pass)
github.com/openai/openai-python (README + api.md — current SDK surface)
Sections that required inference (rather than direct doc lookup) are flagged in each file under “Undocumented as of 2026-05-25 — observed behavior” so they can be re-verified later. Where the public docs site returned 403, claims were cross-referenced against the openai-python / openai-agents-python / openai-realtime-api-beta repos and OpenAI’s developers.openai.com (accessible via the MCP server on this machine).