Claude API Integration: Patterns, Models & CCDV-F Guide
Master claude api integration with this CCDV-F-aligned guide covering synchronous calls, streaming, batch processing, model selection, tools, and security patterns.
By Solomon Udoh · AI Architect & Certification Lead

Claude API integration is the single largest domain on the CCDV-F exam. Domain 2 (Applications and Integration) carries 33.1% of the exam weight, making it the decisive battleground for candidates who want to clear the 720 passing score. This guide maps the integration patterns that appear most often in exam scenarios and in production workloads, so you can study both at once.
We will cover synchronous versus batch calls, streaming, model selection, tool use, security guardrails, and the evaluation loop that keeps integrations reliable over time. Every section ties back to the CCDV-F domain map so you know exactly where each concept lives.
What does the CCDV-F exam actually test on API integration?
The exam tests practical judgment, not recall. Per Anthropic's exam guide, every item is scenario-based: you are given a workload description and asked to choose the correct integration pattern, model, or configuration. The eight domains and their weights are:
| Domain | Title | Weight |
|---|---|---|
| 1 | Agents and Workflows | 14.7% |
| 2 | Applications and Integration | 33.1% |
| 3 | Claude Code | 3.1% |
| 4 | Eval, Testing, and Debugging | 2.6% |
| 5 | Model Selection and Optimisation | 16.8% |
| 6 | Prompt and Context Engineering | 11.0% |
| 7 | Security and Safety | 8.1% |
| 8 | Tools and MCPs | 10.6% |
Domain 2 alone accounts for roughly one in three marks. Domains 5 and 1 together add another 31.5%. A candidate who masters integration patterns, model selection, and workflow design covers nearly two-thirds of the exam by weight.
The exam has 53 items and a 120-minute time limit, scored on a 100-to-1000 scale with 720 as the passing bar. Unlike the CCAR-F Architect exam, CCDV-F does not draw from a scenario bank; items are written directly against the skills in each domain.
Which integration pattern should you choose for a given workload?
The core judgment call in Domain 2 is matching a workload to the right API surface. There are four main options:
| Pattern | Latency | Throughput | Cost lever | Typical use case |
|---|---|---|---|---|
| Synchronous Messages API | Low (seconds) | Limited by concurrency | Per-token pricing | Chat, real-time Q&A, interactive tools |
| Streaming (SSE) | Perceived low | Same as sync | Per-token pricing | Long responses where first-token latency matters |
| Message Batches API | High (up to 24 h) | Very high | Up to 50% discount | Bulk classification, offline enrichment, evals |
| Agentic loop (multi-turn) | Variable | Depends on tool calls | Accumulates across turns | Tasks requiring tool use, planning, or iteration |
The exam rewards deterministic solutions over probabilistic ones when stakes are high. If a scenario describes a nightly batch job classifying 50,000 support tickets, the correct answer is almost always the Batches API, not a synchronous loop. Conversely, if the scenario involves a user waiting at a keyboard, streaming or synchronous calls are appropriate.
For the synchronous path, the Messages API Request-Response Cycle is the foundational concept: every call is stateless, the full conversation history must be sent each time, and the response includes a stop_reason field that drives the next action.
A minimal synchronous call looks like this:
import anthropicclient = anthropic.Anthropic()response = client.messages.create(model="claude-sonnet-4-5",max_tokens=1024,messages=[{"role": "user", "content": "Summarise this support ticket in one sentence."}])print(response.content[0].text)
For streaming, swap .create() for .stream() and iterate over events. The exam does not ask you to write code verbatim, but it does ask you to identify which pattern fits a latency or throughput constraint.
How do you choose the right Claude model for a production integration?
Model selection (Domain 5, 16.8%) is the second-largest judgment call. Anthropic publishes a model family with broadly three tiers: a fast, low-cost model suited to high-volume classification; a mid-tier model balancing quality and speed; and a frontier model for the most demanding reasoning tasks. The exam presents scenarios and asks you to justify the choice.
The decision framework has three axes:
- Latency requirement. If a user is waiting synchronously, a faster model at lower quality may be the correct trade-off.
- Quality requirement. Tasks involving nuanced reasoning, long-document synthesis, or code generation typically require the frontier model.
- Cost constraint. Batch workloads with relaxed latency should use the most cost-efficient model that meets quality thresholds.
Selecting a model is not a one-time decision. As workloads evolve and new model versions ship, the optimal choice can shift. Build your integration so the model name is a configuration value, not a hard-coded string.
A common exam trap is selecting the frontier model by default. The exam consistently rewards proportionate fixes: if a scenario says "classify customer sentiment at scale with no latency requirement," the correct answer is the efficient model plus the Batches API, not the frontier model in a synchronous loop.
When should you use a deterministic workflow instead of an autonomous agent?
Domain 1 (Agents and Workflows, 14.7%) tests the boundary between structured pipelines and autonomous agents. The exam is explicit: deterministic workflows are preferred when the task is well-defined, the steps are known in advance, and errors are costly.
Use a fixed sequential pipeline (prompt chaining) when:
- Each step has a clear input and output schema.
- The sequence of steps does not change based on model output.
- You need auditability and reproducibility.
Use an autonomous agent when:
- The task requires dynamic tool selection.
- The number of steps is unknown at design time.
- The model needs to reason about which sub-task to pursue next.
A hybrid approach, sometimes called plan-then-execute, is also valid: the model produces a structured plan in one call, and a deterministic executor runs the steps. This preserves auditability while allowing the model to handle open-ended decomposition.
The Agentic Loop Anti-Patterns concept covers the failure modes that appear most often in exam scenarios: runaway loops, premature termination, and tool-call accumulation that exhausts the context window.
How do tools and MCP servers fit into an API integration?
Domain 8 (Tools and MCPs, 10.6%) tests how you expose external capabilities to Claude. Tool use follows a consistent pattern in the Messages API:
- Define tools as JSON schemas in the
toolsparameter. - Claude returns a
tool_usecontent block when it decides to call a tool. - Your code executes the tool and appends a
tool_resultblock to the conversation. - Claude continues from the result.
{"type": "tool_use","id": "toolu_01A09q90qw90lq917835lq9","name": "get_customer_record","input": {"customer_id": "C-4821"}}
The exam tests two common failure modes. First, tool misrouting: Claude calls the wrong tool because the descriptions are ambiguous. The fix is precise, discriminating tool descriptions, not system-prompt patches. Second, tool overload: providing too many tools degrades selection accuracy. The exam rewards splitting broad tools into specific ones and scoping tool sets to the task at hand.
MCP (Model Context Protocol) extends this pattern to remote servers. The MCP Server Integration Best Practices concept covers the scoping hierarchy, environment variable expansion, and the isError flag pattern that the exam tests directly.
For Tool Design and MCP Integration, the key exam principle is that tool descriptions are the primary selection mechanism. Claude reads them at inference time; a vague description produces unreliable routing regardless of how well the underlying function works.
What prompt and context engineering patterns stabilise API outputs?
Domain 6 (Prompt and Context Engineering, 11.0%) tests how you make outputs consistent and structured across repeated calls. The exam rewards three techniques in particular:
Structured output via JSON schema. Constraining the output format reduces variance. Define the schema in the system prompt and validate the response programmatically.
system_prompt = """You are a support ticket classifier. Always respond with valid JSON matching this schema:{"category": "billing | technical | general","priority": "high | medium | low","summary": "string, max 50 words"}Do not include any text outside the JSON object."""
Few-shot examples. For ambiguous or edge-case inputs, few-shot examples are the highest-leverage technique. Place them in the system prompt or as early turns in the conversation history.
Context management. The Messages API is stateless; you control what history is sent. Sending the full conversation history is required for coherent multi-turn interactions, but unbounded history accumulates cost and eventually hits the context window limit. The exam tests when to summarise and inject a compressed context versus when to start a fresh session.
The Prompt Engineering and Structured Output concept library covers these patterns in depth, mapped to the CCAR-F domain structure. Many of the underlying techniques apply equally to CCDV-F scenarios.
How do you defend a Claude API integration against security threats?
Domain 7 (Security and Safety, 8.1%) tests prompt injection defence, jailbreak mitigation, and privacy controls. These are not optional: the exam treats security as a first-class design concern, not an afterthought.
The three most-tested attack surfaces are:
| Threat | Description | Primary defence |
|---|---|---|
| Prompt injection | Malicious content in user input or tool results that hijacks the model's instructions | Structural separation of system prompt and user content; input validation |
| Indirect injection | Attacker-controlled content retrieved from external sources (web, database) that contains instructions | Treat all retrieved content as untrusted; sanitise before injection |
| Jailbreak | User attempts to override safety guidelines via roleplay, hypotheticals, or instruction overrides | Robust system prompt; constitutional constraints; output filtering |
The exam consistently rewards programmatic enforcement over prompt-based enforcement for high-stakes controls. A system prompt that says "never reveal customer PII" is weaker than a post-processing filter that redacts PII patterns before the response reaches the user. The High-Stakes Enforcement Decision Rule concept formalises this principle.
For privacy, the key exam principle is data minimisation: send only the fields the model needs to complete the task. If a tool result contains a full customer record but the task only requires the account status, strip the record before appending it to the conversation.
How do you evaluate and debug a Claude API integration?
Domain 4 (Eval, Testing, and Debugging, 2.6%) carries a small weight but appears as a supporting skill in many Domain 2 scenarios. The exam tests whether you can design a repeatable evaluation loop.
A minimal eval pipeline has four components:
- A golden dataset of inputs with known correct outputs.
- A scoring function that compares model output to the expected output (exact match, semantic similarity, or an LLM-as-judge rubric).
- A regression gate that fails the pipeline if accuracy drops below a threshold.
- A logging layer that captures inputs, outputs, and scores for debugging.
def evaluate_classifier(model: str, test_cases: list[dict]) -> float:correct = 0for case in test_cases:response = client.messages.create(model=model,max_tokens=256,system=system_prompt,messages=[{"role": "user", "content": case["input"]}])predicted = parse_category(response.content[0].text)if predicted == case["expected_category"]:correct += 1return correct / len(test_cases)
The exam rewards rubric-based evaluation for open-ended outputs and exact-match evaluation for structured outputs. Mixing the two without justification is a common exam trap.
How does AI Skill Certs prepare you for CCDV-F integration scenarios?
AI Skill Certs is an independent adaptive prep platform, not affiliated with or endorsed by Anthropic. Our CCDV-F prep is live today: adaptive study sessions, Archie (our Socratic tutor), and practice exams that mirror the real 53-item, 120-minute format scored 100 to 1000 with 720 as the passing bar.
Archie never gives the answer directly. It guides with graduated hints, so you build the judgment the exam actually tests rather than memorising surface patterns.
The adaptive engine uses Bayesian Knowledge Tracing with a 0.90 mastery threshold. When you answer an integration scenario incorrectly, the engine routes you to the underlying concept, not just another question of the same type. For Domain 2, that means tracing a wrong answer about batch processing back to the synchronous-versus-batch decision rule, then surfacing related concepts like cost modelling and latency constraints.
The Claude Certification Concepts library covers 174 atomic concepts mapped to the five CCAR-F domains. CCDV-F candidates will find the Tool Design and MCP Integration and Agentic Architecture sections directly relevant to Domains 8 and 1 respectively.
As of 3 June 2026, more than 10,000 individuals have earned a Claude certification across the Partner Network. The CCDV-F exam costs $125 per attempt and the credential is valid for 12 months from the award date.
Frequently asked questions
What is the passing score for the CCDV-F Claude API integration exam?
How many questions are on the CCDV-F exam and how long do you have?
Which CCDV-F domain covers Claude API integration patterns?
What is the difference between the Messages API and the Message Batches API?
How do I defend a Claude API integration against prompt injection?
Does AI Skill Certs offer CCDV-F practice exams?
People also ask
How do I integrate Claude API into my application?
What is the Claude API rate limit?
How does Claude API tool use work?
Is the Claude Certified Developer exam worth it?
What is the difference between CCAR-F and CCDV-F?
About the author
AI Architect & Certification Lead
Solomon Udoh is an AI Architect who designs and ships production agent systems on the Claude API and Claude Code. He built AI Skill Certs' adaptive engine and authored its 174-concept knowledge graph, mapping every Claude Certified Architect - Foundations objective to hands-on, exam-aligned practice.
- Designs production multi-agent systems on the Claude API and Agent SDK
- Author of the AI Skill Certs knowledge graph (174 mapped exam concepts)
- Builds with MCP, Claude Code, structured outputs, and agentic loops daily
- Reviews every concept page against the official Anthropic exam guide
You might also like
Ready to put it into practice?
Study every exam concept with an adaptive tutor.