CCDV-F Study Guide

Domain 1 — Applications and Integration (33.1%)

33.1% of the exam, roughly 17 questions — a third of the paper and more than domains 4 through 8 combined. If you prepare one domain thoroughly, this is it.

1.1 The Messages API request

Two parameters are required: model and messages. In practice max_tokens is effectively required too, and it is mandatory for streaming.

{
  "model": "claude-sonnet-4-6",
  "max_tokens": 1024,
  "system": "You are a support triage assistant for Acme.",
  "messages": [
    { "role": "user",      "content": "My order hasn't arrived." },
    { "role": "assistant", "content": "Let me look that up." },
    { "role": "user",      "content": "Order ORD-48213." }
  ],
  "temperature": 1.0,
  "stop_sequences": ["END"],
  "stream": false,
  "metadata": { "user_id": "hashed-user-id" }
}
ParameterNotes worth remembering
systemA top-level parameter, not a message with role: "system". It accepts a string or an array of content blocks — the array form is what lets you attach cache_control.
messagesAlternate user and assistant. The conversation is stateless: you resend the whole history each turn.
max_tokensA hard ceiling on output. Hitting it produces stop_reason: "max_tokens" and truncated content.
temperature0 to 1 in practice (the API accepts up to 2). Lower for extraction and classification, higher for generative variety. Do not tune temperature and top_p together.
stop_sequencesUp to five strings that end generation. Produces stop_reason: "stop_sequence" with the match in stop_sequence.
metadata.user_idAn opaque identifier for abuse monitoring. Never put personal data in it — use a hash.

1.2 The response, and the fields most people ignore

{
  "id": "msg_01ABC...",
  "type": "message",
  "role": "assistant",
  "content": [ { "type": "text", "text": "..." } ],
  "model": "claude-sonnet-4-6",
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": {
    "input_tokens": 1204,
    "output_tokens": 312,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0
  }
}
stop_reasonMeaningWhat your code should do
end_turnFinished naturallyUse the response
tool_useWants a toolExecute it, append tool_result, call again
max_tokensTruncatedDo not parse as complete; continue or raise the limit
stop_sequenceHit one of your stop stringsHandle per your own protocol
refusalSafety stopContent may not match your schema; handle separately
pause_turnA long-running turn was pausedContinue the turn by passing the response back
model_context_window_exceededInput exceeded the windowTrim history or the attachments

content is always an array of blocks, not a string. Blocks you will encounter: text, thinking, tool_use, and on the request side image, document and tool_result. Code that reads content[0].text unconditionally breaks the first time a thinking block or a tool call appears in front of it.

1.3 Streaming

Set stream: true and consume server-sent events. The sequence is:

message_start          → the Message shell, with initial usage
content_block_start    → a block begins (text, thinking, tool_use)
content_block_delta    → incremental content (text_delta, input_json_delta, thinking_delta)
content_block_stop     → that block is complete
message_delta          → final stop_reason and cumulative usage
message_stop           → done

Two exam-relevant points. Tool call arguments stream as input_json_delta fragments, so the JSON is incomplete until content_block_stop — never parse a partial. And the authoritative stop_reason and final usage arrive on message_delta, not on the first event. Stream when a human is waiting, or when a single request may run long enough to risk a connection timeout.

1.4 Multimodal and document input

Images and PDFs are content blocks inside a user message, supplied as base64, a URL, or a file_id from the Files API.

{ "role": "user", "content": [
    { "type": "document",
      "source": { "type": "base64", "media_type": "application/pdf", "data": "..." } },
    { "type": "text", "text": "Extract the payment terms." }
] }

Use the Files API when the same document is used across many requests — upload once, reference by ID, and stop paying to move the bytes each time. Put the document before the question in the message: long material first, instruction last.

1.5 Errors and retry policy

StatusTypeRetry?
400invalid_request_errorNo — fix the request
401 / 403authentication_error / permission_errorNo
404not_found_errorNo
413request_too_largeNo — 32 MB Messages, 256 MB Batch, 500 MB Files
429rate_limit_errorYes — honour retry-after
500api_errorYes — exponential backoff
504timeout_errorYes, but prefer streaming or the Batches API
529overloaded_errorYes — backoff

Every response carries a request_id; log it, because it is what support needs. The official SDKs already retry transient failures with exponential backoff, so hand-rolling a retry wrapper on top usually multiplies the delay rather than improving reliability. Catch typed exceptions rather than string-matching messages.

1.6 Configuration management

Straightforward software engineering, and the exam tests it plainly:

  • API keys come from the environment or a secret manager. Never in source, never in a client-side bundle, never in a log line.
  • The model identifier, max_tokens, temperature and prompt templates belong in configuration, not scattered through the code — you will change the model without changing the logic.
  • Pin an explicit model version rather than a floating alias when output stability matters, and re-run your evals when you move it.
  • Separate keys and workspaces per environment, so a load test cannot exhaust production's limits.

← Previous: The mental model  |  Next: Domain 2 — Model Selection and Optimisation →

Developer CCDV-F Real Exam Questions

Ready to Pass Your CCDV-F Certification?

Practice with authentic exam questions, verified explanations, and timed test simulation to guarantee your success.

Starting from $69.00
Take Practice Exam →