Skip to content
New this week26 prompts for Sora, Veo and Runway video workflows.
Explore video prompts→
AIPrompt123Prompt library

Search AIPrompt123

Search prompts, categories, platforms and repositories

Learning resourcesJupyter NotebookMIT

openai/openai-cookbook

The official cookbook is a collection of notebooks and scripts that demonstrate real API patterns. It is not a framework; it is a reference you read when you need to implement a specific technique correctly the first time. Examples are updated as the API evolves.

72.0k stars11.5k forks340 contributors60 open issuesUpdated

What it does

  • Demonstrates API patterns with runnable Python and JavaScript examples.
  • Covers embeddings, RAG, function calling, structured outputs and evaluation.
  • Shows production considerations such as batching, retries and cost control.

Key features

  • Official, maintained examples.
  • Copy-paste notebooks with explanations.
  • Coverage of newer APIs and model capabilities.
  • Community-contributed recipes.

How to install it

Commands are copied from the project documentation at the time of review. Check the repository for the current version.

Use
git clone https://github.com/openai/openai-cookbook.git

Open the notebooks and install the dependencies listed in each.

Alternatives to consider

openai-cookbook is a strong default for learning resources, but the right choice depends on your stack, licence constraints and how much control you need. These are the projects we compare most often.

Anthropic CookbookPrompt Engineering GuideGenerative AI for Beginners

Prompts that pair with it

All prompts →
Verified Knowledge · FAQ

openai-cookbook FAQ

Adoption questions we hear most often about this project.

Related repositories

Learning resources · Python

A curated collection of practical LLM application examples with source code.

65.0k8.1kApache-2.0