Claude Cookbooks is a collection of code examples and guides for building with the Claude API. Each recipe is a Jupyter notebook or Markdown guide with snippets you can copy into your own project. The examples are written in Python, and the patterns transfer to any language that can call the API. You need a Claude API key to run them; newcomers are pointed to the Claude API Fundamentals course first.
Recipes are grouped by theme: core capabilities (classification, retrieval augmented generation, summarization), tool use (a customer service agent, a calculator tool, SQL queries), third-party integrations (Pinecone vector search, Wikipedia search, reading web pages with Haiku, Voyage AI embeddings), multimodal work (getting started with images, vision practices, interpreting charts and graphs, transcribing forms, and pairing Claude with Stable Diffusion), and advanced techniques such as sub-agents, PDF upload, automated evaluations, JSON mode, moderation filters, prompt caching, and cost optimization. Community contributions are accepted through issues and pull requests.
Features
- Capabilities: classification, retrieval augmented generation, and summarization walkthroughs
- Tool use: customer service agent, calculator integration, and SQL query examples
- Integrations: Pinecone, Wikipedia, web page reading, and Voyage AI embeddings
- Vision: image basics, chart and graph interpretation, and form content extraction
- Sub-agents: Haiku used as a sub-agent under Opus
- Evaluation and output control: automated prompt evals, JSON mode, and a moderation filter
- Cost and caching: prompt caching techniques and a cost-optimization checklist measuring pass rate and cost per task
- Related resources: links to Anthropic on AWS and AWS sample repositories
