Extra Credit

Claude API

Official docs outline

17 sections
  1. 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.

  2. 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.

  3. Context windows and token counting

    Context window size, input vs output tokens, context accumulation across turns, token counting endpoint, truncation and context awareness.

  4. 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.

  5. 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.

  6. Structured outputs

    Getting guaranteed JSON/schema-conforming responses, JSON schema output formats, strict tool use, validation of model output.

  7. Prompt caching

    cache_control breakpoints, cache TTL, cache reads and writes pricing, prefix matching, reducing latency and cost for repeated prompt prefixes.

  8. Extended thinking

    Extended thinking and reasoning: thinking budget, thinking content blocks, signatures, interleaved thinking with tools, reasoning effort.

  9. Vision and image input

    Sending images as base64 or URL content blocks, supported formats and size limits, image token cost, multimodal prompting.

  10. PDF support and Files API

    Uploading files once and referencing by file_id, PDF document blocks, reusing files across requests, file size limits.

  11. Citations

    Document-grounded answers with citations, citation content blocks, source passages and character/page locations for RAG attribution.

  12. Embeddings

    Text embeddings for semantic search and retrieval, vector similarity, choosing an embedding provider and model for RAG.

  13. Batch processing

    Message Batches API for asynchronous bulk requests, custom_id, batch status polling, results retrieval, discounted pricing and 24h completion window.

  14. Context editing

    Managing long-running conversations by clearing old tool results and thinking blocks, context management strategies for agents.

  15. MCP connector

    Connecting the Messages API to remote MCP servers directly, mcp_servers parameter, tool toolsets and authorization tokens.

  16. Rate limits

    Requests per minute, input/output tokens per minute, usage tiers, rate limit headers, 429 responses, retry-after and backoff.

  17. 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.

All 39