How to get an OpenAI API key
Updated · 2 min read
An OpenAI API key lets apps use OpenAI's GPT models, image generation and speech models under your own OpenAI organization. You pay OpenAI per token, with no app markup. This is separate from a ChatGPT Plus or Pro subscription: the key comes from the OpenAI Platform at platform.openai.com.
Step by step
- Sign in at platform.openai.com with your OpenAI account, or create one.
- Add billing. In Settings → Billing, add a payment method and some credit. OpenAI uses pay-as-you-go pricing, and after you add billing it sets an approved usage limit for your organization.
- Open the API keys page at platform.openai.com/settings/organization/api-keys and create a new secret key.
- Choose a project and an expiration. OpenAI recommends an expiration date for project keys. Name the key after the app you'll use it in.
- Copy the key (it starts with
sk-) and paste it into the app's settings, usually under Providers → OpenAI.
What it costs
Prices per million tokens on OpenAI's pricing page, 2026-10-23 (standard tier, prompts up to 272K tokens):
| Model | Input | Output |
|---|---|---|
| gpt-6-astra (flagship) | $10.00 | $50.00 |
| gpt-6.1-sol | $2.00 | $10.00 |
| gpt-5.6-terra | $2.00 | $12.00 |
| gpt-5.4-mini | $0.75 | $4.50 |
| gpt-5.6-luna | $0.20 | $1.20 |
| gpt-5.4-nano | $0.20 | $1.25 |
For a chat turn of about 2,000 tokens in and 500 out, gpt-5.6-luna costs around $0.001 (about 5,000 turns for $5), gpt-6.1-sol about $0.009, and the flagship gpt-6-astra about $0.045. Most BYOK apps let you pick the model per chat, so you can use a cheap model by default and a bigger one when it matters.
Usage tiers and limits
OpenAI places each organization in a usage tier based on how much credit it has bought in total:
| Tier | You qualify after buying | Monthly usage limit |
|---|---|---|
| Free | (available in supported countries) | $100 |
| Build | $5 | $500 |
| Launch | $100 | $5,000 |
| Grow | $500 | $200,000 |
Higher tiers also get higher rate limits. You'll find your tier and limits under Settings → Organization → Limits.
Keep the key and the bill under control
- Spend alerts: set them on the Limits page to get an email when usage passes an amount.
- Hard spend limits stop API traffic once tracked spend reaches the limit. Set one before giving a key to a new app.
- Separate projects (for example "personal apps" and "experiments") can each have their own rate and spend limits.
- Rotate and revoke: create a replacement key, update the app, then revoke the old key. Never paste keys into public code or shared documents.
- Prefer apps that keep the key on your device and call OpenAI directly.
Apps that work with your OpenAI API key

VisitAnythingLLM
Free · macOS, Windows, Linux · Open source
Private AI app for chatting with your documents. Runs local models or connects to OpenAI, Anthropic, Gemini and others with your key.
Works with:OpenAIAzure OpenAIAnthropicGoogle Gemini+9 more





Direct key or a gateway?
A direct OpenAI key is best if you mostly use GPT models and want OpenAI's own limits and dashboards. If you switch between providers a lot, an OpenRouter key gives you OpenAI, Claude, Gemini and open models from one balance. For free options, see free AI API keys.
Questions
Can I use my ChatGPT Plus subscription as an API key?
No. ChatGPT plans cover the ChatGPT apps. API usage is billed separately on the OpenAI Platform, per token, to your organization.
What does an OpenAI API key look like?
Keys start with sk- (project keys with sk-proj-). OpenAI shows the full key once, when you create it.
Why is my new key so limited?
New organizations start on a low usage tier. Your tier, and with it your monthly usage limit and rate limits, goes up automatically as your total credit purchases pass $5, $100 and $500.
How do I stop a runaway bill?
Set a spend alert and, for a hard stop, a spend limit on the Limits page. Hard spend limits block API traffic once tracked spend reaches the limit. Projects can have their own limits.
Sources
Checked against the providers' own documentation on 2026-10-23. Prices and limits change; the links below have the current figures.