How to get an OpenAI API key

Updated · 3 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

  1. Sign in at platform.openai.com with your OpenAI account, or create one.
  2. 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.
  3. Open the API keys page at platform.openai.com/settings/organization/api-keys and create a new secret key.
  4. 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.
  5. 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 for OpenAI's current models on its pricing page, 2026-10-29 (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-6.1-terra $1.00 $5.00
gpt-6-luna $0.10 $0.50

Older models such as gpt-5.6-terra ($2 / $12) and gpt-5.6-luna ($0.20 / $1.20) are still available but cost more than their GPT-6 successors. For a chat turn of about 2,000 tokens in and 500 out, gpt-6-luna costs around $0.0005 (about 11,000 turns for $5), gpt-6.1-terra about $0.0045, 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

  • Infinity

    Free · macOS

    Visit

    Free Mac AI chat app with git-style branching: fork any part of an answer into its own thread, ask up to four models at once, and use your own keys or local models.

    Works with:OpenAIAnthropicGoogle GeminixAI+7 more

  • Caotang

    Free · Web · Open source

    Visit

    Free, local-first browser writing studio for novels and scripts, with an AI agent that runs on your own Anthropic, OpenAI, Google, OpenRouter or local model key.

    Works with:AnthropicOpenAIGoogle GeminixAI+5 more

  • Laya

    Free · macOS, Windows, Linux · Open source

    Visit

    Open-source, local-first desktop command center that turns Slack, Gmail, GitHub, Jira and calendar notifications into AI-drafted action cards, using local models or your own API keys.

    Works with:AnthropicOpenAIGoogle GeminiOllama+1 more

  • Shizue

    Free · Chrome extension · Open source

    Visit

    Free, open-source Chrome side panel for AI chat, page summaries, bilingual video captions and in-tab tasks, running on your ChatGPT plan or your own OpenAI, Claude, Gemini or OpenRouter key.

    Works with:OpenAIAnthropicGoogle GeminiOpenRouter+1 more

  • PockoBots

    Free (beta) · Android · Open source

    Visit

    Open-source AI coding agent and personal bots that run on your Android phone, powered by your own OpenAI, Anthropic, Gemini, Groq or OpenRouter key with no app subscription.

    Works with:OpenAIAnthropicGoogle GeminiGroq+1 more

  • Exody

    Free · macOS, iOS

    Visit

    Free autonomous coding agent for Mac that routes each step to Claude, GPT, Gemini, Grok or a local model using your own API keys, with no seat fee or markup.

    Works with:AnthropicOpenAIGoogle GeminixAI

  • MergeJudge

    Free AI reviews on public repos; bring your own key for private repos · Web, Self-hosted · Open source

    Visit

    AI pull request reviewer offered as a hosted GitHub App or an open-source GitHub Action, running on your own Anthropic, OpenAI or OpenAI-compatible key, local Ollama, or rules only.

    Works with:AnthropicOpenAIOllama

  • Prismix

    Free · Web · Open source

    Visit

    Free, open-source web app for generating images with OpenAI, Google and Replicate models from one interface, with your API keys kept in your browser.

    Works with:OpenAIGoogle GeminiReplicate

See all 112 apps that work with OpenAI

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. Looking for a free key instead? OpenAI has no free tier, but there are real ways to pay little or nothing: see is there a free OpenAI API key? and 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.

Is there a free OpenAI API key?

No, the API has no free tier and you need a positive balance. Some organizations qualify for free daily tokens on traffic they share with OpenAI, and OpenAI's open-weight gpt-oss models are free on Groq's free plan or on your own computer.

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-29. Prices and limits change; the links below have the current figures.

Related guides