You pay for a ChatGPT subscription. You use it to prepare documents, answer questions and review texts. One day, you install Codex or ask someone to automate a task for your business. During setup, a prompt appears: “Enter your API key.” Then come credits, a balance and another billing dashboard.

Your reaction is understandable: “But I already pay for AI.”

Yes. The question is what that payment covers. There are two ways to pay for AI: a subscription with usage included, and a service that charges for what you use. It helps to understand the difference before connecting a tool.

The subscription: a fixed fee with limits

A plan is the option you already know. You pay a recurring fee, sign in with your account and use the included features. There are usage limits: if you reach them, you may have to wait or pay more to carry on.

That plan may also give you access to other tools from the same provider. So downloading Codex or Claude Code does not automatically mean another bill. You can use the access included in a compatible subscription.

What matters is knowing what your plan covers and signing in with the account that holds the subscription. Paying a fee does not give you unlimited use of everything.

The API: paying for what a program uses

An API is a connection that lets a program ask AI to do some work. For example, an automated workflow receives product details, requests a description and leaves it ready for review. You do not have to open the chat and make the request each time.

The program usually connects through an API key, which is similar to a password. Usage is charged to the account linked to that key. You can pay with credits bought in advance or through the billing arrangement you have signed up for.

The cost depends on the work you ask it to do. Writing a few descriptions does not use as much as writing an entire catalogue. And the automation can keep making requests even after you close the chat: it uses the connection it was set up with.

Tokens are small units of content that AI processes and that are used to measure usage. Both what you send and what is generated count. We explain this in Tokens: what artificial intelligence really consumes when you give it a job.

That usage is counted separately from the allowance included in your chat plan. If you have credits, check which service they cover.

Codex and Claude Code: check how you signed in

Codex lets you work on your computer by signing in with ChatGPT or with an API key. If you sign in with ChatGPT, you use the access provided by your plan. If you use a key, usage is charged to the OpenAI API account. 1

Claude Code supports both options too. With a Pro or Max subscription, you can sign in with your Claude account; the chat and Claude Code share the plan’s usage limits. With an API key, usage is handled separately. 2

Check your profile or settings to see whether you are using your subscription account or a key. If someone set it up for you, ask them to show you where to look. Having an active subscription does not tell you how a particular tool is being paid for.

Building the automation and running it

Imagine Codex helps you build a program to write product descriptions. That work may be included in your plan. But if the finished program uses an API, every product it processes will generate usage of its own.

Building the tool and running it are separate jobs. Before asking it to process hundreds of products, try a few and check the usage. It is a simple way to match AI capacity to the process.

Four checks before you start

  1. Check the account. Look at the email address and active workspace. Keep personal and business use separate. Changing the connection can leave an automation without access or credit.
  2. Set a spending limit. Check that it stops usage rather than just sending an alert. There may be a short delay before the cutoff takes effect. Check automatic credit top-ups too. 3
  3. Protect the key. Do not share it or paste it into chats, emails or documents. Use it only in the secure settings field provided for it.
  4. Check the usage dashboard. Review it after the first tests and when the workload increases. That way, you will know what the tool is using before the bill arrives.

Before asking someone to build an integration, ask the question that puts everything else in place:

“Will this use my plan or the API?”

Sources

  1. OpenAI, Authentication: Codex access through ChatGPT or an API key, and the associated billing.
  2. Anthropic, Use Claude Code with your Pro or Max plan: access, shared limits and API billing.
  3. OpenAI, Spend limits: API spending alerts and caps.

Official documentation consulted on 22 October 2026. The examples are illustrative; the advice consists of practical recommendations.

Text by Roberto Ortega, prepared with AI editorial assistance. The Norwegian and English editions are editorial adaptations of the Spanish original.