Skip to main content
Claude Sonnet 4.6 is Anthropic’s latest and most capable Sonnet model, available through AnyFast via an OpenAI-compatible interface. It delivers state-of-the-art performance in coding, reasoning, and analysis while maintaining excellent speed and efficiency.

Key capabilities

  • OpenAI-compatible — Works as a drop-in replacement with the OpenAI SDK
  • State-of-the-art coding — Best-in-class performance on code generation, debugging, and refactoring
  • Advanced reasoning — Significantly improved multi-step problem solving and analysis
  • Fast and efficient — Maintains Sonnet-class speed with the highest capability
  • Long context — Handles large documents and multi-turn conversations
  • Streaming — Supports real-time token streaming via SSE

Quick example

curl https://www.anyfast.ai/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [
      { "role": "user", "content": "Write a Python function to merge two sorted arrays." }
    ]
  }'

Parameters

ParameterTypeRequiredDescription
modelstringYesMust be claude-sonnet-4-6
messagesarrayYesList of { role, content } objects
max_tokensintegerNoMaximum tokens to generate
temperaturefloatNo02. Controls randomness. Default: 1
streambooleanNoEnable SSE streaming. Default: false
top_pfloatNoNucleus sampling threshold. Default: 1
stopstring / arrayNoSequences that stop generation

API Reference

View the interactive API playground for Claude Sonnet 4.6.