Models/anthropic

claude-sonnet-4· Released May 22, 2025

anthropic/claude-sonnet-4

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%),...

Input
From$2.805/M
Output
From$14.025/M
Context
Up to 1M
Max output
Up to 64K
Modalities
ImageTextFileText

Input and output show the lowest price across upstreams, for reference. Your actual prices are listed per upstream below.

Upstreams & pricing
UpstreamContextMax outputInput $/1MOutput $/1MCached input $/1M
Zenlayer AI Gateway - anthropic (Global)From price
1M64K
≤200K$2.805
>200K$5.61
≤200K$14.025
>200K$21.0375
≤200K$0.2805
>200K$0.561

Routed in real time — you pay the listed price of whichever upstream serves your call.

How to call
curlrequest.sh
curl https://api.tkex.ai/v1/chat/completions \
  -H "Authorization: Bearer $TX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4",
    "messages": [
      {"role": "user", "content": "Say hello in five words."}
    ]
  }'