Run Claude Code on Model.sale.
Claude Code speaks the Anthropic Messages protocol, and so does Model.sale. Set a base URL and a key, pick a Claude model, and your agent sessions are billed from a prepaid wallet at a flat rate per million charged tokens, with cached input counted at 40%.
Why people run Claude Code this way
- One prepaid wallet. Top up from $5 by card, PayPal or crypto. No monthly plan, no seat limit; you pay for measured usage.
- Cheap for agent workloads. Agents resend long context on every turn, which the provider caches. Cached input is charged at 40% of the model rate, so long sessions cost far less than the same tokens at list price.
- The model you ask for is the model you get. Model.sale never silently swaps a model; an unavailable model returns a clear error.
Setup in three steps
- Create an account and an API key in the dashboard. The full key is shown once. Add balance, or try the free demo first.
- Export the base URL and your key. The Anthropic base URL has no
/v1suffix, the client adds the path itself. - Start
claudeand select a model, or set one up front withANTHROPIC_MODEL.
# keep the key in your shell profile or a password manager, never in a repository
export MODEL_SALE_API_KEY="paste-your-key-here"
export ANTHROPIC_BASE_URL="https://api.model.sale"
export ANTHROPIC_AUTH_TOKEN="$MODEL_SALE_API_KEY"
export ANTHROPIC_MODEL="claude-opus-5-5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
claudeInside a session you can switch models with /model claude-sonnet-5-5. Model IDs are the ones listed in GET https://api.model.sale/v1/models; the Haiku ID ends with a date, copy it exactly.
Which model to pick
| Model ID | Good for |
|---|---|
claude-opus-5-5 | Hard refactors, architecture, long agent runs |
claude-sonnet-5-5 | Everyday coding: the best balance of quality and cost |
claude-haiku-4-5-20251001 | Fast, cheap helper tasks: summaries, renames, quick edits |
claude-opus-5, claude-opus-4-8, claude-opus-4-7, claude-opus-4-6 | Earlier Opus generations at lower rates |
Current prices and live status for every model are on the Claude API page and in the catalog.
How a session is billed
Each model has one rate per million charged tokens. Uncached input and output count in full; cached input counts at 40%. Claude Code uses the cache heavily, so the charged-token count is usually much lower than the raw token count. Every request shows its exact charge in the dashboard, and token counting requests are free.
Estimate your own sessions with the cost calculator; the method is public in pricing methodology.
Troubleshooting
| You see | What it means |
|---|---|
| 401 | The key is wrong or revoked. Check ANTHROPIC_AUTH_TOKEN and that there are no spaces around it. |
| 402 insufficient balance | Top up in Billing. Requests reserve a small amount first and release the unused part. |
| 404 model not found | Use an ID from GET /v1/models; do not shorten the Haiku ID. |
| 429 or 503 | A rate limit or brief capacity pressure. Retry after a few seconds; check the live status. |
Questions
Is this official Anthropic access?
No. Model.sale is an independent reseller of API access and is not affiliated with or endorsed by Anthropic. Claude is a trademark of its owner.
Do you store my prompts?
Request bodies and model output are not stored. Only metadata needed for billing is kept: model, token counts, charge and time. See the privacy policy.
Can I use other tools with the same key?
Yes. The same key works with the Anthropic and OpenAI SDKs, Cursor, Codex and any HTTP client. See the setup guides.