OpenAI Cookbook
Example code and guides from OpenAI showing how to do common tasks with its AI models.
- Your data
- Sent to an online service
- Coding needed
- Developers only
- Cost
- Free, but needs an AI account
Example code and guides from OpenAI showing how to do common tasks with its AI models.
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.
Developers who are building with OpenAI's models and want tested starting points.
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.
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?