Claude Sonnet 5 API
claude-sonnet-5Claude Sonnet 5 — frontier reasoning and generation through one API.
by Anthropic
Pricing: Input 80 credits / 1M tokens (≈ $0.8), Output 498.41 credits / 1M tokens (≈ $4.9841). Cached Input 8 credits / 1M tokens (≈ $0.08), Cache Writes 100 credits / 1M tokens (≈ $1) — applied automatically when the upstream reports cached tokens for your prompt; there is no field to request them.
Save up to 76%with the $1,250 top-up pack (+10% bonus) — 73% lower than direct rates even without itTop up24H Status Monitor
OperationalAffordable Claude Sonnet 5 API on you.bot
Anthropic Claude Sonnet 5 — a frontier model pairing deep step-by-step reasoning with fast, high-quality generation for demanding tasks.
Claude Sonnet 5 API pricing & guide (2026)
Claude Sonnet 5 — frontier reasoning and generation through one API. Through you.bot you call the Claude Sonnet 5 API by Anthropic on the same unified endpoint as every other model — one key, one integration.
On you.bot, the Claude Sonnet 5 API costs about $0.80 per 1M tokens — roughly 73% cheaper than the official Anthropic price of $3. You only pay for successful generations; failed tasks are never charged.
Billing is pay-as-you-go in credits (1 credit = $0.01 USD) — no subscription, no monthly minimum, and credits never expire. So Claude Sonnet 5 API pricing in 2026 is easy to predict: you pay per successful call and nothing for failures.
Core capabilities of the Claude Sonnet 5 API
Extended thinking
Turn on the thinking process to watch Claude reason through hard problems step by step before it answers.
Multi-turn memory
Holds context across long, multi-turn conversations so every follow-up builds naturally on what came before.
Streaming with limits
Stream responses token-by-token for a responsive experience while capping output length with a single max_tokens setting.
Where the Claude Sonnet 5 API fits in production
Every image below was generated on you.bot with the Claude Sonnet 5 API itself — no stock photography.

Search that answers
Turn your own content into answers with citations instead of ten blue links.

Meeting notes into tasks
Transcript in, owner-and-deadline list out.

Classification at volume
Route tickets, tag content and score leads on your own rules.

Rewrites in your voice
Same message, tuned for the channel and the market.

Data cleanup
Normalise messy records without a bespoke parser per source.

Evaluation and grading
Score model output against your own rubric at scale.
Claude Sonnet 5 API compared with the rest of its family
The same prices this page charges, side by side — so you can see what a version step costs before you switch.
| Model | Cached Input · 1M tokens | Input · 1M tokens | Cache Writes · 1M tokens | Output · 1M tokens |
|---|---|---|---|---|
| Claude Sonnet 5.5 | 7.5 cr$0.075 | 75 cr$0.750 | 93.75 cr$0.938 | 375 cr$3.75 |
| Claude Sonnet 5this page | 8 cr$0.080 | 80 cr$0.800 | 100 cr$1.00 | 498.41 cr$4.98 |
| Claude Sonnet 4.6 | 15.37 cr$0.154 | 153.67 cr$1.54 | 192.08 cr$1.92 | 770.2 cr$7.70 |
| Claude Sonnet 4.5 | 19.55 cr$0.196 | 195.48 cr$1.95 | 244.34 cr$2.44 | 978.71 cr$9.79 |
How to access and deploy the Claude Sonnet 5 API on you.bot
Get your API key
Create a key in the dashboard — one key works across every model on the platform.
Call the Claude Sonnet 5 endpoint
POST your prompt and parameters to /api/v1/generate with your key in the Authorization header.
Read the response
Completions are returned synchronously in the JSON response — no polling needed.
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer sk-live-..." \
-H "Content-Type: application/json" \
-d '{
"modelId": "claude-sonnet-5",
"input": { "prompt": "..." }
}'Claude Sonnet 5 API on you.bot vs going direct
| Feature | you.bot | Going direct |
|---|---|---|
| Price per 1M tokens | $0.80 | $3 |
| Failed-task billing | Free (auto-refund) | Charged |
| Integration | One unified API | Per-vendor SDKs |
| Credit expiry | Never | Varies |
4.9
Based on 1,200+ developer reviews
Why choose you.bot for the Claude Sonnet 5 API
73% cheaper
Lower rates than going direct to Anthropic — and you only pay for successful runs.
Production-grade reliability
Monitored availability with automatic credit refunds on failed jobs.
One API for everything
Swap models freely without touching your integration or juggling vendors.
FAQs about the Claude Sonnet 5 API
Claude Sonnet 5 is billed per 1M tokens at about $0.80 on you.bot — and you only pay for successful generations.
Yes — output can be used in commercial projects, subject to the upstream provider's usage policy.
Completions are returned synchronously in the API response.
Yes — it's the same Anthropic model, accessed through you.bot's unified API at better rates.
Yes. Besides the prompt, the Claude Sonnet 5 API accepts `images` (image). Pass a public URL for each file, or upload it in the playground.
Yes — set `reasoning_effort` to Low, Medium, High, XHigh, Max. Higher effort uses more output tokens. The default is High.
Yes — set `stream` to true to receive the answer token by token as it is generated.
Yes — turn on `web_search` and the model can look up current information before it answers.
Anthropic
Claude Sonnet 5 API code example
/api/v1/generateClaude Sonnet 5 — frontier reasoning and generation through one API.
Overview
Claude Sonnet 5 is a single synchronous call: POST /api/v1/generate and the generated text is returned inline in the response — no polling step.
Authentication
All requests require a Bearer Token in the header:
Authorization: Bearer YOUR_API_KEYRequest parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| modelId | string | Yes | Model id: `claude-sonnet-5` |
| input | object | Yes | Input parameters object (see below) |
input object parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text value · default: Turn these release notes into a customer-facing changelog entry: "fixed a race in the upload queue; added retry on 502; raised the per-file cap from 10MB to 50MB". Write one sentence per change in plain language a non-engineer understands, lead with what they can now do, and end with a single line saying what needs no action. No jargon, no version numbers, under 120 words. |
| thinking | boolean | No | Include the model's thinking process in the response (true/false) · default: true |
| reasoning_effort | string | No | How much the model reasons before it answers (Anthropic's effort levels). Higher levels think longer and use more output tokens; at Max, set a larger max_tokens. (options: Low, Medium, High, XHigh, Max) · default: High |
| max_tokens | number | No | Optional Claude output token limit. Leave empty to use the default: 16000, because this model reasons before it answers unless thinking is turned off (then 4096). (range 1–128000) |
| stream | boolean | No | Send true to receive the reply as an event stream (Content-Type: text/event-stream). Omit it and you get a single JSON response — streaming is opt-in on this endpoint. (true/false) · default: true |
| images | string[] | No | Up to 4 images per message — JPEG, PNG, GIF or WebP, 5 MB each. Send each one as a data: URL or an https URL. Images are billed as input tokens. (image URL) |
| web_search | boolean | No | Web search feeds the results back as input tokens, so a searched turn typically costs many times a normal turn (measured: 6–87×). Billed per token as usual — nothing extra per search. (true/false) · default: false |
| tools | array | No | Functions the model may call, up to 64. Each is { "type": "function", "function": { "name", "description", "parameters" } } with `parameters` a JSON Schema object (the flat Responses form and Anthropic's { "name", "description", "input_schema" } are accepted too); `strict: true` is not accepted on this model. When the model calls one, the response carries `toolCalls`: run the function, then send the conversation back in `messages` with the assistant's `tool_calls` and one { "role": "tool", "tool_call_id", "content" } message per result — and the same `tools` again. Function calling cannot be combined with web search in the same request. |
| tool_choice | string | object | No | `auto` (the model decides; the default when `tools` is set), or `required` (at least one call). Other values are not available on this model and are refused before any charge. |
Response
The result is returned inline in the POST /api/v1/generate response (no polling):
{ "model": "…", "text": "…", "creditsCharged": …, "usage": { … } } // returned directly by /api/v1/generateError codes
| Code | Description |
|---|---|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed — check API Key |
| 402 | Insufficient account balance |
| 403 | IP not allowed for this key, or the key is restricted to other models |
| 404 | Task not found, or it has expired |
| 409 | Duplicate request — an identical submit arrived moments ago. Nothing was charged; retry is safe |
| 413 | Payload too large — see the character and file-size limits for this model |
| 429 | Rate limit exceeded — retry after the Retry-After header |
| 500 | Internal server error |
| 504 | Upstream timed out — nothing was delivered; retry is safe |
| 400 · too_many_images | More than 4 image(s) attached to one message |
| 400 · image_too_large | An attached image is over the 5 MB per-image limit |
| 400 · image_format_unsupported | Unsupported image format — accepted: image/jpeg, image/png, image/gif, image/webp (read from the file's own bytes, not the declared type) |
| 400 · image_unreadable | An attached image, or its pixel size, could not be read |
| 400 · capability_not_supported | A capability was requested (e.g. `web_search: true`) that this model does not offer — refused, nothing charged, rather than answered without it |
| 422 · image_not_received | The model answered that it did not receive the attached image — the reply is not usable, so nothing is charged. Retry |
| 400 · unknown_image_field | Images were sent under a different key (input_urls, image_urls, imageUrl …). This model takes them as `images` |
| 400 · image_placement_unsupported | An image is attached to a message that is not sent to the model as an image (a system message, an assistant message or a tool result), or `images` was sent next to `messages` that contain no user message. Attach images to a user message — they are refused rather than dropped |
| 400 · tools_invalid | `tools` is malformed (not an array, a non-function tool, a bad or repeated name, parameters that are not an object schema), or a conversation with function calls was sent without `tools` — refused, nothing charged |
| 400 · tool_choice_invalid | `tool_choice` is malformed, names a function that is not in `tools`, or forces a call while `tools` is empty — refused, nothing charged |
| 400 · message_tool_call_invalid | An assistant `tool_calls` entry or a `tool` message is malformed, or a call and its result do not pair up (every call needs its own tool message right after it) — refused, nothing charged |
| 400 · message_tool_block_unsupported | A `tool_use` or `tool_result` content block was sent; send calls as `tool_calls` and results as `tool` messages instead |
curl --location 'https://you.bot/api/v1/generate' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"modelId": "claude-sonnet-5",
"input": {
"prompt": "Turn these release notes into a customer-facing changelog entry: \"fixed a race in the upload queue; added retry on 502; raised the per-file cap from 10MB to 50MB\". Write one sentence per change in plain language a non-engineer understands, lead with what they can now do, and end with a single line saying what needs no action. No jargon, no version numbers, under 120 words.",
"thinking": true,
"reasoning_effort": "High",
"max_tokens": 4096,
"stream": false,
"images": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAFklEQVR4nGP8z4AATAxIHFQeMg8OAgB1yQIDpk8YwwAAAABJRU5ErkJggg=="
],
"web_search": false
}
}'{
"model": "claude-sonnet-5",
"text": "…",
"creditsCharged": 0.17,
"usage": {
"inputTokens": 1400,
"outputTokens": 120,
"cachedInputTokens": 0,
"cacheWriteTokens": 0
}
}



