The OpenAI API is a paid interface that lets your website, app or automation use OpenAI models, the same technology behind ChatGPT, without the chat window. You pay for usage in tokens, not a monthly subscription. It pays off when a business wants AI inside its own processes: an online store, CRM, customer support or document processing.
In brief:
- The OpenAI API (also searched as the ChatGPT API) is billed separately from ChatGPT plans.
- Pricing is per million tokens, input and output separately: $0.10 to $50 as of October 2026.
- You create an OpenAI API key on the OpenAI Platform after buying credit (minimum $5).
- A key never belongs in browser-side website code or a mobile app.
OpenAI API vs. ChatGPT
ChatGPT is an app for people, paid by subscription. An API is an interface for software: your system sends the model text or a document and processes the reply, paying by usage. Developers work in the OpenAI Platform (platform.openai.com), with keys, projects and billing. ChatGPT itself is covered in our ChatGPT guide.
According to OpenAI, API data is not used for training by default and is kept for up to 30 days to detect abuse. For GDPR, you can sign a data processing addendum (DPA).
OpenAI API pricing: what the API costs
You pay for tokens, chunks of text (about 4 characters in English; the Tokenizer tool shows exact counts). Input and output are billed separately, and output costs several times more. Prices per OpenAI’s documentation as of October 2026 (standard processing, shorter context, per 1 million tokens):
| Model | Best for | Input | Output |
|---|---|---|---|
| GPT-6 Astra | the most demanding tasks | $10 | $50 |
| GPT-6.1 Sol | everyday business work | $2 | $10 |
| GPT-6 Luna | fast, high-volume tasks | $0.10 | $0.50 |
What lowers or raises the price
- Cached input: a repeated start of a request (e.g. the same chatbot instructions) is 10 to 20 times cheaper.
- Batch API, Flex, Fast mode: Batch is 50% cheaper with results within 24 hours, Flex is cheaper but slower, Fast mode is faster and pricier.
- Surcharges: very long context, regional processing (data residency, +10%) and tools such as web search.
A cost example
A model example, not a client: a fictional coffee store wants 1,000 product descriptions (about 500 tokens of instructions and 400 tokens of text each) and a chatbot for 3,000 conversations a month (about 4,000 input and 500 output tokens each).
| Task | GPT-6 Luna | GPT-6.1 Sol | GPT-6 Astra |
|---|---|---|---|
| 1,000 product descriptions | $0.25 | $5 | $25 |
| Chatbot, 3,000 conversations | $1.95 | $39 | $195 |
Tokens are usually the smallest cost; development, integration and testing cost more.
Credit and limits
Credit is prepaid: $5 minimum, valid for one year, generally non-refundable. Auto recharge is on by default, so set a hard monthly spending limit right away; alerts alone do not stop traffic. Rate limits rise with your total credit purchases.
OpenAI API key: how to get one
- 1Sign in to the OpenAI Platform. You can use your ChatGPT account, but billing is separate.
- 2Sign in to the OpenAI Platform (same account as ChatGPT, separate billing).
- 3Create a project per app. Data processing in Europe can only be chosen when creating a project (eligible accounts and endpoints).
- 4Under API keys, create a key and store it in a password manager.
- 5Set a monthly limit for the project and store the key in the `OPENAI_API_KEY` environment variable.
A ChatGPT API key and an OpenAI API key are the same thing: your app’s secret key, against which usage is billed.
API key security checklist
- A separate key for every person and app; OpenAI does not support sharing keys.
- No keys in website JavaScript or mobile apps; route requests through your own server.
- No keys in Git or email; only environment variables or a secrets manager.
- Key expiry and rotation; if you suspect a leak, revoke the key at once.
A leaked key lets anyone spend your credit. See our website security checklist.
OpenAI Playground: test without coding
The OpenAI Playground is a web interface on the OpenAI Platform: enter instructions and test input, pick a model and see the result. It shows whether a cheaper model will do before you pay for development; usage is billed like the API. OpenAI is deprecating saved prompts in the API (`v1/prompts` is due to shut down on November 30, 2026), so keep prompts in versioned code. See our guide on how to write prompts.
OpenAI API models: how to choose
The table above shows what each model is for. Start with the cheapest one that holds up on 20 to 30 of your real examples; pay more only where the difference shows. The API also offers image, transcription and voice models. OpenAI retires older models, so make the model easy to swap.
Using the OpenAI API in business
Illustrative examples, not our clients:
- Coffee store: product descriptions and translations via the Batch API, grouping reviews by topic.
- Accounting firm: extracting invoice data into the accounting system, with a human check.
- Construction company: summarizing email enquiries into the CRM and drafting replies for sales.
A sample prompt: `From the invoice text, return JSON with the fields supplier, company_id, due_date, total_incl_vat. If a value is missing, return null and do not guess.`
The model can be wrong or make data up (hallucination), so a person checks figures and prices.
Azure OpenAI: when to use it instead
Azure OpenAI (officially Azure OpenAI in Microsoft Foundry Models) provides OpenAI models run by Microsoft, billed through Azure and covered by Azure SLAs. According to Microsoft, prompts and outputs are not available to OpenAI or used for training; the EU Data Zone deployment keeps processing within the EU Data Boundary. Azure OpenAI pricing depends on the deployment type (pay per token, reserved PTU capacity, Batch at 50% less), listed in the Azure price list.
The Azure OpenAI service suits companies on Azure and Microsoft 365 or with strict compliance needs; small firms usually do fine with the direct API.
Gemini API key and other alternatives
Google works similarly: you create a Gemini API key in Google AI Studio and store it in `GEMINI_API_KEY`. Google uses free-tier content to improve its products, so company data belongs on the paid tier. More in our Google Gemini guide; Anthropic’s API is in our Claude AI guide.
When to bring in a specialist
A key and a first test take an hour. A specialist pays off when the API should handle customer data, connect to your store, CRM or accounting and run unattended. Our agency works with ChatGPT, Claude and AI agents daily. We design the solution, calculate running costs and build it as a web application with a securely stored key. Tell us your plan via our contact form.
Frequently asked questions
How much does the OpenAI API cost?
How do I get an OpenAI API key?
Is the OpenAI API included in ChatGPT Plus?
What is the OpenAI Playground?
What is the difference between the OpenAI API and Azure OpenAI?
Does OpenAI use API data to train its models?
Sources

Written by
Peter GáboríkProject Manager – AI, Automation & SEO
Project manager and founder of Weboptim. Builds growth strategies around SEO, automation and AI; in online marketing since 2017.
Related service
Tips that save time – once a month
One e-mail a month: a new guide, the automation of the month and one number from practice. No spam.



