Claude Code · updated 2026-10-14

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

Setup in three steps

  1. Create an account and an API key in the dashboard. The full key is shown once. Add balance, or try the free demo first.
  2. Export the base URL and your key. The Anthropic base URL has no /v1 suffix, the client adds the path itself.
  3. Start claude and select a model, or set one up front with ANTHROPIC_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"

claude

Inside 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.

Security: never paste a real key into a repository, a screenshot or a shared chat. If a key leaks, revoke it in the dashboard and create a new one.

Which model to pick

Model IDGood for
claude-opus-5-5Hard refactors, architecture, long agent runs
claude-sonnet-5-5Everyday coding: the best balance of quality and cost
claude-haiku-4-5-20251001Fast, cheap helper tasks: summaries, renames, quick edits
claude-opus-5, claude-opus-4-8, claude-opus-4-7, claude-opus-4-6Earlier 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 seeWhat it means
401The key is wrong or revoked. Check ANTHROPIC_AUTH_TOKEN and that there are no spaces around it.
402 insufficient balanceTop up in Billing. Requests reserve a small amount first and release the unused part.
404 model not foundUse an ID from GET /v1/models; do not shorten the Haiku ID.
429 or 503A 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.