Claude citations request with a JSON schema failing with 400

CCDV-F Applications & Integration Medium Question 43 of 105

A research tool sends document blocks with citations enabled and also sets output_config.format to a JSON schema so the answer parses cleanly. Every request now fails with a 400 error.

What explains the failure?

Show answer and explanation

DCitations and structured outputs cannot both be enabled on the same request

Enabling citations on a user-provided document together with output_config.format returns a 400, because citations interleave citation blocks with the text and that conflicts with the strict JSON schema constraints of structured outputs. Citations are not schema fields, so declaring a citations property changes nothing. Citations are generally available on all active models and take no beta header. A document too large returns a size error, not a 400 on every request regardless of length.

Source: platform.claude.com/docs/en/build-with-claude/citations

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 105 original CCDV-F practice questions