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

  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 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

  • big-AGI

    Free; Pro $9/month · Web · Open source

    Visit

    Multi-model AI workspace that runs, compares and merges answers from many providers using your own API keys.

    Works with:OpenAIAnthropicGoogle GeminixAI+14 more

  • AnythingLLM

    Free · macOS, Windows, Linux · Open source

    Visit

    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

  • Kilo Code

    Free to start, no markup on model usage · VS Code, JetBrains, CLI · Open source

    Visit

    Open-source AI coding agent for VS Code, JetBrains and the CLI. Use 500+ models at zero markup or bring your own keys.

    Works with:AnthropicOpenAIGoogle GeminiOpenRouter+8 more

  • Witsy

    Free, open source · macOS, Windows, Linux · Open source

    Visit

    Open-source desktop AI assistant and universal MCP client for macOS, Windows, and Linux. BYOK app supporting 15+ AI providers including local models via Ollama.

    Works with:OpenAIAnthropicGoogle GeminixAI+8 more

  • Kerlig

    $49 one-time (1 Mac) · macOS

    Visit

    Mac app that adds AI to any app for emails, replies and proofreading, using 350+ models with your own API keys.

    Works with:OpenAIAnthropicGoogle GeminiGroq+7 more

  • BoltAI

    One-time purchase, free trial · macOS, iOS

    Visit

    Native Mac and iOS AI app that connects to OpenAI, Claude, Gemini, Mistral, Bedrock and local models with your own keys.

    Works with:OpenAIAnthropicGoogle GeminiMistral+6 more

  • n8n

    Free to self-host; paid cloud plans · Self-hosted, Web

    Visit

    Workflow automation platform for building AI agents with 500+ integrations, using your own model credentials. Self-host or cloud.

    Works with:OpenAIAnthropicGoogle GeminiMistral+6 more

  • NewMax

    One-time lifetime license from $399 · macOS, Windows

    Visit

    Desktop AI agent that runs workflows on your local files with your own API key or a local model; nothing routes through NewMax.

    Works with:OpenAIAnthropicGoogle GeminiMistral+6 more

See all 85 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. 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.

Related guides