The OpenAI Cookbook is a community-driven collection of practical examples, Jupyter notebooks, and guides for working with the OpenAI API. Whether you’re building your first chatbot, designing a multi-agent system, or fine-tuning a model for a specialized domain, you’ll find real working code here.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openai/openai-cookbook/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Make your first OpenAI API call and understand the core concepts in minutes.
Agents & Automation
Build intelligent agents using the OpenAI Agents SDK with tools, handoffs, and guardrails.
Embeddings & Search
Use text embeddings for semantic search, classification, clustering, and recommendations.
Fine-tuning & Evals
Customize models with your own data using SFT, DPO, or Reinforcement Fine-Tuning.
Explore by topic
Models & Prompting
Understand how LLMs work and write better prompts for GPT-5, o-series, and more.
Function Calling
Give models access to external tools and APIs through structured function calls.
Responses API
Use the Responses API for stateful, tool-augmented completions with built-in search.
Vision & Multimodal
Analyze images, documents, and video frames with GPT-4o and GPT-5.4.
Audio & Speech
Transcribe audio with Whisper and generate natural speech with the TTS API.
Image Generation
Create and edit images using DALL-E 3 and GPT Image generation models.
Getting started
Get your API key
Sign up for an OpenAI account at platform.openai.com and create an API key in the dashboard.
Install the Python SDK
Install the official OpenAI Python library to follow along with any cookbook notebook.
Most cookbook examples are written in Python. The concepts apply to any language — the OpenAI API has official SDKs for Python, Node.js, and more, plus a REST API you can call from any HTTP client.