← all repositories
openai/openai-cookbook

74K stars, one API key, still need a recipe

OpenAI's official notebook collection for developers who know the API exists but not what to do with it.

74.1k stars Jupyter Notebook LearningLanguage Models
openai-cookbook
Velocity · 7d
+48
★ / day
Trend
steady
star history

What it does A curated stack of Jupyter notebooks and guides showing how to accomplish common tasks with the OpenAI API — embeddings, fine-tuning, function calling, prompt engineering, and the usual suspects. Most examples are Python, though the concepts port elsewhere. You’ll need an OpenAI account and an OPENAI_API_KEY environment variable (or a root-level .env file) to run anything.

The interesting bit It’s official documentation that actually admits it’s documentation. The README is almost aggressively humble — no benchmarks, no architecture diagrams, just “here’s some code that works.” The companion site at cookbook.openai.com suggests someone realized GitHub’s file browser is a lousy way to read a cookbook.

Key highlights

  • Covers GPT-4, ChatGPT, and the broader OpenAI API surface
  • MIT licensed, so lift and adapt freely
  • Includes a “related resources from around the web” page — rare humility from a platform owner
  • .env file support noted explicitly for VS Code users
  • 74K stars makes it one of the most popular notebook repos on GitHub

Caveats

  • README is thin; you don’t know what’s actually covered until you browse the notebooks
  • Requires an OpenAI account with billing set up — no free-tier sandbox implied
  • “Concepts can be applied in any language” is technically true, but all examples are Python

Verdict Worth bookmarking if you’re building with OpenAI and tired of Stack Overflow answers from 2023. Skip it if you need deep architectural patterns or multi-provider abstraction — this is vendor-specific sample code, not a framework.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.