AI/TLDR

OpenAI · 2022-03-11 · notable

OpenAI Cookbook — Official Examples and Guides for the OpenAI API

OpenAI's official collection of example code and guides covering agents, RAG, embeddings, fine-tuning, function calling, multimodal, real-time APIs, and structured outputs. 72.7k stars.

OpenAI Cookbook GitHub repository social card

The single largest collection of runnable OpenAI API examples, maintained by OpenAI.

Key specs

GitHub stars72.7k

What is it?

The OpenAI Cookbook is OpenAI's official repository of example code and guides for building applications with the OpenAI API. It covers the full surface area: prompt engineering, embeddings and semantic search, fine-tuning, agent architectures with the Agents SDK, function calling, vision, audio, Codex, real-time APIs, vector databases, and structured outputs. Most examples are in Python.

How does it work?

Each example is a standalone notebook or script. The cookbook is organized by topic on developers.openai.com/cookbook with a searchable web interface, and the raw notebooks live in the GitHub repo. OpenAI updates it regularly as new API features ship.

Why does it matter?

With 72.7k stars, this is the most-starred AI tutorial repository on GitHub. It is the de facto starting point for anyone building with OpenAI's API. The examples go beyond hello-world — they cover production patterns like evaluation, caching, and cost optimization.

Who is it for?

Developers building applications with OpenAI's API.

Try it

Browse at https://developers.openai.com/cookbook or clone the repo.

Sources · 2 outlets

Tags

  • openai
  • cookbook
  • tutorial
  • agents
  • rag
  • fine-tuning
  • embeddings
  • function-calling

← All releases · Learn AI