AI KNOWLEDGE DESK

Models · entities · concepts · comparisons · practical tools

GETLLMS.ORG

Claude Sonnet 5

Claude Sonnet 5 is Anthropic's Sonnet-family model for coding, agent workflows, and long-context software engineering, with a 1M-token context window and 128K maximum output.

Platform: Replicate
Language ModelCoding AssistantAgent WorkflowsLong ContextAnthropic
Anthropic API / Amazon Bedrock / Google Vertex AI / Microsoft Foundry
Anthropic API: introductory $2 per million input tokens and $10 per million output tokens through August 31, 2026; standard $3 input and $15 output from September 1; separate prompt-caching and batch-processing rates apply
Commercial

🚀Function Overview

Claude Sonnet 5 is designed for production coding and agent tasks where teams need stronger Sonnet-tier quality, long context, high output limits, and practical pricing relative to Opus or Fable-style escalation models.

Key Features

  • Official dateless pinned model ID claude-sonnet-5
  • 1M-token context window in Anthropic's model overview
  • 128K maximum output for long code, review, and analysis responses
  • Text and image input with text output
  • Coding, code execution, bash, file editing, and agentic tool-use positioning in official docs
  • Available through Anthropic API, Amazon Bedrock, Google Vertex AI, and Microsoft Foundry
  • Introductory Anthropic API pricing of $2 per million input tokens and $10 per million output tokens through August 31, 2026; standard pricing is $3 input and $15 output from September 1

Use Cases

  • Coding-agent default model trials in Claude Code and Anthropic API harnesses
  • Long-context codebase analysis and refactoring tasks
  • Tool-using agent workflows that edit files, run commands, or inspect repositories
  • Production assistant routing where Sonnet-tier quality and cost balance matter
  • Migration testing from Sonnet 4.5, Sonnet 4.6, or older Claude 4.x deployments
  • Escalation comparisons against Opus, Fable, GPT-5.6, GLM, and DeepSeek model routes

⚙️Input Parameters

model

string

Use claude-sonnet-5 for the official dateless pinned Anthropic API model ID.

messages

array

Anthropic Messages API conversation payload for text, vision, coding, and tool-use workflows.

system

string

Optional system instruction for role, tool, coding, and safety constraints.

max_tokens

integer

Maximum output tokens to generate, up to the model's documented max-output limit when the account and provider surface allow it.

tools

array

Optional tool definitions for agent workflows, code execution, file editing, search, and structured tool calls.

thinking

object

Reasoning or effort controls where supported by the current Anthropic API contract; validate migration guidance before changing production prompts.

💡Usage Examples

Example 1

Input Parameters

{
  "model": "claude-sonnet-5",
  "messages": [
    {
      "role": "user",
      "content": "Review this failing TypeScript feature branch, identify the smallest safe fix, and propose the verification command sequence."
    }
  ],
  "max_tokens": 4096
}

Output Results

Claude Sonnet 5 returns a focused debugging plan, identifies the likely broken contract, proposes a minimal patch, and names the tests or build commands needed before merge.

Example 2

Input Parameters

{
  "model": "claude-sonnet-5",
  "messages": [
    {
      "role": "user",
      "content": "Compare whether this codebase migration should use Sonnet 5 by default or escalate only failed slices to a higher-tier model."
    }
  ],
  "max_tokens": 4096
}

Output Results

Claude Sonnet 5 is a strong default candidate for coding-agent work, but the final routing choice should compare validated task success, token cost, latency, and escalation rate in the user's own harness.

Quick Actions

Technical Specifications

Hardware Type
Anthropic API / Amazon Bedrock / Google Vertex AI / Microsoft Foundry
Commercial Use
Supported
Pricing
Anthropic API: introductory $2 per million input tokens and $10 per million output tokens through August 31, 2026; standard $3 input and $15 output from September 1; separate prompt-caching and batch-processing rates apply
Platform
Replicate

Related Keywords

Claude Sonnet 5claude-sonnet-5Anthropic Sonnet 5Claude Sonnet 5 APIClaude Sonnet 5 pricingClaude Sonnet 5 coding modelClaude Code Sonnet 5long-context Claude model