APIChecked
ChatGPT API: How to Get an API Key, Pricing and Codex CLI
If you searched for the ChatGPT API, here is the short answer as of December 2026: the API is a separate product from the ChatGPT app. You get an API key from OpenAI's developer platform, and the usage fees are billed on their own, not through your ChatGPT plan.
SolaFix AI is an independent guide and is not affiliated with OpenAI.
At a glance
The ChatGPT app is for talking to the AI yourself. The API is for programs that talk to it.
Your ChatGPT login does not work for the API. You need a platform account to create an API key.
A Plus subscription costs $20 a month and covers ChatGPT only. API usage fees are separate.
Not a developer? You almost certainly just need the app.
01ChatGPT API vs a ChatGPT subscription
Picture a restaurant. The ChatGPT app is the dining room: you sit down, talk to the waiter and get your meal. The API is the drive-through window. A program pulls up, places an order by itself and drives off with the answer. Same kitchen, two different doors.
That is why the billing is separate too. Your Plus subscription costs $20 a month on the ChatGPT website, and its usage limits apply to ChatGPT only. API usage fees are charged on their own, so paying for Plus does not make the API free.
For example
Rosa, who runs a flower shop, uses ChatGPT on her phone to write short product descriptions. She types, reads the answer and copies it. She only needs the app. There is nothing to set up on the API side.
Ken, a hobby coder, wants his own little program to send questions to the AI automatically. A program has to place the order, so he needs the API. He creates a platform account and an API key, and he pays usage fees separately from any ChatGPT plan.
Priya, a retiree trying AI for the first time, just wants to ask about recipes and travel. The app does that. She can ignore the API entirely.
02How to get a ChatGPT API key
An API key works like a building access card. The program shows the card at the door, and the building lets it in and knows whose account to charge. Keys are created on OpenAI's developer platform, not inside the ChatGPT app. The API docs are the place to follow the current steps, since screens can change.
Open the API docs with the button below and go to the platform account page. Your ChatGPT sign-in is not the same as a platform account.
Sign in to your platform account, or create one if you do not have it yet.
Create an API key by following the instructions in the API docs.
Use the key in your own code or tool, and keep it private.
Never share your API key or paste it into a public place. It is an access card: anyone holding it can run requests on your account, and the fees land on you.
The official API documentation is the starting point for keys and setup.
Open the OpenAI API docsThis opens OpenAI's developer documentation.
03ChatGPT API pricing: where to look
API pricing has its own page, separate from the ChatGPT plan prices. Think of it as a different menu: the dining room has set meals, the drive-through has its own price board. This guide does not list per-request prices, so check the official API pricing page for the current rates.
For comparison, here are the ChatGPT plan prices in the US as of December 2026. None of them include API usage.
Free$0
Go$8 a month
Plus$20 a month
Pro 100$100 a month
Pro 200$200 a month
Pro 500$500 a month
The API rates are on OpenAI's API pricing page.
See OpenAI API pricingPlan prices for the ChatGPT app are covered in our ChatGPT pricing guide.
04OpenAI Codex CLI install
A CLI (command line interface) is a program you run by typing commands instead of clicking buttons. Many people search for the Codex CLI install command. Here is the honest answer: no verified install command is available as of December 2026, so none is listed on this page.
Copying a command from a random website is like taking a stranger's key and trying it in your front door. Follow OpenAI's official documentation for the current install steps instead.
One related detail: creating or using a ChatGPT account does not normally need phone verification, but exceptions can apply, such as for some Codex desktop use. If you are asked for a phone number there, that is the likely reason.
05Codex and ChatGPT plans
OpenAI's plan notes mention Codex usage under the Pro 200 plan, which costs $200 a month. There, usage follows plan limits. Before you count on it for heavy work, check your account screen and the Pro tier help article for the current numbers.
06ChatGPT API errors and login problems
Messages such as "Something went wrong." or "A network error occurred." come from the ChatGPT website and app. For those, check the status page and turn off any VPN or proxy first. Our ChatGPT down and error guide goes through each message.
If your ChatGPT sign-in fails, see ChatGPT login problems. For API questions, use the API docs. To reach OpenAI support, use the chat bubble on the help center.
Q&AFAQ
Is the ChatGPT API free with a ChatGPT Plus subscription?
No. API usage fees are charged separately from your Plus subscription, which costs $20 a month for ChatGPT itself.
Can I use my ChatGPT login for the API?
No. ChatGPT sign-in and API platform authentication and billing are separate. You need a platform account to create an API key.
Where do I get a ChatGPT API key?
Create it on OpenAI's developer platform by following the API docs. It is not created inside the ChatGPT app.
How much does the ChatGPT API cost?
Check OpenAI's API pricing page for current rates. This page does not list per-request prices.
What is the install command for OpenAI Codex CLI?
No verified install command is available here. Follow OpenAI's official documentation for the current steps.
Do I need the API if I only want to chat with ChatGPT?
No. The ChatGPT app and website are for chatting. The API is for programs you build or use that talk to the AI directly.
Related guides
ChatGPT: everything in one place
Prices, limits and links were checked on December 6, 2026. SolaFix AI is not affiliated with OpenAI.