
AI and APIs
An introduction to accessing and using the ChatGPT API

What is an API?

Laptop icons created by Freepik - Flaticon (flaticon.com/free-icons/laptop); Server icons created by Elias Bikbulatov - Flaticon (flaticon.com/free-icons/server); Automation icons created by Becris - Flaticon (flaticon.com/free-icons/automation)
Why use an API?

Laptop icons created by Freepik - Flaticon (flaticon.com/free-icons/laptop); Server icons created by Elias Bikbulatov - Flaticon (flaticon.com/free-icons/server); Automation icons created by Becris - Flaticon (flaticon.com/free-icons/automation)
Log in to your ChatGPT account
To use the API, you need an authorized account at https://auth.openai.com/log-in.
You can sign up with OpenAI or use your Google (or other) login credentials.

OpenAI Playground tab
The basic chat interface you’ve probably seen before:

OpenAI API documentation tab
Overview of the OpenAI API. We’ll come back to this later.

OpenAI Developer documentation tab
Instructions on accessing OpenAI API through the OpenAI Python library

OpenAI Settings tab
We need to set up an API key and put up a little credit to use the API

OpenAI Settings tab: billing
Add credit under Settings –> Billing (min $5, but expires after 1 year)

OpenAI Settings tab: API keys
Generate a new API key under Settings –> Billing
