Back to Models
anthropic logo
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
#13 Code (Overall)
Input: ¥357.4/M
Output: ¥1,787/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
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 →

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.

Leaderboard
Text
🏆OverallELO: 1,460
#44
🇯🇵JapaneseELO: 1,469
#14
🇨🇳ChineseELO: 1,496
#49
🇰🇷KoreanELO: 1,413
#47
🇬🇧EnglishELO: 1,470
#42
frenchELO: 1,491
#24
germanELO: 1,445
#49
spanishELO: 1,448
#54
russianELO: 1,459
#46
💻CodingELO: 1,522
#19
🧮MathELO: 1,469
#33
✍️Creative WritingELO: 1,426
#60
📝Instruction FollowingELO: 1,460
#34
🌶️Hard PromptsELO: 1,490
#32
💬Multi-TurnELO: 1,470
#47
Vision
🏆OverallELO: 1,271
#26
Code
🏆OverallELO: 1,543
#13