The Techno-WitchWe read the fine print so you don't have to.

Consult the almanac

Turning the pages…

Arrow keys to move, Enter to open, Esc to close. Every answer links to a dated page.



Guides · Familiars

OpenAI API Key: How to Get One and What It Costs

Create an OpenAI API key on the API key page, then add prepaid credits ($5 USD minimum). It's billed separately from ChatGPT Plus.

Some links on this site may earn us a commission. It never changes a price, a verdict or what we tell you to skip. How we make money.

In this story (8 sections)
  1. A ChatGPT subscription is not an API key
  2. The summoning: how to create your API key
  3. Store it like a secret, not a sticky note
  4. The key safety rules OpenAI spells out
  5. Project keys, permissions and service accounts
  6. Billing: prepaid credits and the $5 minimum
  7. Usage limits and spend caps
  8. What to do next

You create an OpenAI API key on the API key page of OpenAI's developer platform, and you pay for what it uses with prepaid credits that start at a $5 USD minimum. Your ChatGPT Plus subscription doesn't cover any of it: the API is billed separately.

Everything here is as of November 30, 2026.

A ChatGPT subscription is not an API key

Searched "chat gpt api key"? Here's the catch. ChatGPT Plus is the chat app at $20 a month, and OpenAI says it outright: "API usage is separate and billed independently." ChatGPT Business bills the API separately too, though it can come with monthly API credits (below).

There's one overlap. Monthly API credits come with ChatGPT Pro and Business only: Pro 100 gets $100 USD, Pro 200 gets $200 USD and Pro 500 gets $500 USD per monthly period, and monthly Business workspaces get a pooled amount per paid seat (see our OpenAI API pricing guide). "Plus, free trials, Enterprise, and Edu don't qualify."

If all you want is to chat, skip the key. Our ChatGPT pricing guide covers Go at $8 a month and Plus at $20 a month.

The summoning: how to create your API key

OpenAI's help center keeps it short: "You can create and manage your API keys on the API key page." That page lives at platform.openai.com/api-keys.

Keys belong to projects. To make a project-scoped key:

  1. Open your organization settings and select the project.
  2. Click API Keys.
  3. Click "+ Create new secret key".

The help article gives no more steps than that, and labels can shift, so look for those words.

Copy it now. "A full secret key is only shown when you create it." If you lose it, there's no recovery: create a new key and update your app. To delete one, click the trash can icon beside it on the API key page, and that key stops working.

Store it like a secret, not a sticky note

The developer quickstart has you put the key in an environment variable called OPENAI_API_KEY, and "each OpenAI SDK automatically reads your API key from the system environment."

System Command
macOS or Linux export OPENAI_API_KEY="your_api_key_here"
Windows PowerShell setx OPENAI_API_KEY "your_api_key_here"

The key safety rules OpenAI spells out

OpenAI's API key safety guide reads like a list of ways people get burned:

  • Never put it in a browser or phone app. "Never deploy your key in client-side environments like browsers or mobile apps."
  • Never commit it to a repository.
  • One key per person. Give each team member a unique key.
  • Set expiration dates and rotate keys.
  • In production, use a key management service, and turn on spend limits with hard enforcement and IP allowlisting.
  • Where it's supported, OpenAI recommends workload identity federation, which uses short-lived access tokens instead of long-lived keys.

If a key leaks: rotate it immediately from the API Keys page, update your production apps, check the Usage page for spend you don't recognize, and contact support through help.openai.com.

Project keys, permissions and service accounts

Each project has its own keys, so a side project never has to share one with your main app. Per OpenAI's projects guide:

Permission level What it allows
All Everything (the default)
Restricted Set per endpoint: None, Read or Write
Read Only Read access

Service accounts are scoped to one project. Their key is shown at creation and can't be viewed again, and by default a service account "can read and write all API resources in its project." Owners can create and view all keys; members can create project-level keys.

Our take: for anything you share or deploy, use a Restricted key on its own project. If it leaks, the blast radius stays small.

Billing: prepaid credits and the $5 minimum

A key does nothing until there's money behind it. New accounts start on prepaid billing:

  • Minimum purchase: $5 USD. The default amount is $10 USD.
  • Expiry: credits expire after one year. Credits bought in Japan after November 13, 2026 expire after 180 days.
  • Refunds: credits are non-refundable unless required by law or contract, or an approved exception applies.
  • Auto-reload: on by default during setup, with a $5 USD minimum recharge.

Since credits expire, a big first top-up is a gamble. Buy small, and switch off or cap auto-reload if you don't want surprise charges.

Whether new accounts get any free credits isn't stated on OpenAI's pricing page, so check developers.openai.com/api/docs/pricing before counting on any. Per-token rates live there too, and our OpenAI API pricing guide walks through them.

Usage limits and spend caps

OpenAI caps how much you can spend through usage tiers, which upgrade automatically as your total credit purchases grow:

Tier Total credit purchases Monthly usage limit
Free (allowed geography) None $100 USD a month
Build $5 USD $500 USD a month
Launch $100 USD $5,000 USD a month
Grow $500 USD $200,000 USD a month

That's OpenAI's ceiling, not your budget. Set your own spend limit under Organization limits > Spend > Edit spend limit, or per project under Project settings > Limits, and turn on "Enforce a hard limit." Alerts alone don't stop spending, and enforcement isn't instant, so leave some headroom.

API data isn't used for training unless you opt in. Abuse-monitoring logs are kept for up to 30 days.

What to do next

  • Just want to chat: you don't need a key. See is ChatGPT free or our ChatGPT pricing guide.
  • Weekend project: buy the $5 USD minimum, cap auto-reload, set a hard project limit, then create a Restricted key.
  • On ChatGPT Pro or Business: claim your monthly API credits before you buy any.
  • Shipping an app: keep the key on your server, never in the browser or phone app, and rotate it on a schedule.
  • Shopping around: our Claude pricing and Google AI Studio guides cover the rivals.

Receipts

Official pages behind this story, read Nov 30, 2026
  1. help.openai.com
    Where do you create an API key? · Is the key shown only once?
  2. help.openai.com
    Exact steps to create a key? · Project keys, service accounts, permissions?
  3. developers.openai.com
    How to store it as an environment variable?
  4. help.openai.com
    Key safety rules? · What to do if a key leaks?
  5. help.openai.com
    Is API separate from ChatGPT Plus? · ChatGPT plan prices for contrast?
  6. help.openai.com
    Prepaid credits: minimum, default, expiry?
4 more receipts
  1. developers.openai.com
    Usage tiers and limits?
  2. developers.openai.com
    How to set a spend limit?
  3. help.openai.com
    Do ChatGPT subscribers get API credits?
  4. developers.openai.com
    Is API data used for training?

Only pages the company publishes itself are listed. How we check: our method. Spotted a wrong number? Corrections.

Filed under

Guides: Familiars“openai api key”

Front page