Anthropic
Anthropic

Claude 3.7 Sonnet

anthropic/claude-3-7-sonnet

Claude 3.7 Sonnet can produce near-instant responses or extended, step-by-step thinking that is made visible to the user. API users also have fine-grained control over how long the model can think for. Claude 3.7 Sonnet shows particularly strong improvements in coding and front-end web development. Along with the model, we’re also introducing a command line tool for agentic coding, Claude Code. Claude Code is available as a limited research preview, and enables developers to delegate substantial engineering tasks to Claude directly from their terminal.

Capability

Vision Support

Tools

Function Calling

Context Window

200,000

Max Output Tokens

8,192

Using Claude 3.7 Sonnet with Python API

Using Claude 3.7 Sonnet with OpenAI compatible API

import openai

client = openai.Client(
  api_key= '{your_api_key}',
  base_url="https://api.model.box/v1",
)
response = client.chat.completions.create(
model="anthropic/claude-3-7-sonnet",
messages: [
  {
    role: 'user',
    content:
      'introduce your self',
    },
  ]
)
print(response)