Claude Code Pricing - Subscription vs Pay Per Token
What Claude Code costs on Pro and Max plans versus paying per token from a prepaid balance. Install steps, cost per session, free options and spend limits.
Claude Code is free to install, and you pay for the model behind it in one of two ways: an Anthropic subscription (Pro from $20 a month, Max from $100, the Free plan does not include Claude Code) or pay per token through an API key. On Jantaris, pay-per-token pricing is $3.24 / $16.20 per 1M tokens for Claude Sonnet 5, $5.40 / $27.00 per 1M tokens for Claude Opus 5.5 and $1.35 / $6.75 per 1M tokens for Claude Haiku 4.5, from a prepaid balance with no monthly fee. Below: how the two billing models compare, how to estimate a session, setup in four steps and how to cap your spend.
Claude Code pricing: the two options
Option 1: an Anthropic plan
From Claude's pricing page as of early October 2026:
| Plan | Price (USD, before tax) | Includes Claude Code |
|---|---|---|
| Free | $0 | no |
| Pro | $20/month, or $17/month billed annually | yes |
| Max | from $100/month, in 5x and 20x usage tiers | yes |
| Team, standard seat | $25/seat/month, or $20 billed annually | yes |
Plans change, so check the official page before you buy. One detail matters a lot for developers: Claude Code on a plan shares usage limits with the rest of that plan, including chat on claude.ai. A heavy coding day on Pro can end with a limit message and a wait until the window resets.
Option 2: pay per token
Claude Code also runs on an API key with no subscription at all. You point it at an Anthropic-compatible endpoint and every request is billed by tokens. On Jantaris that means:
- a prepaid balance from $10, no monthly fee, no minimum commitment,
- the balance does not expire,
- per-token prices listed up front, the same for everyone,
- a failed request costs nothing,
- the same key also works for image, video and audio models and for other chat models.
| Model | Id in Claude Code | Price per 1M tokens (input / output) | Use it for |
|---|---|---|---|
| Claude Opus 5.5 | claude-opus-5.5 | $5.40 / $27.00 per 1M tokens | large refactors, architecture, hard bugs |
| Claude Sonnet 5 | claude-sonnet-5 | $3.24 / $16.20 per 1M tokens | everyday edits, tests, features |
| Claude Haiku 4.5 | claude-haiku-4.5 | $1.35 / $6.75 per 1M tokens | background tasks, quick lookups |
Which one is cheaper for you
If you code with Claude Code for several hours every day, a Max plan is usually better value than paying for every token. That is simply how flat-rate plans work. Pay per token wins when:
- you use Claude Code a few times a week, not all day, and do not want to pay for idle months,
- you hit plan limits at bad moments and would rather pay for overflow than wait,
- you run Claude Code in CI or scripts, where a subscription login is awkward,
- several people need their own keys with separate spend caps on one balance,
- you already use the same account for other models.
Some people combine both: a Pro plan for daily work and a pay-per-token key as a fallback when the plan's limit runs out.
Claude Code cost per session
The cost of any session is:
cost = (input tokens in millions × input price) + (output tokens in millions × output price)Agentic coding is input-heavy. At every step Claude Code resends context: files it has read, command output, the conversation so far. Input tokens usually outnumber output tokens many times over. As a worked example with made-up but realistic numbers, a session that consumed 2M input tokens and wrote 50k output tokens costs 2 × the input price plus 0.05 × the output price from the table above. Your own numbers depend on repository size and how many files the agent opens, so measure rather than guess:
curl https://jantaris.com/v1/balance -H "Authorization: Bearer sk-jt-..."Run it before and after a session. The difference is what the session cost.
How to set up Claude Code with pay per token
Step 1: install Claude Code
Anthropic's native installer for macOS, Linux and WSL:
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexOr with npm (Node.js 22 or later):
npm install -g @anthropic-ai/claude-codeOpen a new terminal and run claude --version. A version number means you are good to go.
Step 2: create a key with a monthly limit
- Sign up at jantaris.com/signup and top up. Quick amounts are $10, $25, $50, $100 and $250.

- In the dashboard, open API keys, name the key (I use "claude-code") and set a monthly limit.
- Copy the
sk-jt-...key right away. It is shown only once.

Step 3: set ANTHROPIC_BASE_URL and the token
macOS and Linux:
export ANTHROPIC_BASE_URL=https://jantaris.com
export ANTHROPIC_AUTH_TOKEN=sk-jt-...
export ANTHROPIC_MODEL=claude-sonnet-5 # optional
claudeWindows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://jantaris.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-jt-..."
$env:ANTHROPIC_MODEL = "claude-sonnet-5" # optional
claudeNo /v1 at the end of the base URL: Claude Code appends the path itself. To make it permanent, put the variables in ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://jantaris.com",
"ANTHROPIC_AUTH_TOKEN": "sk-jt-...",
"ANTHROPIC_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.5"
}
}ANTHROPIC_DEFAULT_HAIKU_MODEL controls the small background calls Claude Code makes. Pointing it at Haiku 4.5 keeps them on the cheapest Claude model. Keep the key out of a project's .claude/settings.json, which usually ends up in git; use .claude/settings.local.json or your home directory file instead.
Step 4: verify
Inside Claude Code, run /status and check that the base URL shows https://jantaris.com. Then send any prompt.
| Code | Cause |
|---|---|
401 | wrong key, or an old key still set in ANTHROPIC_API_KEY |
402 | balance too low |
403 | the key reached its monthly limit |
404 on some requests | model id not in the catalog, set ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL |
VS Code, GitHub Actions and a full troubleshooting table are in my guide to Claude Code with a custom base URL. The reference for all variables is /docs/claude-code.
Try the models before you commit
If you want to see how Sonnet, Opus or Haiku handle your kind of question before wiring up the terminal, Jantaris Studio has a Chat and code tab. Pick the model and the per-token prices show under the selector before you send anything.

Is Claude Code free?
No, not in any full sense:
- The CLI is free to install, but the Free plan on claude.ai does not include Claude Code. Anthropic's docs list Pro, Max, Team, Enterprise or an API (Console) account as the requirement.
- Jantaris has no free tier and no signup credits either. You pay from the first request, with a $10 minimum top-up.
- What you do avoid with pay per token is paying for months you do not code. The balance does not expire.
How to keep Claude Code costs down
- A dedicated key with a monthly limit. Once the limit is hit the API returns
403, so a runaway agent stops at your cap instead of draining the balance. - Sonnet by default. Switch with
/modelto Opus for the hard part, then switch back. - Haiku for background calls. Set
ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4.5. /clearbetween tasks. A new task does not need the previous one's history, and history is input tokens on every step./compactin long sessions when you want to keep the thread but shrink the context.- A short
CLAUDE.md. Describe the project layout and test commands, so the agent opens fewer files to orient itself.
The same key works in OpenAI-compatible tools such as Cursor, Cline or n8n at https://jantaris.com/v1, with any chat model in the catalog. I show that side in Call Claude, Gemini, DeepSeek and GPT with the OpenAI SDK.
FAQ
How much does Claude Code cost?
On an Anthropic plan: Pro is $20 a month and Max starts at $100 (before tax, per the October 2026 pricing page). Pay per token on Jantaris: $3.24 / $16.20 per 1M tokens for Sonnet 5, $5.40 / $27.00 per 1M tokens for Opus 5.5 and $1.35 / $6.75 per 1M tokens for Haiku 4.5.
Can I use Claude Code without a subscription?
Yes. Set ANTHROPIC_BASE_URL=https://jantaris.com and ANTHROPIC_AUTH_TOKEN to a Jantaris key, and Claude Code bills every request to your prepaid balance. No claude.ai login is needed.
Is Claude Code free?
The install is free, using it is not. The Free claude.ai plan excludes Claude Code, and Jantaris has no free credits. The minimum top-up is $10 and the balance never expires.
Is a subscription or pay per token cheaper?
For daily, all-day use, a subscription is usually cheaper. For occasional use, CI, teams with separate spend caps, or as overflow when a plan limit runs out, pay per token tends to fit better.
How do I stop Claude Code from overspending?
Create a separate API key with a monthly limit in the dashboard. When the key reaches it, requests return 403 and nothing more is charged until the next month or until you raise the limit.
Which Claude models work in Claude Code on Jantaris?
claude-opus-5.5, claude-sonnet-5 and claude-haiku-4.5 are the main ones, plus the other Claude models listed in the catalog. Only Claude models work on the Anthropic-compatible endpoint.












