Skip to main content
7BBusyBoss

openai-cookbook

by openai

Examples and guides for using the OpenAI API

74,316 stars🍴 12,579 forksJupyter NotebookUpdated 6/22/2026recipesofficialchatgptgpt-4openaiopenai-api

About openai-cookbook

openai-cookbook is a Jupyter Notebook open-source prompt engineering project by openai. Examples and guides for using the OpenAI API With 74,316 GitHub stars and 12,579forks, it's one of the Prompt Engineering tools worth knowing. You can download the source, browse it on GitHub, or read the full setup guide in the README below.

From the project README

<a href="https://cookbook.openai.com" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="/images/openai-cookbook-white.png" style="max-width: 100%; width: 400px; margin-bottom: 20px"> <img alt="OpenAI Cookbook Logo" src="/images/openai-cookbook.png" width="400px"> </picture> </a>

✨ Navigate at cookbook.openai.com

Example code and guides for accomplishing common tasks with the OpenAI API. To run these examples, you'll need an OpenAI account and associated API key (create a free account here). Set an environment variable called OPENAI_API_KEY with your API key. Alternatively, in most IDEs such as Visual Studio Code, you can create an .env file at the root of your repo containing OPENAI_API_KEY=<your API key>, which will be picked up by the notebooks.

Most code examples are written in Python, though the concepts can be applied in any language.

For other useful tools, guides and courses, check out these related resources from around the web.

License

MIT License

openai-cookbook — FAQ

What is openai-cookbook?

Examples and guides for using the OpenAI API

Is openai-cookbook free to use?

Yes. openai-cookbook is open-source and free. You can browse the source on GitHub or download it here at no cost — no signup required.

How do I install and run openai-cookbook?

Download the latest source as a ZIP from GitHub (or clone the main branch), then follow the setup steps in the README below.

What language is openai-cookbook written in?

openai-cookbook is primarily written in Jupyter Notebook.

How popular is openai-cookbook?

openai-cookbook has 74,316 stars and 12,579 forks on GitHub, and was last updated 6/22/2026 — a useful signal of how actively it's maintained and trusted by developers.

More Prompt Engineering skills

See all Prompt Engineering