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" }
}
| Parameter | Notes worth remembering |
|---|---|
system | A 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. |
messages | Alternate user and assistant. The conversation is stateless: you resend the whole history each turn. |
max_tokens | A hard ceiling on output. Hitting it produces stop_reason: "max_tokens" and truncated content. |
temperature | 0 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_sequences | Up to five strings that end generation. Produces stop_reason: "stop_sequence" with the match in stop_sequence. |
metadata.user_id | An 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_reason | Meaning | What your code should do |
|---|---|---|
end_turn | Finished naturally | Use the response |
tool_use | Wants a tool | Execute it, append tool_result, call again |
max_tokens | Truncated | Do not parse as complete; continue or raise the limit |
stop_sequence | Hit one of your stop strings | Handle per your own protocol |
refusal | Safety stop | Content may not match your schema; handle separately |
pause_turn | A long-running turn was paused | Continue the turn by passing the response back |
model_context_window_exceeded | Input exceeded the window | Trim 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
| Status | Type | Retry? |
|---|---|---|
| 400 | invalid_request_error | No — fix the request |
| 401 / 403 | authentication_error / permission_error | No |
| 404 | not_found_error | No |
| 413 | request_too_large | No — 32 MB Messages, 256 MB Batch, 500 MB Files |
| 429 | rate_limit_error | Yes — honour retry-after |
| 500 | api_error | Yes — exponential backoff |
| 504 | timeout_error | Yes, but prefer streaming or the Batches API |
| 529 | overloaded_error | Yes — 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 →
Explore Other Certification Study Guides
Switch to another exam guide to prepare for your next Claude certification:
Claude Certified Associate — Foundations
Entry-level certification for non-coders: prompting, output evaluation, model selection, workflow integration, configuration, governance & responsible use.
Claude Certified Architect — Foundations
Core architectural principles: agentic loops & orchestration, tool design & MCP, Claude Code workflows, prompt engineering, and context reliability.
Claude Certified Architect — Professional
Advanced enterprise architecture: solution design, system integration, evaluation frameworks, governance, safety & developer enablement.