How to get an OpenAI API key

How to Get an OpenAI API Key and Use It in an App

Get an OpenAI API key, often called a ChatGPT API key, add prepaid credit, and use GPT models on iPhone, Android or the web with no code.

Oriveo TeamPublished Updated 10 min read
  • To get an OpenAI API key, sign in at platform.openai.com, open the API keys page (platform.openai.com/api-keys) and create a secret key. The first time, OpenAI asks you to verify a phone number, and the API needs prepaid credit before it works. To use the key without code, paste it into a chat app that accepts your own key, such as Oriveo.
  • ChatGPT Plus and the OpenAI API are separate products with separate billing; a ChatGPT subscription does not fund API usage.
  • As of 28 September 2026, GPT-6 Sol costs $2 per million input tokens and $10 per million output tokens, about one cent for a typical chat message, estimated; GPT-6 Luna costs a twentieth of that.
Oriveo on iPhone: the chat list, with the estimated cost of each conversation on the right.

ChatGPT and the OpenAI API are different accounts

Most people meet OpenAI through ChatGPT, the consumer app with Free, Plus and Pro plans. The OpenAI API is a separate developer product at platform.openai.com. It gives you programmatic access to the same families of GPT models, billed per token instead of per month, and it is what a "bring your own key" app uses.

OpenAI’s help centre treats the two as separate billing systems. Paying for ChatGPT Plus does not add API credit, and API credit does not unlock ChatGPT Plus features. You can sign in to both with the same login, but you add billing to each one independently.

The reason to use the API from a chat app is control. You choose any model your key can access, you pay only for the tokens you use, and you can keep one conversation history across OpenAI and other providers in the same app.

Step 1: create an OpenAI API key

API keys are created in the OpenAI dashboard and belong to a project. The default project is fine for personal use. Copy the key as soon as it is shown and keep it somewhere safe, such as a password manager; treat it like a password, because anyone who has it can spend your credit.

  • Sign in at platform.openai.com with your OpenAI account, or create one.
  • Open the API keys page at platform.openai.com/api-keys.
  • The first time you create a key, OpenAI asks you to verify a phone number with a code sent by text message or WhatsApp. Landlines and VoIP numbers aren’t accepted.
  • Create a new secret key, name it after the app or device you will use it on, and choose the project.
  • Copy the key, which starts with "sk-". Store it safely; if you lose it, create a new one.

Step 2: add API billing and a budget

New API accounts use prepaid billing: you buy credit in the dashboard’s billing settings, and usage draws it down. Until the account has credit, requests fail with error 429 and the code credit_balance_exhausted (the error type may still say "insufficient_quota"). That is the most common reason a freshly created key "does not work".

Set a budget while you learn your usage. The billing settings let you control automatic recharges, and the usage page shows spend by day and by model. Rate limits apply to your account and project as well; for personal chat they are rarely the bottleneck, but they explain the occasional rate-limit error during a burst of long requests.

What GPT models cost through the API

API prices are per million tokens, with a lower input rate and a higher output rate. The table shows OpenAI’s published standard prices for the current GPT-6 family as of 28 September 2026, and an estimated cost for a typical chat message of 2,000 input tokens (your question plus the earlier conversation, which is resent each turn) and 600 output tokens.

For GPT-6 Sol the arithmetic is 2,000 × $2 / 1,000,000 + 600 × $10 / 1,000,000 = $0.010. Reasoning models also bill the tokens they spend thinking as output, even when that reasoning is not displayed, so a hard question can cost several times the typical figure. OpenAI’s invoice is the final amount.

What GPT models cost through the API
ModelInput (USD / 1M tokens)Cached input (USD / 1M)Output (USD / 1M tokens)Estimated cost per typical message
GPT-6 Luna0.100.010.50about $0.0005
GPT-6 Sol2.000.2010.00about $0.010
GPT-6 Astra10.001.0050.00about $0.050

Step 3: add the key in Oriveo

Oriveo is a multi-model chat app for iPhone, Android and the web that runs on your own keys. OpenAI is one of its 15 official providers, under Direct AI Providers. The table lists the English labels you will see.

Depending on your app version, choosing OpenAI may first ask "How do you want to connect ChatGPT?" with two options. For this guide, choose API key — described in the app as "Use a key from platform.openai.com, billed by usage." The other option (Subscription sign-in on iPhone and Android, Sign in with ChatGPT on the web) is a separate route that uses a ChatGPT plan to run Codex models and is not covered here.

When you tap Continue, Oriveo checks the key by asking OpenAI for the models it can access, then syncs that list. If OpenAI rejects the key, Oriveo still saves it and shows "Saved, but the key looks invalid. You can verify it later in provider settings." An account without credit may pass this check and then fail on your first message with a quota error; adding credit fixes that.

Step 3: add the key in Oriveo
StepiPhoneAndroidWeb
Open the provider listProviders tabProviders tabProviders in the sidebar
Start setupAdd ProviderAdd ProviderAdd Provider
Choose the providerOpenAI, under Direct AI ProvidersOpenAI, under Direct AI ProvidersOpenAI, under Direct AI Providers
If asked how to connectAPI keyAPI keyAPI key
Paste the keyAPI key field under "Connect OpenAI"API key field under "Connect OpenAI"Key field under "Connect OpenAI"; "Get your key at OpenAI" links to the dashboard
ConfirmContinueContinueContinue

Step 4: choose a model and chat

After setup, OpenAI’s models appear in the model picker. A sensible pattern is to use an inexpensive model such as GPT-6 Luna for everyday questions, formatting and translation, and switch to GPT-6 Sol or Astra when a task needs more capability. You can change model partway through a conversation, including to a model from another provider, and continue in the same thread.

Each message shows an estimated cost next to it, calculated from OpenAI’s published price and the tokens the response reports. That makes the difference between models visible within a day of normal use, rather than at the end of the billing cycle.

Using your OpenAI key on iPhone and Android

The steps above work the same way on a phone. In the Oriveo app for iPhone or Android, open the Providers tab, tap +, choose OpenAI, pick API key if asked, paste the key and tap Continue. A long key is easiest to move to your phone through a password manager; avoid sending it to yourself by email or chat.

The iPhone and Android apps send your messages straight to OpenAI, and the key is kept in the phone’s secure storage: the Keychain on iPhone, the Keystore on Android. Cloud sync doesn’t upload API keys, so a second device won’t receive your key through sync. Paste it there too, or create a separate key for each device.

Is the API cheaper than ChatGPT Plus?

It depends on how much you use it. As of 28 September 2026, OpenAI’s help centre lists ChatGPT Plus at $20 a month. At the estimated one cent per typical GPT-6 Sol message above, $20 buys roughly 2,000 such messages; with GPT-6 Luna, the same budget goes much further. Light and irregular users often spend less on the API; people who chat heavily all day may not.

The comparison is not only about price. ChatGPT includes app features that the API does not, and the API gives you model choice and per-message visibility that ChatGPT does not. Work through your own numbers before switching.

Keeping your key and your bill under control

Oriveo keeps provider keys on your device or in your browser rather than as account records. The iPhone and Android apps send requests to OpenAI directly; the web app sends requests through a real-time pass-through on Oriveo’s server: your key is used only for that request and isn’t saved as an account record, and BYOK chats aren’t stored as chat logs. Oriveo does not mark up OpenAI’s prices.

  • Use a separate key for each app or device, so revoking one does not break the rest.
  • Keep prepaid credit modest and automatic recharge off until you know your usage.
  • If you see "insufficient quota", the account needs credit, not a new key.
  • Revoke any key that has been pasted into a chat, email or public page, and create a replacement.

Not working? Common OpenAI API key errors

OpenAI’s error codes page explains each error. These are the ones people hit most often when setting up a key, as of 18 November 2026:

  • 401 "Incorrect API key provided" or "Invalid Authentication": the key is mistyped, revoked or belongs to another project or organisation. Copy it again, or create a new one.
  • 429 with the code credit_balance_exhausted ("insufficient_quota"): the API account has no prepaid credit left. Add credit in the billing settings; a new key won’t help.
  • 429 "Rate limit reached for requests": too many requests in a short time. Wait and try again.
  • 429 organization_spend_limit_exceeded or project_spend_limit_exceeded: you reached a spending limit you set yourself. Raise or remove it.
  • 403 "Country, region, or territory not supported": OpenAI’s API isn’t offered where you are. See OpenAI’s list of supported countries.
  • 500 or 503: a problem or overload on OpenAI’s side. Wait and retry.
  • In Oriveo, an empty balance shows as "Provider Quota Reached", and a rejected key as "Invalid API Key" on iPhone and Android; the web app may show "Access Expired" instead.

Frequently Asked Questions

Can I use my ChatGPT Plus subscription as an API key?
No. ChatGPT subscriptions and the OpenAI API are billed separately. To use your own key in another app, create an API key at platform.openai.com and add API billing there.
Where do I create an OpenAI API key?
At platform.openai.com/api-keys. Create a new secret key, name it, and copy it immediately. The key starts with "sk-" and belongs to a project in your OpenAI account. The first time, OpenAI asks you to verify a phone number.
Is there a free OpenAI API key?
OpenAI doesn’t state a free allowance for new API accounts as of 18 November 2026. Its usage-tier table includes a tier named Free, but doesn’t say it comes with free credit. Plan on adding prepaid credit, and see OpenAI’s official pricing and billing pages.
Why does my new OpenAI key return a quota error?
Usually because the API account has no credit yet. OpenAI returns 429 with the code credit_balance_exhausted, and the error type may still say insufficient_quota. Add credit in the dashboard’s billing settings and try again.
How much does a message cost with my own OpenAI key?
It depends on the model and the length of the conversation. As of 28 September 2026, a typical message of 2,000 input and 600 output tokens costs about $0.0005 on GPT-6 Luna and about $0.010 on GPT-6 Sol, estimated.
Can I use GPT models on my phone with my own API key?
Yes. In Oriveo on iPhone or Android, open Providers, tap Add Provider, choose OpenAI, pick API key if asked, paste the key and continue. The native apps send requests to OpenAI directly.

Related reads

Use GPT models with your own key

Add your OpenAI key to Oriveo on iPhone, Android or the web, switch between GPT and 700+ other models, and see an estimated cost on every message.