What is an API key, and how do you use it safely?

An API key is a secret that lets an app use your account with an AI provider. [1] [2] Give the app a dedicated key, check its spending limit, and keep the key out of messages.

Do you need a key if you already pay for chat?

Imagine you run a small bookkeeping business. You want help drafting reminders for clients who still owe you a document. You can type a request in a chat yourself. An app can also send a request through an API, a connection between programs. [3]

The prompt tells the app what you want written. The key lets the app make the request on your provider account. [1] [2] A colleague reviewing your reminder needs the draft and perhaps the prompt. That colleague can review both without seeing the key.

OpenAI bills ChatGPT subscriptions and API use separately. ChatGPT Plus alone does not include the API credit benefit available with certain other subscriptions. [3] [4] Check the billing page for the account you plan to use before sending your first request. [3]

For current rates, follow the official pricing link for the model you plan to use. The notes below link to the OpenAI and Anthropic price lists. [5] [6] Record the model and the day you checked its terms if you need an estimate for a client.

Before

We pay for chat already. Grab a key and draft reminders for our whole client list.

After

Use the bookkeeping business’s approved account. Start with a made-up reminder. We’ll review the draft and check usage before deciding whether to continue.

Agree on who can approve the cost and who can stop the trial. They might be different people. A bookkeeper covering the inbox can review writing while the owner checks billing. Put the account name and the purpose of the trial in their shared handover.

Create a key in OpenAI

On the API platform, you can create a separate key for the bookkeeping project. [7] These instructions use the English labels in the provider’s documentation.

  1. Open organization settings on the OpenAI API platform. [7]
  2. Select the project for the bookkeeping business. [7]
  3. Open API Keys. [7]
  4. Select + Create new secret key. [7]
  5. Choose the key permissions: All, Restricted or Read Only. [7]
  6. Save the secret in the business’s approved secret store. [1]

Pause if you do not recognize the company or project. Ask the owner which one pays for client reminders. Creating the key on a personal account would make the trial harder to hand over later.

Give the key a name you will recognize when you no longer remember the setup. “Missing document reminders” identifies what would stop working if you disabled it. A list of keys can record that name and who uses it. Keep the secret itself out of that list.

When you create a key, All gives full access and Read Only allows reading only. With Restricted, you choose permissions for each API endpoint. Depending on the endpoint, options can include None, Read and Write. [7]

If you cannot manage the project, ask its owner to arrange access. Borrowing a colleague’s key makes it harder to tell whose use you are reviewing.

Create a key in Anthropic

Choose the provider you actually plan to use. You can test a single drafting task without opening accounts with both providers. In Claude Console, a workspace groups keys and settings for particular work. [2]

  1. Open the API keys page in Claude Console. [2]
  2. Select the business’s workspace from the Workspace menu. [2]
  3. Choose Create key. [2]
  4. Give the key a name that describes the reminders. [2]
  5. Confirm with Create key. [2]

A key belongs to the workspace where you created it. Anthropic does not move keys between workspaces. [2] Check the workspace name before the test. That will help you find the right usage record later.

Never paste the key into a prompt, an email, a team chat, or a spreadsheet. Enter it only in the designated setting of an app you trust. To help a colleague find the setting, show the empty form. Check the entire screenshot before sending it.

Try the connection with a fictional reminder

Draft a courteous reminder for [Recipient]. The missing document is [Document]. Ask when it will be available. Return a subject and a short paragraph. Leave out any deadline or invoice number.

Enter “purchasing team” in [Recipient] and “statement” in [Document].

Set the limit before working through the inbox

Agree on an amount the owner can spend on this job. Also decide when someone should receive a warning. Leave enough room to check the bill before the next batch of reminders goes out.

OpenAI

  1. Open Project settings. [8]
  2. Select Limits. [8]
  3. In the Spend section, select Edit spend limit. [8]
  4. Enter the approved amount under Monthly spend limit. [8]
  5. If you want to stop requests once tracked spending reaches the limit, turn on Enforce a hard limit. [8]
  6. Select Save. [8]

In the same section, set a spend alert. It sends a notification and requests can continue. [8] With a hard limit, recorded spending can slightly exceed the limit before requests stop. [8]

Anthropic

  1. On the Workspaces page, select a separate workspace for the trial. [2]
  2. Open Spend limits. [2]
  3. Under Monthly limit, select Change limit. [2]
  4. Enter the approved amount. [2]
  5. Choose + Add notification to set an email warning. [2]

Anthropic’s default workspace does not support a separate workspace spending limit. Check the organization limit or use a separate workspace for the trial. [2] [9]

Before

We’ll get an email if something goes wrong, so we can leave the app running.

After

Check which account sends the warning. Read the limit and enforcement settings. Agree on who will pause drafting if spending looks wrong.

After the trial, check usage for the same project or workspace over the relevant period. An empty report for a different account tells you nothing about your reminder. Avoid sending another request just to make a number appear. [8] [2]

What to do if the key leaks

Suppose an email to someone outside your business contains the key instead of the document name. Deleting your sent copy does not invalidate the secret. Anyone with another copy may still try to use it. [1]

  1. Revoke the exposed key with the provider. Claude Console offers Disable API key for this purpose. [1] [2]
  2. Notify the person who pays for the business’s account.
  3. Review usage from the earliest time the key might have been exposed. [1] [2]
  4. Create a replacement key for the approved task. [7] [2]
  5. Replace the old key in the app’s secure setting. [1]

Record the time you noticed the problem and the key’s name. In a support request, describe where the secret appeared without reproducing it. If the email also contained a client record, tell the person responsible for privacy. They need to know what else the recipient received.

For a planned change, you can test a replacement before revoking the old key. A suspected leak calls for prompt revocation. Do not wait for an unexpected charge or a reply from the recipient. [1]

Why this works and what to do now

You have separated the writing, the account access, and the bill. The prompt can move between colleagues without giving them a secret. A key authorizes the app’s requests, and the spending controls apply to the chosen account. [8] [2]

The same distinction matters when you purchase a separate writing tool. Prompt Secure Premium does not include AI credits. When you use your own key, you pay the provider directly for API use. [10]

Try it now: five minutes

  1. Choose one reminder that regularly comes up in the bookkeeping office.
  2. Write down who approves spending on that task.
  3. Find the settings for the intended project or workspace. [8] [2]
  4. Read the current limit and the notification settings. [8] [2]
  5. Leave your team the account name and a note about who can stop the trial.

A common mistake is sending the key to someone who only wants to judge the writing. Send the draft or the blank template instead. If they need access to the app, find out which task they will perform and which account should pay.

Do I need a key to write the reminder myself?

You can write or edit the text by hand. The app needs the key when it uses the provider’s API through your account. [1] [2]

Should I paste the key into each prompt?

Keep it in the app’s designated secure setting. The prompt should contain only the task and the material needed to complete it. [1]

Will an email warning stop the next charge?

Check the enforcement setting in OpenAI. In Anthropic, read the spending limit for the relevant workspace or organization. An email warning serves a different purpose. [8] [2] [9]

Related guides

Sources

  1. OpenAI · API key safety · 2026-11-28
  2. Anthropic · Workspaces · 2026-11-28
  3. OpenAI · ChatGPT and API billing · 2026-11-28
  4. OpenAI · API credit eligibility · 2026-11-28
  5. OpenAI · API pricing · 2026-11-28
  6. Anthropic · API pricing · 2026-11-28
  7. OpenAI · Projects · 2026-11-28
  8. OpenAI · Spend limits · 2026-11-28
  9. Anthropic · Rate limits · 2026-11-28
  10. Prompt Secure · 2026-11-28

Keep the template for next time

Create your account in the Android app. Then sign in with the same account in the Chrome extension and in your browser on any computer.

Get Prompt Secure on Google PlayAdd Prompt Secure to Chrome from the Chrome Web StoreChrome Web StoreOPEN INyour browser
Try the demo →
Esc
↑↓ choose · Enter open · Esc close

Open Google Play on your phone

Open Google Play on your phone