Claude Sonnet 5 API

Anthropic's Sonnet 5, the mid-tier model before Sonnet 5.5

anthropic/claude-sonnet-5
AnthropicConversation

About this model

Claude Sonnet 5 was released by Anthropic on June 30, 2026, as the mid-tier model of the Claude 5 generation. Anthropic now lists it as a legacy model and recommends Claude Sonnet 5.5, which came out on September 28, 2026. Higher-risk security requests sent to Sonnet 5.5 fall back to Sonnet 5.

Anthropic lists a 1M-token context window, 128K output tokens, adaptive thinking, text and image input, and a January 2026 reliable knowledge cutoff. Setting temperature, top_p or top_k returns an error. In this catalog it has a 323,991-token context window and vision.

Pick Sonnet 5 when you want to keep to a tested version; otherwise Sonnet 5.5 is the recommended Sonnet.

Use cases

  • Everyday coding
  • Document and data work
  • Image understanding

Input and output

Input
Text and images
Output
Text, tool calls

Developer

Developer
Anthropic
Type
Conversation
Context
323,991 tokens
Capabilities
Image input

Claude Sonnet 5 request example

Use https://gatelum.com/v1 as the base URL and pass anthropic/claude-sonnet-5 in the model field. You create the key in your account after signing up.

curl --silent --show-error --fail-with-body \
  --header 'Authorization: Bearer glt_YOUR_KEY' \
  'https://gatelum.com/v1/chat/completions' \
  --header "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "anthropic/claude-sonnet-5",
  "messages": [
    {
      "role": "user",
      "content": "Hi! Tell me about yourself in two sentences."
    }
  ]
}
JSON
Claude Code and Anthropic-protocol clients

For clients using the Anthropic protocol, point the address at ANTHROPIC_BASE_URL=https://gatelum.com with no /v1. The model ID does not change.

macOS / Linux
export ANTHROPIC_BASE_URL=https://gatelum.com
export ANTHROPIC_AUTH_TOKEN=glt_YOUR_KEY
export ANTHROPIC_MODEL=anthropic/claude-sonnet-5
claude

Where to use Claude Sonnet 5

Guides with step-by-step instructions for the tools that support this model: