Choose and access a model

Subscription or API

Understand the practical difference between using a hosted product subscription and paying for direct API usage.

8 minute lesson

~~~

A product subscription and API access may use models from the same provider, but they are different products with different billing, limits, and responsibilities.

A subscription gives a person access through an interface such as a chat app or coding tool. You usually pay a recurring amount and work within the features and usage limits of that product.

An API lets your software send requests programmatically. Usage is usually metered. You choose how to build the interface, store state, handle errors, and control access.

Paying for one often does not include the other. Check the provider’s current terms instead of assuming your chat subscription includes API credits.

When a subscription is enough

Use a subscription when you are doing interactive work and the product already supplies what you need: conversation history, file uploads, coding tools, browsing, or a polished editor.

This is often the fastest way to learn what AI can do. You avoid building authentication, a user interface, retries, logging, and billing before you even know whether the workflow is valuable.

When you need an API

Use an API when the model must become part of your application or automation. Examples include classifying every support request, extracting data from uploaded documents, or generating a draft inside your own product.

With that flexibility comes operational work:

  • keep the API key on the server, never in browser code
  • set budgets and usage alerts
  • handle timeouts, rate limits, and provider errors
  • validate structured output before using it
  • log enough to debug without storing sensitive data
  • design what happens when the model is unavailable

Calculate the real cost

API cost is more than the price of one token. Include retries, long context, generated output, tool calls, storage, evaluation, and engineering time. A cheap model that needs repeated correction may cost more than a capable one that succeeds once.

For a rough estimate, measure the average input and output tokens on realistic examples. Multiply by expected requests, then add room for retries and growth. Put a hard spending limit in place before opening the feature to users.

Start with a subscription while discovering an interactive workflow. Move to an API when you have a repeated job, a clear success measure, and a reason to integrate it into software.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →