How do I run Claude Sonnet 5 in Claude Code without a Claude subscription?
Pin anthropic/claude-sonnet-5 on a Standard Compute key and Claude Code runs Sonnet 5 on a monthly plan from $19, drawing on a fixed compute budget where new requests get HTTP 402 at 100% instead of a token bill. Sonnet 5.5 is on the same key.
| Model | Anthropic's mid-tier Claude 5 model. Anthropic now lists it as a legacy model that is still available. |
|---|---|
| Model ID | anthropic/claude-sonnet-5Short form claude-sonnet-5 also works |
| Model ID, EU pin | anthropic/claude-sonnet-5:euUS pin: anthropic/claude-sonnet-5:us, text only; the base ID and EU pin also take images and files |
| Base URL | https://api.stdcmpt.com/v1Claude Code uses https://api.stdcmpt.com |
| Context | 1M tokens at AnthropicA request here takes up to about 850K input and 50K output tokens |
| Input | Text, images and files |
| Reasoning | minimal, low, medium or high, set per model on the Models page |
Copy a working config
Use the full ID in every agent; Claude Code's short names do something else here, as the list below explains.
# Install the Standard Compute launcher once
curl -fsSL https://standardcompute.com/cli/install.sh | sh
# Start Claude Code with anthropic/claude-sonnet-5 as the main model
standardcompute launch claude -- --model anthropic/claude-sonnet-5
# Or configure it yourself. No /v1 here: Claude Code adds /v1/messages.
export ANTHROPIC_BASE_URL=https://api.stdcmpt.com
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
export ANTHROPIC_MODEL=anthropic/claude-sonnet-5
# Set every slot: Claude Code's own claude-*-5-5 names return model_not_found
export ANTHROPIC_DEFAULT_OPUS_MODEL=anthropic/claude-sonnet-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=anthropic/claude-sonnet-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=anthropic/claude-sonnet-5
claude
Replace YOUR_API_KEY with a key from the dashboard. This config reads your key from STANDARDCOMPUTE_API_KEY; export it with a key from the dashboard. Full setup: Claude Code, OpenCode, Codex CLI.
What it costs
| Per 1M tokens | Sonnet 5 | Sonnet 5.5 |
|---|---|---|
| Input | $2.00 | $2.00 |
| Cache hit | $0.20 | $0.10 |
| 5-minute cache write | $2.50 | $2.50 |
| Output | $10.00 | $10.00 |
Anthropic standard API rates. Anthropic kept Sonnet 5's launch price as its standard price; the rise it had planned for September did not happen. Source: Anthropic API pricing, checked October 13, 2026.
The only price difference from Sonnet 5.5 is the cache-hit rate, and a coding agent's prompt is mostly cache hits. Move to Sonnet 5.5 unless an existing setup depends on Sonnet 5.
What works differently here
- Claude Code's thinking toggle does nothing here. The Messages endpoint ignores the thinking parameter and returns no thinking blocks; the reasoning level comes from the default you set under Customize on the Models page.
- Claude Code's short names (sonnet, opus, haiku) are treated as smart routing so old setups keep working, and the subagents that use them follow your selection rather than Sonnet 5.
- A saved Models page selection holding Sonnet 5 is not upgraded to Sonnet 5.5 automatically.
Other ways to run Claude Sonnet 5
| Anthropic APIPay per token | First-party. Batch requests are half price and prompt caching is yours to set up. |
|---|---|
| Claude Pro / MaxSubscription | Claude Code's native sign-in, with session and weekly limits instead of a token bill. |
| Bedrock / Vertex / FoundryPay per token | Cloud billing for procurement teams. On Bedrock the ID is anthropic.claude-sonnet-5. |
| Standard ComputeMonthly plan | One key for Claude Code, Codex and OpenCode, with Claude next to GPT, Gemini and open models. |
FAQ
Can I keep Sonnet 5 requests in the EU?
Yes, with the EU pin. It runs on Google Cloud's European Vertex endpoint and takes the same inputs as the base ID.
Do I need a Claude subscription to use Claude Code this way?
No. Claude Code only needs a base URL and a token that speak the Messages API. Your Claude login stays as it is, and running claude without the launcher still uses it.
Does a flat-rate plan with Sonnet 5 beat a metered Anthropic bill?
The math: a metered month costs input millions x $2 plus output millions x $10, at Sonnet 5's list price. A Standard Compute budget is drawn at Sonnet 5's per-token rate too, so Pro ($249 a month, $249 budget) buys $249 of pinned Sonnet 5 usage, the same as you pay, and the bill cannot pass $249. The bigger saving is routing, which sends routine steps to efficient models so the same budget covers far more agent work than Sonnet 5 pinned. If your month is far above $249 of Sonnet 5 and you want every step on Sonnet, a metered key or a bigger plan is the honest answer.
Create your key
Sign in, create a key in the dashboard and paste it into the config above.