Anthropic

Claude Sonnet 4 (thinking) API

US Anthropic
Coba di Playground → Dapatkan Kunci API

Claude Sonnet 4 (thinking) adalah model penalaran dari Anthropic. Model ini menawarkan penalaran langkah demi langkah. Tersedia melalui API terpadu MeshTok.

GambarPenalaranKodeAlat

Harga (daftar resmi, per 1M token)

Input
$3.00/M
Output
$15.00/M

Spesifikasi

Jendela konteks200K token Modalitas inputGambar StreamingYa APIKompatibel dengan OpenAI

Cara menggunakan Claude Sonnet 4 (thinking)

Pengganti langsung OpenAI. Ubah hanya base_url dan model.

# Python - pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://meshtok.com/v1",
    api_key="sk-your-MeshTok-key",
)

resp = client.chat.completions.create(
    model="anthropic/claude-sonnet-4:thinking",
    messages=[{"role":"user","content":"Hello!"}],
)
print(resp.choices[0].message.content)
# cURL
curl https://meshtok.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-MeshTok-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-sonnet-4:thinking","messages":[{"role":"user","content":"Hello!"}]}'

Model terkait

Model lain yang mungkin Anda pertimbangkan.