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.
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
claudebinary 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
Which one for what
| You have | Run it with | Notes |
|---|---|---|
| Claude Max/Pro subscription | Claude Code , wrapped by amux | supported; your account, its client |
| ChatGPT Plus/Pro subscription | OpenAI’s Codex CLI | vendor’s own client |
| Anthropic or OpenAI API key | opencode (or any client) | pay per token — watch volume |
| An open model on your GPU | opencode → Ollama | free, 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
- The capability split this feeds into: local and frontier models .
- Run the subscription lane: Claude Code under amux .
Source: content/concepts/model-access.md · maintained in the nuilab-agenticai repository.