Claude Sonnet 5 API

Call Claude Sonnet 5 through Wokey and review published catalog pricing, upstream-native API forms, context, and model capabilities.

Model ID
claude-sonnet-5
Vendors
anthropic
Supply status
Currently callable

Catalog pricing snapshot

Prices are per 1M tokens; request-time pricing controls settlement.

MeterWokeyOfficial referenceSavings
Input$0.36$282%
Output$1.8$1082%
Cache read$0.036$0.282%
Cache write$0.72$482%

Official price source: https://platform.claude.com/docs/en/about-claude/pricing

Model capabilities

Context
1,000,000 tokens
Max output
128,000 tokens
Streaming
Supported
Tools
Supported
Vision
Supported
Supported API forms
/v1/messages

Send a request

/v1/messages

curl https://api.wokey.ai/v1/messages \
  -H "x-api-key: $WOKEY_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-5","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'

Use Claude Sonnet 5 in your tools

The gateway is https://api.wokey.ai (OpenAI-compatible clients usually take https://api.wokey.ai/v1), and the model ID is claude-sonnet-5. Open the guide for the client you use.

Claude Code

export ANTHROPIC_BASE_URL="https://api.wokey.ai"
export ANTHROPIC_AUTH_TOKEN="$WOKEY_API_KEY"
export ANTHROPIC_MODEL="claude-sonnet-5"

Example production call

These usage values come from a completed Claude Sonnet 5 call that succeeded on its first attempt and was reconciled with its bill.

Total input
615269
Output
1297
Cached share of input
99.9%
Call duration
13.98 s

Usage field example

Compiled from this call’s billing record. input_tokens is uncached input; cache reads and writes are separate.

{
  "model": "claude-sonnet-5",
  "usage": {
    "input_tokens": 2,
    "output_tokens": 1297,
    "cache_read_input_tokens": 614663,
    "cache_creation_input_tokens": 604
  }
}

Token accounting

These are the final per-million-token rates recorded for this call.

MeterTokensRate for this call / 1M
Uncached input2$0.36
Cache read614663$0.036
Cache write (1 hour)604$0.72
Output1297$1.8
Billed amount
$0.024898

Cost = sum of tokens × their rate ÷ 1,000,000, rounded to six decimals after summing.

Source of this call

The transport record points to api.anthropic.com with OAuth authorization. Usage was metered upstream and the request returned HTTP 200.

About Provider Node · Integration docs

Verify Prompt Cache

  1. Keep the system, tools, and conversation prefix fixed and mark cache_control according to the cache rules.
  2. Check cache_creation_input_tokens on the first response, then reuse the prefix and check cache_read_input_tokens on the next.
  3. Reconcile uncached input, cache reads, cache writes, and output separately. Total input is the sum of the three input buckets.

Frequently asked questions

How much does the Claude Sonnet 5 API cost, and how much does it save versus the official API?

Wokey lists input at $0.36 per 1M tokens and output at $1.8 per 1M tokens; the official references are $2 and $10. That is 82% lower for input and 82% lower for output. Request-time pricing controls settlement, and the vendor pricing source is linked on this page.

What is the Claude Sonnet 5 API model ID?

The model ID for Claude Sonnet 5 on Wokey is claude-sonnet-5. Use it exactly as written in the request body's model field or in your client's model setting (for example ANTHROPIC_MODEL in Claude Code, or model in the Codex CLI config.toml); GET https://api.wokey.ai/v1/models also lists it.

Which API forms does Claude Sonnet 5 support, and how do I call it through Wokey?

Claude Sonnet 5 supports /v1/messages (Messages requests). Set the API base URL to https://api.wokey.ai, authenticate with a Wokey API key, and use the canonical model ID claude-sonnet-5; you can start with /v1/messages. The Send a request section includes a curl example for every supported API form.

How do I use Claude Sonnet 5 in Claude Code?

Claude Code calls Claude Sonnet 5 over /v1/messages. Set ANTHROPIC_BASE_URL="https://api.wokey.ai", ANTHROPIC_AUTH_TOKEN to your Wokey API key, and ANTHROPIC_MODEL="claude-sonnet-5", then start claude. Claude Desktop also uses /v1/messages; the setup guides cover both step by step.

What are the context window and maximum output for Claude Sonnet 5?

The catalog context window is 1,000,000 tokens and the maximum output is 128,000 tokens. These are separate limits, and a request must also satisfy the upstream constraints in effect when it is processed.

How are cache reads and cache writes priced for Claude Sonnet 5?

Cache read: Wokey lists $0.036 per 1M tokens and the official reference is $0.2 per 1M tokens. Cache write: Wokey lists $0.72 per 1M tokens and the official reference is $4 per 1M tokens.

How does calling Claude Sonnet 5 through Wokey differ from OpenRouter?

Wokey lists Claude Sonnet 5 at $0.36 input / $1.8 output per 1M tokens, against an official reference of $2 / $10. OpenRouter states it adds no markup on inference and charges its fee when you buy credits (5.5% by card). Wokey carries a curated set of models and has no per-provider routing parameters, so OpenRouter fits better if you need a wider catalog. The OpenRouter alternative page has the full comparison.

How do Claude Sonnet 5 and Claude Sonnet 5.5 differ in price and context?

In the published price comparison, Claude Sonnet 5 lists input/output at $0.36 / $1.8 with a 1,000,000-token context window; Claude Sonnet 5.5 lists $0.3 / $1.5 with a 1,000,000-token context window. This is a factual price-and-capacity comparison, not a quality ranking; also compare their supported API forms and capabilities.

Related models and documentation

Get API key · claude-sonnet-5