i ideas / repo launcher
openai avatar

openai/openai-cookbook

★ 77,049Jupyter NotebookMIT95

Examples and guides for using the OpenAI API

What it is

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= , which will be picked up by the notebooks.

When to use it

Reach for openai-cookbook when you want to learn a topic, find more tools, or borrow battle-tested prompts and examples — it's written in Jupyter Notebook and fits stacks tagged chatgpt, gpt-4, openai, openai-api.

Category
Learning & Lists
Also in
LLM & Inference
Stars
77,049
Forks
13,054
Last push
today
Created
2022-03-11
Open issues
359
Website
cookbook.openai.com

Quick start

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

Hand it to your AI

Read https://ideas.asveas.com/r/openai/openai-cookbook.md and help me add openai/openai-cookbook to my project. Explain the setup steps for my stack and show the minimal code to get it working.

Alternatives to openai-cookbook

All Learning & Lists →

Pairs well with

FAQ

What is openai-cookbook?

openai/openai-cookbook is a learning resource on GitHub: Examples and guides for using the OpenAI API Example code and guides for accomplishing common tasks with the OpenAI API.

When should I use openai-cookbook?

Reach for openai-cookbook when you want to learn a topic, find more tools, or borrow battle-tested prompts and examples — it's written in Jupyter Notebook and fits stacks tagged chatgpt, gpt-4, openai, openai-api.

What are the best alternatives to openai-cookbook?

Popular alternatives in Learning & Lists: public-apis/public-apis (498k★), nilbuild/developer-roadmap (372k★), f/prompts.chat (177k★), Shubhamsaboo/awesome-llm-apps (144k★), codecrafters-io/build-your-own-x (562k★).

Is openai-cookbook actively maintained?

openai/openai-cookbook looks very actively maintained: the last push was today (2026-11-11), with 77,049 stars and 359 open issues.

What license does openai-cookbook use?

openai/openai-cookbook is published under the MIT license. Check the repository's LICENSE file before commercial use.