Docs / Concepts / Subscriptions, APIs, and local models

Concepts

Subscriptions, APIs, and local models

Three ways to get a model behind your agent — a flat-rate subscription, a pay-per-token API, or a model on your own hardware — and which client each one requires.

Updated Jun 26, 2026

Before you run an agent, you have to decide how the model behind it is paid for and reached. There are three ways, and they are not interchangeable: each comes with a different client and a different rule about what you are allowed to point at it. Getting this wrong is the usual way people either overspend or break a provider’s terms of service.

The three access models

  • Subscription — a flat monthly fee (for example, Claude Max/Pro, or ChatGPT Plus/Pro). You pay a fixed amount and use the vendor’s own app or command-line client. The subscription is tied to that client; it is not an open API you can point arbitrary tools at.
  • API — a key billed per token (for example, the Anthropic API or the OpenAI API). Any client that accepts a key can use it, including opencode or your own code. Flexible, but you pay for what you use, so volume adds up.
  • Local / open model — an open model you serve yourself on your own hardware, for example with Ollama . No marginal cost, nothing leaves the machine, and any client can point at the local endpoint. The trade-off is that a model small enough to run locally is weaker than a frontier one.

This is a choice about access and terms, not capability. The same model can sit behind a subscription or behind an API — what changes is how you pay and which client you are allowed to use.

The rule people trip over: a subscription needs its own client

A subscription is bound to the vendor’s official client, so the supported way to automate it is to wrap that client — not to point some other tool at the subscription’s backend.

  • A Claude Max/Pro subscription runs through Claude Code . To run it in parallel sessions, drive it from a hub, or script it, you wrap Claude Code — for example, amux launches the real claude binary and manages it. That is the supported pattern: you are using your own account through its own client.
  • A ChatGPT subscription works the same way through OpenAI’s own CLI (Codex).
  • opencode and other model-agnostic clients are for APIs and open models — give them an Anthropic or OpenAI API key, or a local Ollama endpoint. Do not wire them to a subscription’s backend to use it as if it were an open API; that generally breaks the provider’s terms.

Wrap, don't re-host

The blocked pattern is taking a third-party client and aiming it at a subscription’s private endpoint, as though the flat-fee plan were a metered API. The allowed pattern is wrapping the vendor’s own client (amux around Claude Code, for instance). When in doubt: a subscription goes through its own app; opencode goes to an API key or a local model.

Which one for what

You haveRun it withNotes
Claude Max/Pro subscriptionClaude Code , wrapped by amuxsupported; your account, its client
ChatGPT Plus/Pro subscriptionOpenAI’s Codex CLIvendor’s own client
Anthropic or OpenAI API keyopencode (or any client)pay per token — watch volume
An open model on your GPUopencodeOllamafree, private, smaller model

In practice you mix them: a subscription or API frontier model for the hard work, a local model for the routine work. That split is the two-lane setup .

Where to go next

Source: content/concepts/model-access.md · maintained in the nuilab-agenticai repository.