Claude API
Official docs outline
17 sections- Models overview
Claude model families (Opus, Sonnet, Haiku), model IDs and aliases, context window and max output limits, capability and cost tradeoffs when choosing a model.
- Messages API
The Messages API request/response shape: roles, user/assistant turns, system prompt, content blocks, max_tokens, stop_reason, stateless multi-turn conversations, prefilling.
- Context windows and token counting
Context window size, input vs output tokens, context accumulation across turns, token counting endpoint, truncation and context awareness.
- Streaming
Server-sent events streaming, message_start/content_block_delta/message_stop events, partial JSON deltas for tool input, handling stream errors and incremental rendering.
- Tool use
Function calling: defining tools with JSON schema, tool_use and tool_result content blocks, the client-side tool loop, tool_choice, server tools such as web search.
- Structured outputs
Getting guaranteed JSON/schema-conforming responses, JSON schema output formats, strict tool use, validation of model output.
- Prompt caching
cache_control breakpoints, cache TTL, cache reads and writes pricing, prefix matching, reducing latency and cost for repeated prompt prefixes.
- Extended thinking
Extended thinking and reasoning: thinking budget, thinking content blocks, signatures, interleaved thinking with tools, reasoning effort.
- Vision and image input
Sending images as base64 or URL content blocks, supported formats and size limits, image token cost, multimodal prompting.
- PDF support and Files API
Uploading files once and referencing by file_id, PDF document blocks, reusing files across requests, file size limits.
- Citations
Document-grounded answers with citations, citation content blocks, source passages and character/page locations for RAG attribution.
- Embeddings
Text embeddings for semantic search and retrieval, vector similarity, choosing an embedding provider and model for RAG.
- Batch processing
Message Batches API for asynchronous bulk requests, custom_id, batch status polling, results retrieval, discounted pricing and 24h completion window.
- Context editing
Managing long-running conversations by clearing old tool results and thinking blocks, context management strategies for agents.
- MCP connector
Connecting the Messages API to remote MCP servers directly, mcp_servers parameter, tool toolsets and authorization tokens.
- Rate limits
Requests per minute, input/output tokens per minute, usage tiers, rate limit headers, 429 responses, retry-after and backoff.
- API errors
HTTP error codes (400, 401, 403, 404, 413, 429, 500, 529 overloaded), error response format, request IDs, retry strategies and SDK error handling.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.