OpenAI Account Setup
Module 1 explained what OpenAI is. Here we actually open an account, turn on billing, and create the API key that LangChain will read. Still no LangChain code — only platform clicks.
What you need
An email address you can verify. A phone number is sometimes asked during signup. For API calls you also need a payment method on file — usage is billed per token, not a flat monthly ChatGPT plan. Check current rates on the pricing page before you run large tests.
If you already use ChatGPT for free, that login does not automatically give you API credits. The developer side lives at platform.openai.com — a separate dashboard we covered in Lesson 2.
Create the platform account
Go to platform.openai.com/signup. Google, Microsoft, Apple, or email all work. This is the developer platform — not the ChatGPT chat window at chat.openai.com.
Welcome to OpenAI
Sign up or log in to use the API, manage keys, and view usage.
Already have ChatGPT? Use the same email — the platform account links to it.
After login: the home page
Once you sign in, OpenAI opens platform.openai.com/home. The left sidebar lists API keys, usage, and settings. The centre panel shows a short Get started checklist and your current credit balance.
Before you create a key, add credits. On the home page, find the Credit balance card and click Add credits. That opens the plan and checkout flow in the next step.
Home
Create API keyGet started
Total tokens
0
Responses and Chat Completions
0
Time spent
$0.00
Credit balance
$0.00
Add creditsTotal requests
Add billing
After you click Add credits on the home page, OpenAI opens the plan picker below. For this course, Prototype with $5 in API credits is enough — it unlocks full model access for small scripts like the HTML tutorial helper.
Select Prototype, keep the default $5 credits, then click Continue to checkout and add a card. If you already have a balance, top up from Settings → Billing instead. Without payment on file, API requests fail even if you already created a key.
Choose your plan
Start experimenting for free or unlock more usage to build your idea.
Free
Experiment with the API to explore your idea.
- ✓Free
- ✓Limited access to certain models
- ✓Usage limits per minute / day
- ✓Start building for free with the API in Codex and limited access to Playgrounds
Prototype
Build lightweight prototypes to evaluate the API.
- ✓Starting at $5
- ✓Access all of our latest models
- ✓Enough usage to power prototypes and small apps
- ✓Accelerate building with the API in Codex and Playgrounds
Accelerate
Launch your apps to production with our API.
- ✓Starting at $50
- ✓Access all of our latest models
- ✓Higher usage & rate limits to power larger, production apps
- ✓Accelerate building with the API in Codex and Playgrounds
$5 can cover about 25 million input or 4 million output tokens. Plenty to start building your idea.
This is not ChatGPT Plus. You are prepaying for API tokens — see current rates on the pricing page.
An example: one key for this course
We will call OpenAI from a small script tied to the HTML tutorial helper idea in Lesson 4. Create one key named langchain-course-dev so you can spot it in the usage logs later.
- Open API Keys in the left sidebar.
- Click Create new secret key.
- Enter the name, leave permissions on All for now.
- Copy the full
sk-…string when prompted.
Create new secret key
✕langchain-course-dev is enough.API keys
+ Create new secret key| Name | Status | Secret Key | Created | Last used |
|---|---|---|---|---|
| langchain-course-dev | ✓ Active | sk-…Na8A | 7 Jun 2026 | Never |
OpenAI shows the full key once after creation. Copy it immediately — you cannot view it again from this table.
Store the key locally
Paste the key into a .env file at the root of your project folder. LangChain examples expect the variable name OPENAI_API_KEY. Never commit this file to GitHub or paste the key into a chat message.
.env file. Add .env to .gitignore so it never lands in a public repo.If the key leaks, revoke it on the API Keys page and generate a fresh one. Treat it like a bank PIN — one string, full access to your balance.
What's Next
Account and key are in place. Next: install Ollama and run an open model locally on your PC.