openai
openai-cookbook
Jupyter Notebook

Examples and guides for using the OpenAI API

Last updated Aug 10, 2026
75.2k
Stars
12.7k
Forks
241
Issues
+49
Stars/day
Attention Score
100
Language breakdown
Jupyter Notebook 93.1%
MDX 6.9%
โ–ธ Files click to expand
README

OpenAI Cookbook Logo

โœจ 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 OPENAIAPIKEY 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 OPENAIAPIKEY=<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

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท openai/openai-cookbook ยท Updated daily from GitHub