OpenAI Cookbook

2026-07-25 · source · source ↗ · raw capture · wiki page

The OpenAI Cookbook is a collection of example code and guides for the OpenAI API, maintained by OpenAI. It lives both as a website at developers.openai.com and as an open-source GitHub repository under the MIT License.

Most examples are in Python, covering nine topical areas: Agents, Evals, Multimodal, Text, Guardrails, Optimization, ChatGPT, Codex, and gpt-oss. The repo is organized into examples/ (notebooks and code), articles/ (written guides), and supporting metadata files.

The cookbook page surfaces OpenAI's broader developer platform: the Responses API, streaming, WebSocket, multi-agent support, MCP and Connectors, tools (function calling, web search, file search, code interpreter, computer use), voice agents, and realtime transcription.