Courseiva
Claude API Mechanics →mediumMultiple Select

CCDV-F Claude API Mechanics Practice Question

When a developer uses Prompt Caching, which TWO metrics are specifically returned in the 'usage' object of the API response to help track cache performance?

⚠ Common exam trap

Candidates often look for generic token counters like input_tokens or output_tokens, forgetting the specific prompt caching usage keys returned in the API response.

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

✓

cache_creation_input_tokens

Prompt Caching introduces new usage categories to the API response. Monitoring these metrics is vital for developers to calculate their actual costs and verify that their caching strategy is working as expected. These fields allow for a granular breakdown of how many tokens were read from the cache versus how many were processed normally.

Answer analysis

Option-by-option breakdown

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

  • ✓

    cache_creation_input_tokens

    Why this is correct

    This metric counts the number of tokens that were written to the cache for the first time during the current request. These tokens are billed at the standard input rate but will contribute to future savings if the same prefix is used in subsequent requests to the API.

  • ✓

    cache_read_input_tokens

    Why this is correct

    This metric indicates how many tokens were successfully retrieved from the cache. These tokens are processed much faster and are billed at a significantly discounted rate compared to standard input tokens, making this the primary metric for measuring the financial and performance benefits of caching.

  • ✗

    cache_expiry_timestamp

    Why it's wrong here

    While caches do have a TTL (Time To Live), the exact expiry timestamp is not returned in the 'usage' object of a message response. Caching in the Messages API is managed automatically based on recent usage, and developers do not receive per-request expiration data in the standard metadata.

  • ✗

    cache_hit_ratio

    Why it's wrong here

    The API does not return a pre-calculated 'ratio' in the usage object. Instead, it provides the raw token counts (read vs. creation). Developers can calculate the hit ratio themselves by comparing 'cache_read_input_tokens' to the total input tokens, but the field itself does not exist in the response.

  • ✗

    total_cached_tokens_stored

    Why it's wrong here

    The API does not provide a global count of all tokens currently stored in the cache for an API key. It only provides usage data specific to the individual request being processed. There is no endpoint or response field that exposes the total aggregate size of the developer's cache.

About these practice questions

This CCDV-F question is part of Courseiva's 257-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.