Guide

Claude Pay-As-You-Go: How API Pricing Works in 2026 (and When It Beats a Subscription)

2026-06-30 9

TL;DR — Claude "pay-as-you-go" means paying per token through the API instead of a flat monthly subscription. You pay only for the input and output tokens you actually use, with no monthly commitment. In 2026 the official per-token rates are Opus 4.8 at $5 / $25 per million tokens (input / output), Sonnet 4.6 at $3 / $15, and Haiku 4.5 at $1 / $5. Pay-as-you-go wins when your usage is light, bursty, programmatic, or spread across many users; a Max subscription tends to win for one heavy, daily, interactive coder. LLM API offers both models off one key, and our pay-as-you-go wallet balance never expires.

What "Claude pay-as-you-go" actually means

There are two completely different ways to pay for Claude, and the phrase pay-as-you-go refers to one of them:

  • Subscription (flat fee): Claude Pro at $20/month or Claude Max at $100–$200/month. You pay the same amount every month and get a usage allowance. Great for predictable, heavy, interactive use in the Claude app and Claude Code — until you hit the cap.
  • Pay-as-you-go (metered API): You're billed per token through the API. No monthly fee, no commitment. A month where you run nothing costs $0; a month where you run a lot costs more. This is the model developers use to build apps, run agents, and drive coding CLIs programmatically.

The key mental shift: pay-as-you-go is priced in tokens, not seats. A "token" is roughly ¾ of a word. Every request bills for the tokens you send (input) plus the tokens Claude generates (output), at a per-model rate.

Claude pay-as-you-go pricing in 2026 (official per-token rates)

Here are the current official Anthropic API rates, quoted per million tokens (MTok):

Model Input ($/MTok) Output ($/MTok) Context window
Claude Opus 4.8 (claude-opus-4-8) $5.00 $25.00 1M
Claude Sonnet 4.6 (claude-sonnet-4-6) $3.00 $15.00 1M
Claude Haiku 4.5 (claude-haiku-4-5) $1.00 $5.00 200K

Three things that materially change the bill:

  1. Output is 5× input. Claude charges far more for tokens it writes than tokens it reads. A model that "thinks out loud" or over-explains costs more — output length is the lever you control. (See Sonnet 4.6 vs Opus 4.8 for how model choice affects output verbosity.)
  2. Prompt caching cuts repeated input by ~90%. Cached input tokens are billed at roughly 0.1× the normal rate; writing to cache costs ~1.25× (5-minute) or 2× (1-hour). For agentic tools like Claude Code that resend the same context every turn, caching is the single biggest cost saver.
  3. Batch processing is 50% off. Non-latency-sensitive work submitted through the Batch API runs at half price.

One more 2026 detail worth knowing: Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6 serve the full 1M-token context window at standard rates — there is no long-context surcharge. A huge repo dump costs the same per token as a short prompt.

Pay-as-you-go vs subscription: which is cheaper for you?

There's no universal answer — it depends on the shape of your usage, not just the amount.

Your usage looks like… Cheaper option Why
One person, coding hard in Claude Code every day Max subscription A flat $100–$200 caps a heavy single user who would otherwise burn far more in metered tokens
Light or occasional use Pay-as-you-go You don't pay for months you barely touch it
Bursty / spiky (busy weeks, quiet weeks) Pay-as-you-go Metered billing tracks the spikes instead of charging peak every month
Building an app or running agents programmatically Pay-as-you-go Subscriptions are for interactive seats, not server-side API traffic
A team where usage varies per person Pay-as-you-go One shared metered balance beats buying a Max seat for everyone "just in case"

The honest rule of thumb: a single heavy daily coder usually saves money on a Max subscription; almost everyone else — light users, teams, and anything programmatic — comes out ahead on pay-as-you-go. For a deeper breakdown of the subscription tiers themselves, see Claude Code pricing in 2026: Pro vs Max vs Pay-As-You-Go API.

How to keep a pay-as-you-go bill small

Metered billing rewards a few habits:

  • Default to a cheaper model, escalate per task. Run Sonnet 4.6 for routine work and only reach for Opus 4.8 on the turns that need deep reasoning. In Claude Code you switch in-session with /model — see the model-switching guide.
  • Cache aggressively. Put stable content (system prompt, repo context) first so it caches, and keep volatile content last. Cached reads are ~10% of full price.
  • Compact long sessions. Because every turn re-sends the conversation, a bloated history is re-paid on every request. Trimming it directly lowers input cost — more in Claude Code token cost and context management.
  • Batch what isn't urgent. Anything that can wait runs at half price through the Batch API.

For the full cost playbook, see Claude Code cost optimization in 2026.

Pay-as-you-go through LLM API

LLM API is a Claude-compatible API relay, and we deliberately support both billing models so you don't have to choose up front:

  • Pay-as-you-go wallet — top up a balance and pay per use. The balance never expires, which suits spiky or unpredictable workloads where a monthly subscription would sit idle.
  • Subscription plans — flat monthly options for heavy, steady users who prefer a predictable bill.

Either way you get one sk- key, the same model catalog (Claude Opus 4.8 / Sonnet 4.6 / Haiku 4.5, plus models like GLM-5.2), and both the Anthropic Messages and OpenAI protocols on the same base URL — so Claude Code, Codex, Cline, and standard SDKs all work against a single account. Point your tool at the relay with two environment variables:

export ANTHROPIC_BASE_URL=https://llmapi.pro
export ANTHROPIC_API_KEY=sk-relay-your-key

Live per-model rates for both billing modes are on the pricing page, and you can start with free trial credit at /register.

FAQ

What does pay-as-you-go mean for Claude? It means paying per token through the API instead of a flat monthly subscription. You're billed only for the input and output tokens each request uses, with no monthly commitment — a quiet month costs little or nothing.

How much does Claude cost per token in 2026? Official API rates are $5 input / $25 output per million tokens for Opus 4.8, $3 / $15 for Sonnet 4.6, and $1 / $5 for Haiku 4.5. Prompt caching cuts repeated input to roughly 10% of those rates, and the Batch API is 50% off.

Is pay-as-you-go cheaper than a Claude Max subscription? For a single person coding heavily every day, Max ($100–$200/month) usually wins because it caps a large, steady load. For light, bursty, team, or programmatic usage, pay-as-you-go is typically cheaper because you only pay for what you actually run.

Does the 1M context window cost extra? No. On Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6, the 1M-token context window is served at standard per-token rates with no long-context surcharge.

Can I do pay-as-you-go without a monthly subscription? Yes. With LLM API you can top up a pay-as-you-go wallet whose balance never expires and pay purely per use — no subscription required — using the same key and models as the subscription plans.

llmapi.pro is an independent, Claude-compatible API relay; we are not affiliated with Anthropic. Claude is used for identification only. Per-token rates cited are official Anthropic API prices for reference; LLM API's own rates are on the pricing page.

Share this article

Start using LLM API

Free tier available. One-line configuration for Claude Code.

Get Started Free