AI Models/Anthropic/Anthropic: Claude Sonnet 4
AnthropicChat

Anthropic: Claude Sonnet 4

anthropic/claude-sonnet-4
1000KContext Window
64KMax Output
Supported Protocols:max_tokenstop_ptemperaturestopreasoninginclude_reasoningtoolstool_choice
Normal

Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%), Sonnet 4 balances capability and computational efficiency, making it suitable for a broad range of applications from routine coding tasks to complex software development projects. Key enhancements include improved autonomous codebase navigation, reduced error rates in agent-driven workflows, and increased reliability in following intricate instructions. Sonnet 4 is optimized for practical everyday use, providing advanced reasoning capabilities while maintaining efficiency and responsiveness in diverse internal and external scenarios. Read more at the [blog post here](https://www.anthropic.com/news/claude-4)

Capabilities

👁 Vision🧠 Reasoning🔧 Function CallingText GenerationCode GenerationAnalysis & ReasoningReasoning

Technical Specs

Input Modality
Image、Text、Text
Output Modality
Text
Arch
Default Temperature
0.7
Default Top_P
1

Pricing

Pay per use, no monthly fees
Billing TypeUnitPrice
Text Input$3.0000/M tokens
Text Output$15.0000/M tokens
Cache Read$0.3000/M tokens
Cache Write 1h$3.7500/M tokens
Cache Write$3.7500/M tokens
Reasoning$3.0000/M tokens
Web Search$0.0100/次

Quick Start

from openai import OpenAI

client = OpenAI(
    base_url="https://api.uniontoken.ai/v1",
    api_key="YOUR_UNIONTOKEN_API_KEY",
)

response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4",
    messages=[
        {"role": "user", "content": "Hello!"}
    ],
)

print(response.choices[0].message.content)

FAQ

Ready to get started?

Get 1M free tokens on registration, no monthly fees or minimum spend

Register Now →