What it does
The OpenAI Cookbook is a collection of worked examples for using the OpenAI API, the doorway that lets programs talk to OpenAI's models such as the ones behind ChatGPT.
Most examples are written in Python, but the ideas apply to any programming language. The examples can also be browsed on the cookbook's own website.
To run them, you need an OpenAI account and an API key, which is a kind of password for programs.
Who it's for
Developers who are building with OpenAI's models and want tested starting points.
Can I use it without coding?
Developers only. The guides are free to read, but using them means writing or running code with an OpenAI API key. New to this? Start here.
Can I run it?
- Cost
- Free, but needs an AI accountThe software is free, but it uses an online AI service (like OpenAI or Anthropic), which usually charges for use.
- Privacy
- Sends what you give it to an online service
- API key
- Needed. An API key is a password-like code from an online AI service. What's that?
Try it
- Browse the examples and guides on the Cookbook website.
- To run the examples yourself, create an OpenAI account and get an API key.
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page. Copies with similar names exist for many popular projects.
- License (MIT): Very permissive: free to use, change and share, including for business.
- Keep your API key private. Never paste it into websites or share it, and set a spending limit with the AI service.
- What you type or upload is sent to an online service. Avoid sharing private or sensitive information.
- More on staying safe
Where people are talking about it
- Techniques to improve reliabilityHacker News · Jan 2023
- OpenAI CookbookHacker News · Jan 2023