CCAO-F Using the Claude API Practice Question
A developer is building a document Q&A service on the Claude API. Each request sends the full 180-page PDF as base64 in a single text content block, and most calls now fail with a 400 error stating the request exceeds the maximum allowed size. The developer wants to keep using the same model and continue asking questions about the whole document. Which approach should the developer take?
⚠ Common exam trap
The trap here is assuming that moving large content into the system prompt exempts it from the request size limits, when the system prompt is part of the same payload.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Upload the PDF with the Files API, then reference the returned file identifier in the message content instead of embedding base64.
Large documents should be ingested once through the Files API and then referenced by identifier in subsequent Messages calls, which keeps each request's inline payload small while preserving full-document context. Re-sending base64, relocating it to the system prompt, or compressing it all leave the oversized or unreadable payload inside the request, so the size rejection or loss of usable content persists.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Split the document into chunks, send each chunk in its own request, and merge the returned answers inside the application.
Why it's wrong here
Chunking does fit each request inside the size limit, but the model can only reason over one chunk at a time, so cross-section questions are answered from partial context and the application must reconcile conflicting answers. For a whole-document Q&A service this produces unreliable synthesis and multiplies request count and cost without solving the underlying need for unified context.
- ✗
Move the PDF into the system prompt so that the document bytes are not counted against the user message size.
Why it's wrong here
The system prompt is still part of the same request payload and is measured against the same overall request size and token limits as user content. Relocating the base64 data changes only its role label, not the byte count the API validates, so the identical 400 error would be returned. This is a common but mistaken belief about system prompt accounting.
- ✓
Upload the PDF with the Files API, then reference the returned file identifier in the message content instead of embedding base64.
Why this is correct
The Files API accepts a document once, returns an identifier, and lets later Messages requests reference that identifier rather than re-transmitting the encoded bytes. This removes the oversized payload from each call while keeping the entire document available as context, so whole-document questions still work. It is the intended path for large documents that exceed inline request size limits.
- ✗
Compress the base64 string with gzip and place the compressed value in the text content block.
Why it's wrong here
The Messages API does not decompress arbitrary gzip data placed inside a text block; the model would receive meaningless binary-derived characters rather than readable document text. Even if the payload became smaller, the content would be unusable for answering questions. Compression is a transport concern, not a document ingestion mechanism, so this does not restore functionality.
About these practice questions
Courseiva writes every CCAO-F question from scratch — 259 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Anthropic exam blueprint
This CCAO-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCAO-F exam.