D2: Messages API Data Access & Realtime vs Batch
Claude Certified Developer – Foundations exam practice questions · 10 flashcards
Question
How do you keep conversation state with a stateless API?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Messages API Data Access & Realtime vs Batch practice questions and answers
- How do you keep conversation state with a stateless API?Store history in your app (DB/session store) and send the relevant messages each call.
- How do you limit history size?Trim old turns, summarize earlier conversation, or keep only relevant messages.
- What's the token counting endpoint for?Estimating input tokens of a request before sending it, for budgets and limits.
- How do you fetch batch results?Poll the batch status, then download results when processing has ended.
- Realtime vs batch: the deciding factors?Latency need, volume and cost sensitivity.
- Interactive chatbot: realtime or batch?Realtime Messages API, usually with streaming.
- Nightly classification of a large backlog: realtime or batch?Batch API.
- How should you retrieve data Claude needs from your systems?Fetch it in code or via tools and include only relevant parts, not entire databases.
- Why log request IDs?The request-id header lets you trace specific calls and work with support.
- How should large reference data be provided repeatedly?Cache it with prompt caching or use the Files API rather than resending it fresh.