Building with the Claude API

The full spectrum of working with Anthropic models using the Claude API: prompting, tool use, RAG, agents, MCP, and production patterns.

Building with the Claude API artwork from Claude Academy

Who this is for

  • AI & ML engineers

    Covers the full Claude API workflow including evals, tool use, multi-index RAG, prompt caching, and MCP.

  • Software engineers

    Walks through API requests, structured data, tool schemas, files, Claude Code, and MCP client implementation.

  • Cloud engineers

    Explains production patterns such as response streaming, prompt caching rules, code execution, and MCP servers.

What you get out of it

Build applications on the Claude API across the full stack: multi-turn requests, code and model-based evals, XML prompt structure, tool use, hybrid BM25 and embedding retrieval, extended thinking, prompt caching, Model Context Protocol (MCP) servers, Claude Code, and agent workflows. This 9-hour course suits software engineers building with Anthropic models.

Outline

Accessing Claude with the API

  1. Accessing the APILessonAn overview of connecting to Anthropic models through the Claude API.
  2. Getting an API keyLessonCreate and set up the API key needed to authenticate requests.
  3. Making a requestLessonHow to send a first request to Claude and read the response.
  4. Multi-Turn conversationsLessonPass message history across requests to hold a back-and-forth conversation.
  5. System promptsLessonUse system instructions to set role, context and behavior for API calls.
  6. TemperatureLessonAdjust the temperature setting to control variation in model responses.
  7. Response streamingLessonStream output tokens as they arrive instead of waiting for the full reply.
  8. Structured dataLessonGuide Claude to return responses in a consistent, structured format.
  9. Quiz on accessing Claude with the APIQuizQuestions to check your understanding of API keys, requests and parameters.

Prompt evaluation

  1. Prompt evaluationLessonWhy and how to test prompts systematically before shipping changes.
  2. A typical eval workflowLessonThe main steps in a repeatable prompt evaluation cycle.
  3. Generating test datasetsLessonBuild test cases to measure how a prompt performs across inputs.
  4. Running the evalLessonExecute your prompt against the test dataset and collect the outputs.
  5. Model based gradingLessonUse a language model to score and compare outputs from an evaluation run.
  6. Code based gradingLessonScore evaluation outputs with deterministic checks written in code.
  7. Quiz on prompt evaluationQuizA short quiz on datasets, evaluation workflows and grading methods.

Prompt engineering techniques

  1. Prompt engineeringLessonCore techniques for writing prompts that get reliable answers from Claude.
  2. Being clear and directLessonState the task plainly so the model knows what to do.
  3. Being specificLessonAdd concrete constraints and requirements to narrow the output.
  4. Structure with XML tagsLessonSeparate instructions, context and inputs inside a prompt using XML tags.
  5. Providing examplesLessonInclude sample inputs and outputs to show the format and style you want.
  6. Quiz on prompt engineering techniquesQuizQuestions covering clarity, specificity, XML tags and example-driven prompts.

Tool use with Claude

  1. Introducing tool useLessonHow Claude requests external function calls and uses their results.
  2. Project overviewLessonA look at the sample project used throughout the tool-use lessons.
  3. Tool functionsLessonWrite the underlying functions that run when Claude calls a tool.
  4. Tool schemasLessonDefine names, descriptions and input schemas so Claude can call your tools.
  5. Handling message blocksLessonInspect response content blocks to detect and parse tool-use requests.
  6. Sending tool resultsLessonReturn tool execution output to Claude so it can finish its answer.
  7. Multi-turn conversations with toolsLessonHow tool calls and results fit into a multi-turn message history.
  8. Implementing multiple turnsLessonWrite the loop that runs tools and continues the conversation across turns.
  9. Using multiple toolsLessonGive Claude several tools and let it pick the right one for each request.
  10. Fine grained tool callingLessonConfigure how and when Claude chooses to call specific tools.
  11. The text edit toolLessonLet Claude view and modify text files through the built-in text editor tool.
  12. The web search toolLessonConnect the web search tool so Claude can look up current information.
  13. Quiz on tool use with ClaudeQuizCheck your grasp of schemas, message blocks and multi-turn tool loops.

RAG and Agentic Search

  1. Introducing Retrieval Augmented GenerationLessonSupply relevant source passages in the prompt so Claude answers from your data.
  2. Text chunking strategiesLessonWays to split documents into smaller pieces for indexing and retrieval.
  3. Text embeddingsLessonTurn text chunks into vector representations for similarity search.
  4. The full RAG flowLessonHow indexing, retrieval and generation fit together in a complete RAG pipeline.
  5. Implementing the RAG flowLessonBuild the end-to-end retrieval and prompting pipeline in code.
  6. BM25 lexical searchLessonMatch exact terms and keywords across documents using BM25 search.
  7. A Multi-Index RAG pipelineLessonCombine semantic embeddings and lexical search in one retrieval pipeline.

Features of Claude

  1. Extended thinkingLessonGive Claude a thinking budget to work through harder problems before answering.
  2. Image supportLessonSend images in API requests and ask Claude questions about them.
  3. PDF supportLessonPass PDF documents to the API so Claude can read and analyze their pages.
  4. CitationsLessonHave Claude link claims in its response back to specific source passages.
  5. Prompt cachingLessonReuse repeated prompt prefixes across requests to cut latency and token costs.
  6. Rules of prompt cachingLessonThe ordering, size and lifetime rules that govern cached prompt blocks.
  7. Prompt caching in actionLessonA practical walkthrough of adding cache breakpoints to API requests.
  8. Code execution and the Files APILessonUpload files and let Claude run code against them through the API.
  9. Quiz on features of ClaudeQuizQuestions on extended thinking, media inputs, citations and prompt caching.

Model Context Protocol

  1. Introducing MCPLessonWhat the Model Context Protocol is and how it connects models to tools and data.
  2. MCP clientsLessonThe role of an MCP client in discovering and calling server capabilities.
  3. Project setupLessonSet up the local project used for the Model Context Protocol lessons.
  4. Defining tools with MCPLessonExpose callable tools from an MCP server for a client to use.
  5. The server inspectorLessonTest and debug an MCP server interactively with the inspector tool.
  6. Implementing a clientLessonWrite an MCP client that connects to a server and invokes its tools.
  7. Defining resourcesLessonPublish read-only data resources from an MCP server.
  8. Accessing resourcesLessonFetch and read server resources from an MCP client.
  9. Defining promptsLessonCreate reusable prompt templates on an MCP server.
  10. Prompts in the clientLessonList and request server-defined prompts from an MCP client.
  11. Quiz on Model Context ProtocolQuizQuestions on MCP servers, clients, tools, resources and prompts.

Anthropic apps - Claude Code and computer use

  1. Anthropic apps: Claude Code and computer useLessonAn introduction to Claude Code and computer use for running tasks in real environments.
  2. Claude Code setupLessonInstall and configure Claude Code in your development environment.
  3. Claude Code in actionLessonWatch Claude Code read files, edit code and run commands on a project.
  4. Adding MCP servers to Claude CodeLessonConnect MCP servers to Claude Code to give it additional tools and context.

Agents and workflows

  1. Agents and workflowsLessonThe difference between fixed multi-step workflows and open-ended agents.
  2. Parallelization workflowsLessonRun independent model calls at the same time and combine their outputs.
  3. Chaining workflowsLessonBreak a task into ordered steps where each call builds on the previous result.
  4. Routing workflowsLessonClassify an incoming request and send it to a specialized prompt or handler.
  5. Agents and toolsLessonHow an agent uses tools in a loop to plan and complete a task.
  6. Environment inspectionLessonLet an agent check its surroundings and verify results as it works.
  7. Workflows vs agentsLessonHow to choose between a predictable workflow and a flexible agent for a job.
  8. Quiz on Agents and WorkflowsQuizQuestions on chaining, routing, parallel calls and agent design.

Final assessment

  1. Final AssessmentQuizA final test covering the full course, from basic API calls to agents.

Details

Details
SourceFormatDuration
Claude AcademyCourse542 min