Flashcardsfor IT Certifications

D2: Messages API Fundamentals

Claude Certified Developer – Foundations exam practice questions · 12 flashcards

Question
Which endpoint generates Claude responses?
1 / 12

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 12 Messages API Fundamentals practice questions and answers
  1. Which endpoint generates Claude responses?
    POST /v1/messages (the Messages API).
  2. Which headers does a direct Messages API call need?
    x-api-key, anthropic-version (e.g. 2023-06-01) and content-type: application/json.
  3. What are the three required request parameters?
    model, max_tokens and messages.
  4. Where does the system prompt go in an API request?
    In the top-level system parameter, not as a message role.
  5. Which roles can messages have?
    user and assistant, typically alternating, starting with user.
  6. Is the Messages API stateful?
    No. It's stateless; you send the full conversation history with every request.
  7. What does max_tokens control?
    The maximum number of output tokens Claude may generate; it's a hard cap, not a target.
  8. What does stop_reason 'max_tokens' mean?
    The response was cut off at the output limit and is likely incomplete.
  9. What are the common stop_reason values?
    end_turn, max_tokens, stop_sequence, tool_use, pause_turn and refusal.
  10. What does the usage object report?
    input_tokens and output_tokens, plus cache creation and cache read tokens when caching is used.
  11. What content block types can a response contain?
    text, tool_use and thinking blocks (plus server-tool result blocks when used).
  12. What does temperature do?
    Controls randomness (0–1); lower is more deterministic, higher more varied.