Our Max plan includes API credits, and our coding tool asks us to sign in with Claude. Those two facts raise one question about money and one about permission, and mixing them up can charge a task against a different limit or send a credential through a flow the provider doesn't permit. This guide is for subscribers who run a coding agent or an API experiment against Claude and want to know which meter a run uses and which actors may use each credential path.
We work through six checks in order, then collect the result in a table and a review checklist.
- Which balance pays for a task.
- Four terms we keep separate.
- Two credential paths for two tasks.
- Who may use each credential path.
- What a customer may provision or host.
- When the Commercial Terms start to bind.
Which balance pays for a task
The first check is money, because the credits and the plan limits are two different meters.
Max, Ultra, and Team plans are eligible for Claude Platform API credits under the conditions stated in the monthly API-credit rules. Free, Pro, and Enterprise plans are excluded from that offer. The subscription must be active and in good standing, and new subscribers can claim after seven days on the plan.
When we claim the balance, we link a Console organization to receive it. The Max or Ultra subscriber, or the Team plan's Primary Owner or Owner, starts the claim, and the Console organization needs an Owner, Admin, or Billing role. Eligibility and amounts can change, so we check the current offer before relying on them.
The API-credit balance is separate from the plan's usage limits. Subscription sign-in leaves API credits untouched, and the balance comes without an API key.
Four terms we keep separate
Contract questions get muddled when four words blur together, so we define them before comparing the paths.
- A license governs use of software or, where applicable, model weights.
- An access plan defines entitlements, limits, and billing terms for a product.
- A credential authenticates a request.
- An API-credit balance can fund eligible usage under its credit terms.
To answer contract questions, we need to know who is acting, what product runs, how credentials are handled, who is billed, and which exceptions apply.
For Claude Code, Anthropic's legal page puts Free, Pro, Max, and Ultra users under the Consumer Terms, and Team, Enterprise, and Claude API users under the Commercial Terms. The Consumer Terms also separate their consumer-service scope from use of Anthropic API keys and the Console, which fall under the Commercial Terms. The product and the use determine the applicable agreement for any account holder.
Two credential paths for two tasks
With the terms set, we follow one subscriber through two tasks to see which meter each one uses.
Take a subscriber who uses native Claude Code for an interactive coding task, then runs a separate API experiment. Assume they're eligible for the offer and have linked the right Console organization.
For the interactive task, the user signs in to native Claude Code with the subscription through Anthropic's own flow, and that path draws on the plan's usage limits. The credit coverage rules exclude interactive Claude Code in the terminal, IDE, desktop, or web from the monthly API credits, along with extra usage after reaching plan limits. They also exclude Claude on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, even when authentication through a supported cloud provider is permitted.
For the API experiment, the caller authenticates with an API key from the linked Console organization and sends eligible requests to the Claude Platform API. Everyone using an API key in that organization shares its credit balance. Only one Console organization can be linked to a plan, and each organization can receive the offer from only one plan. Unused monthly credits expire at the end of the billing cycle and are spent before purchased credits. The Supplemental Credit Terms distinguish purchased Usage Credits from Promotional Credits and explain their expiry conditions. The monthly offer's support page sets its billing-cycle expiry.
Suppose we run claude -p twice as that subscriber, once with plan sign-in and once with a linked-organization API key in the eligible self-run case.
We want to know which meter each run uses.
The support page's command-specific guidance covers self-run claude -p and Agent SDK use with an API key from the linked organization, because that usage is billed as Agent SDK usage.
With plan sign-in, those uses draw on plan limits.
Runs started by the Claude Code GitHub Action, an IDE extension, or the Claude desktop app count as Claude Code usage and are excluded from these API credits even with -p.
The provider's usage record shows which meter a run used, and we look it up four ways:
- by client,
- by who started the run,
- by credential type,
- by linked organization.
Before either run, we check which credential variables the shell would hand to Claude Code, then ask the CLI which method it selected.
[ -n "$ANTHROPIC_AUTH_TOKEN" ] && echo "ANTHROPIC_AUTH_TOKEN is set"
[ -n "$ANTHROPIC_API_KEY" ] && echo "ANTHROPIC_API_KEY is set"
[ -n "$CLAUDE_CODE_OAUTH_TOKEN" ] && echo "CLAUDE_CODE_OAUTH_TOKEN is set"
claude auth status
claude -p "Summarize this project"
Each test prints a variable's name and never its value.
Claude Code's authentication precedence ranks ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY and CLAUDE_CODE_OAUTH_TOKEN, in that order, above a subscription login, and states that with -p the API key is always used when present.
The CLI reference documents claude auth status as reporting an authMethod such as claude.ai or api_key, and the guide to running Claude Code programmatically documents -p as the flag that runs a command non-interactively.
The two paths end at two different meters.
- Interactive: subscriber -> native Claude Code -> subscription sign-in -> plan limits.
- API: caller -> linked-organization API key -> Claude Platform API -> the organization's eligible credit balance.
When API credits run out, the organization's billing arrangement decides what happens next. Purchased credits or auto-reload can fund continued usage, and without other credits, API requests stop until more credit is available. For organizations invoiced through Anthropic sales, excess usage is billed as usual. Under these exhausted-credit rules, this API usage stays separate from Claude subscription billing.

- One subscriber, two tasks: a subscriber uses native Claude Code for an interactive coding task, then runs a separate API experiment.
- Subscription sign-in: for the interactive task the user signs in to native Claude Code with the subscription, and that path draws on the usage limits of the plan.
- API key: for the API experiment the caller authenticates with an API key from the linked Console organization and sends eligible requests to the Claude Platform API, which reach the eligible credit balance of that organization.
- Two meters: the two paths end at two different meters.

Figure text
Two lanes show native Claude Code using subscription OAuth and plan usage, and an API client using a linked organization API key and API-credit balance. Subscription identity and the Console API organization are separate for accounts and billing. The self-run command path qualifies only under the support page's API-key conditions. Credit coverage excludes IDE extensions, GitHub Actions, desktop-app sessions, and native subscription sign-in.
- The credential picks the balance
- Subscription path (far platform)
- API key path (near platform)
- Excluded: does not reach credits
- The credential selects the balance. A subscription sign-in never reaches the API credits, and no amounts are shown.
- 1 Subscription sign-in draws on the plan; Plan usage limits
- 2 Sign-in toward the credits, excluded
- 3 The request carries the organization's API key; API request to the Claude Platform API
- 4 The credit balance may fund eligible usage
- Not covered by credits
- Subscription sign-in
- Subscriber
- Claude Code
- Plan's usage limits
- API client
- Linked Console organization
- Claude Platform API
- Credit balance
- API key
- Subscription
- Console API organization
- A command you run yourself counts for credits only when it uses that API key.
Sources: [1] Legal and compliance - Claude Code Docs; [2] Monthly API credits for Max, Ultra, and Team plans | Claude Help Center.
Who may use each credential path
Knowing which balance pays settles the money, and the next check is whether the actor is permitted to use that credential path.
Anthropic's authentication and credential-use policy sets different rules for each kind of actor.
For subscribers, OAuth is Claude Code's token-based sign-in flow for authenticating to Anthropic, and the policy describes it as intended for ordinary use of Claude Code and other native Anthropic applications. The guidance tells developers building products or services, including Agent SDK applications, to authenticate through Claude Console API keys or a supported cloud provider. A successful token exchange confirms authentication, and we check the rules for that actor to determine whether the use is permitted.
The policy prohibits third-party developers from offering Claude.ai login in their own applications or routing requests through Free, Pro, Max, or Ultra plan credentials on behalf of users. It also prohibits developers from collecting, storing, or intermediating Claude.ai credentials or session tokens. Sign-in must complete through Anthropic's own flow.
We check each product called a third-party harness against the rules for these developer activities and credential paths.
What a customer may provision or host
The policy also carves out what a customer may do for its own users, and those exceptions carry conditions of their own.
Customers can provision their own API keys or third-party inference credentials for their own authorized users, for example through a development environment or secrets manager. That exception holds only if usage is billed to the key owner under the applicable agreement and isn't resold or intermediated as the policy describes. An end user may also sign in with their own subscription to the unmodified Claude Code binary, including when a platform hosts that binary under the stated conditions.
Customers who offer Claude Code in products or services must follow an additional explicit rule. Unless otherwise mutually agreed, they must:
- accept the Commercial Terms;
- run the binary as published;
- leave its built-in authentication methods available.
They may not pay for, resell, or intermediate Claude usage on end users' behalf. Each end user must authenticate with their own Anthropic API key, subscription credential, or listed third-party inference credential, with usage billed directly under that user's applicable agreement.
When we offer Claude Code, we must check its conditions for hosting the unmodified app and for using our own end-user credential and payment scheme.
When the Commercial Terms start to bind
A terms review also needs the date the Commercial Terms began to bind the customer.
The Commercial Terms set each customer's effective date to the earlier of electronic consent to a version of the terms and first access to the services. That date varies by customer and is independent of when they read the page.
Which combinations the policy covers
The table collects the client, credential, policy, and billing combinations from the checks above.
For each actor and credential path, we check what the policy permits, where usage is billed, and which balance it reaches.
Sources: Legal and compliance - Claude Code Docs, Consumer Terms of Service \ Anthropic, Commercial Terms of Service \ Anthropic, Monthly API credits for Max, Ultra, and Team plans | Claude Help Center.
| Client or actor | Credential path | What the policy says | Usage or billing path |
|---|---|---|---|
| Subscriber in native Claude Code | Subscription OAuth through Anthropic's flow | The policy describes ordinary native use. | Usage counts against the plan's limits. |
| API client using the linked Console organization | Organization API key | The applicable Commercial Terms govern the API path. | Eligible usage can draw on the shared API-credit balance |
Self-run claude -p or Agent SDK case | API key from the linked organization | Applicable Commercial Terms and credential-use policy govern the API-key path | Usage is billed through the API, and linked-organization credits may apply under the stated self-run conditions. |
| Third-party developer offering subscription login in their application | Claude.ai login or intermediated subscription credentials | The credential-use policy prohibits these developer activities | No permitted billing path, since the policy prohibits the activity. |
| Platform hosting unmodified Claude Code | The end user's own listed credential, with built-in authentication retained | The policy lets a platform host it under stated conditions, unless Anthropic agrees otherwise | The end user is billed under their applicable agreement. |
Facts to bring to a terms review
For a concrete third-party application, we gather the facts the agreements turn on.
- who is acting,
- which product runs,
- where sign-in completes,
- whether any party collects or intermediates credentials,
- the provider endpoint,
- the funding source,
- the entity that receives the bill.
Then we check the applicable consumer or commercial agreement, the current credential policy, and any separate software or model license. For a self-hosted alternative, we check whether the exact software and model licenses permit our use.
The one check that matters most
A credit balance and permission to use a credential path are separate questions, and we answer both before a run. If the commercial arrangement is still unclear once we have these facts, we ask someone qualified to review them.
What an attacker targets here
Every credential path above ends in a secret the agent uses, and an attacker wants that secret.
- A poisoned tool description can ask the model to send whatever it can see, and Invariant Labs' demonstration went after an SSH key and the MCP configuration file that typically stores other servers' credentials. We keep credentials out of the system prompt and handle tokens in code, as MCP servers your coding agent should not trust explains.
- LiteLLM reported seeing Claude Code, in specific situations, embed a user's GitHub CLI OAuth token in a response body. A gateway that logs response bodies then holds that token, so we turn content logging off, as The gateway as an attack surface describes.