Core API: Messages, Tools, and Vision

All models, all tiers2 min read

Core API capabilities

💬
Messages API

Conversational completions with system prompts, streaming, temperature control, and stop sequences.

🔧
Tool Use

Define tools as JSON schemas. Claude decides when to call them. Auto, any, and specific tool modes.

👁️
Vision

Send images and PDFs directly. Analyze charts, read documents, describe photos, extract data.

📡
Streaming

Server sent events for real time token by token output. Essential for responsive UIs.

🔍
Web Search

Server side tool. Claude searches the web and synthesizes results. $10 per 1,000 searches.

📝
Citations

Source citations referencing specific passages in your documents for verifiable responses.

Opus 4.6Sonnet 4.6Haiku 4.5
Input per MTok$5$3$1
Output per MTok$25$15$5
Context window200K (1M beta)200K (1M beta)200K
Max output128K tokens64K tokens64K tokens
Extended thinking
Adaptive thinking
Fast modeYes (6x pricing)
Relative speedModerateFastFastest

Choosing the right model

Start with Sonnet 4.6 for most tasks. Upgrade to Opus 4.6 when you need the deepest reasoning, best coding output, or most reliable agent behavior. Use Haiku 4.5 for high volume, latency sensitive tasks like classification, routing, and summarization where speed and cost matter more than peak intelligence.