Back to Models
anthropic logoAnthropic
anthropic-claude-sonnet-5

Claude Sonnet 5

Sonnet 5 is Anthropic's most capable Sonnet-class model, with frontier performance across coding, agents, and professional work. It supports adaptive thinking with selectable reasoning effort levels (low, medium, high, max,...

6/30/2026
1,000,000 tokens
Input: $2.11/M
Output: $10.55/M

Specifications

Modalities

Input
text
image
file
Output
text

Supported Parameters

include_reasoning
max_completion_tokens
max_tokens
reasoning
reasoning_effort
response_format
stop
structured_outputs
tool_choice
tools
verbosity

Max Output Tokens

128,000

Reasoning Configuration

Default
Thinking on (effort: high)
Selectable effort levels
max
xhigh
high
medium
low
Turning thinking off
Possible (reasoning.enabled: false)

How to control thinking, and what it costs

Data policy

Prompt retention
Unknown — we could not confirm
Training
Not used for training

"Unknown" does not mean "safe". It means we could not confirm it.

Whether a provider trains on prompts is a declared value from our terms with them. Retention is determined from the upstream listing for every host this model can reach. Neither is guessed.

Measured performance

Time to first response (p50)1.8s
Throughput (p50)204 tokens/s

    Measured through FastMetal's own gateway over the last 30 days (660 first-response samples).

    Throughput is sampled once a day: the median of 27 observations over the last 30 days.

    Time to first response is measured to the first streamed chunk; throughput counts all output tokens, including reasoning tokens. These are observations, not a performance guarantee.

    Code Examples

    curl https://api.fastmetal.ai/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
        "model": "anthropic-claude-sonnet-5",
        "messages": [{"role": "user", "content": "Hello!"}]
      }'

    How Claude Sonnet 5 actually answers

    Real responses to our standard prompts, recorded on FastMetal.

    Count the number of 'r's in 'strawberry'

    Count the number of 'r's in 'strawberry'. Explain your reasoning step by step.

    # Counting 'r's in "strawberry" **Step 1: Spell out the word letter by letter** s - t - r - a - w - b - e - r - r - y **Step 2: Number each letter position** | Position | Letter | |----------|--------| | 1 | s | | 2 | t | | 3 | **r** | | 4 | a | | 5 | w | | 6 | b | | 7 | e | | 8 | **r** | | 9 | **r** | | 10 | y | **Step 3: Identify and count the 'r's** - Position 3: **r** ✓ (1st r) - Position 8: **r** ✓ (2nd r) - Position 9: **r** ✓ (3rd r) **Answer: There are 3 r's in "strawberry"**
    5.9s response405 output tokens

    Debug This Error

    I'm getting the following error in my Node.js application: TypeError: Cannot read properties of undefined (reading 'map') at UserList (/app/components/UserList.js:12:25) at renderWithHooks (/app/node_modules/rea…

    # Root Cause The `UserList` component receives `users` as a prop, but at the time it's rendered, `users` is `undefined` — not an empty array, but literally missing. When your code tries to call `.map()` on `undefined`, JavaScript throws that `TypeError`. This typically happens when: - The parent component hasn't fetched the data yet (e.g., an API call is still in progress) - The prop name doesn't match what's being passed down (typo) - The data source (API/state) genuinely returns `undefined` in some case # Fixes **1. Add a default prop value (quick fix)** ```jsx function UserList({ users = [] }) { return ( <ul> {users.map(user => <li key={user.id}>{user.name}</li>)} </u…
    8.8s response750 output tokens

    Code Review

    Please review the following Python function and suggest improvements for readability, performance, and best practices: def get_data(url, retries=3): import requests import time for i in range(retries):…

    ## Review of `get_data` Function Here's an improved version followed by an explanation of the changes: ```python import logging import time from typing import Any import requests logger = logging.getLogger(__name__) def get_data( url: str, retries: int = 3, timeout: float = 10.0, backoff_factor: float = 2.0, ) -> list[dict[str, Any]]: """ Fetch active items from the given URL. Args: url: The endpoint to fetch data from. retries: Number of attempts before giving up. timeout: Request timeout in seconds. backoff_factor: Multiplier for exponential backoff between retries. Returns: A list of dicts with "name" and "id"…
    14.0s response1299 output tokens

    Compare these answers side by side with other models →

    Frequently asked questions

    How much does the Claude Sonnet 5 API cost?
    On FastMetal, Claude Sonnet 5 is billed per token: $2.11 per 1M input tokens and $10.55 per 1M output tokens on a US-dollar account, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
    Can I call Claude Sonnet 5 with the OpenAI SDK?
    Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "anthropic-claude-sonnet-5" as the model; existing OpenAI-style code works unchanged, including streaming, tool calls and structured output.
    What is the context window of Claude Sonnet 5?
    1,000,000 tokens, shared between the prompt and the response.
    What do I need to try Claude Sonnet 5?
    Create an account and add credit; the model is then available both in the browser chat and over the API. There is no contract or minimum spend.

    Try Claude Sonnet 5 right now

    Claude Sonnet 5 is available on FastMetal through one API key. Start in the browser, or call it from the OpenAI SDK.