All models / Anthropic

claude-sonnet-5 API pricing and setup

Call this model through XHuoAPI with one key. Below are its prices in each tier, the endpoint formats it accepts, and a request you can copy.

Prices synced

Price by tier

USD per million tokens (per call for per-call models). A token is billed at the price of the tier it was created in; tiers not listed don't offer this model.

TierInputCache readOutput
Standard Default$1.60$0.16$8.00
Saver$1.00$0.10$5.00
Spot$0.60$0.060$3.00
Official$2.00$0.20$10.00

Facts

VendorAnthropic
TypeChat
Endpoint formatsOpenAI Chat CompletionsAnthropic Messages
BillingPer token
Long-context pricingNone
Cache-read priceYes
TiersStandard · Saver · Spot · Official
TestedMinimal request succeeded ·

Monthly cost examples

Estimated at Standard-tier prices, without cache discounts.

10M in + 1M out$24.00
100M in + 20M out$320

Request example

Replace $XHUO_API_KEY with a token from the console. The base URL is https://api.xhuoapi.ai/v1; existing OpenAI SDK code only needs that one change.

curl https://api.xhuoapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $XHUO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Hello"}]}'
from openai import OpenAI

client = OpenAI(base_url="https://api.xhuoapi.ai/v1", api_key="YOUR_XHUOAPI_KEY")
resp = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

This model also accepts the Anthropic Messages format, which is what Claude Code and similar tools use:

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

Use it in your tools

Use XHuoAPI in Claude Code Use XHuoAPI in Cursor Use XHuoAPI in Cline Use XHuoAPI in Chatbox Use XHuoAPI in Open WebUI

More from this vendor

claude-fable-5 claude-fable-5-1 claude-haiku-4-5 claude-opus-4-6 claude-opus-4-7 claude-opus-4-8 claude-opus-5 claude-opus-5-5 claude-sonnet-4-6 claude-sonnet-5-5
Sign up and create a token Pricing API docs Claude vs GPT vs Gemini price comparison