Claude Sonnet 5 是 Anthropic 的均衡模型,被廣泛認為是程式碼、長上下文分析和細緻推理的首選。它生成清晰、結構良好的輸出,並能可靠地遵循複雜指令。
可直接取代 OpenAI。只需變更 base_url 和 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-5", 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-5","messages":[{"role":"user","content":"Hello!"}]}'
其他您可能考慮的模型。
Anthropic’s most capable model.
Fast and cost-efficient.
Step-by-step reasoning model.
General-purpose chat model.