Courseiva
Claude API Mechanics →mediumMultiple Choice

CCDV-F Claude API Mechanics Practice Question

A developer is building a Python application that streams responses from the Anthropic Messages API. They notice that when they set stream=True, the response object is an iterator of server-sent events. They want to extract only the incremental text chunks as they arrive, without waiting for the full message. Which event type should they filter for to get the text deltas?

⚠ Common exam trap

A common mix-up: candidates confuse message_delta with content_block_delta, assuming that any event with 'delta' in the name carries the streamed text, when in fact message_delta only carries final metadata.

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

✓

content_block_delta

When streaming with the Messages API, the server sends a series of events. The content_block_delta event is specifically designed to carry incremental text deltas as Claude generates the response. By listening for this event type, the developer can process text as it arrives, enabling real-time user experiences. Other events like message_start, message_delta, and ping serve different purposes such as initialization, final metadata, or keep-alive.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    message_delta

    Why it's wrong here

    The message_delta event is sent at the end of a message to provide final updates such as stop_reason and usage statistics. It does not contain the incremental text content; instead, it signals changes to the top-level message object. Filtering for this event would not yield the text chunks the developer wants to display incrementally, as it is primarily for final metadata.

  • ✗

    message_start

    Why it's wrong here

    The message_start event is emitted once at the beginning of a stream and contains metadata about the message, such as the model and role, but it does not contain any incremental text. Filtering for this event would give the developer only the initial envelope, not the streamed content they need. It is useful for capturing the message ID or usage, but not for text deltas.

  • ✓

    content_block_delta

    Why this is correct

    The content_block_delta event is emitted each time a new piece of text (or tool input) is generated within a content block. It carries a delta object that includes the incremental text. By filtering for this event, the developer can accumulate the partial text chunks as they stream, which is exactly what is needed for real-time display or processing without waiting for the full message.

  • ✗

    ping

    Why it's wrong here

    The ping event is a keep-alive mechanism sent periodically to maintain the connection. It contains no text or content data. Filtering for ping events would only confirm the connection is active but would not provide any of the streamed text. It is not relevant for extracting incremental text chunks from the stream.

About these practice questions

One of 257 original CCDV-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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 CCDV-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 CCDV-F exam.