[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
Document-Grounded Citations
Precision Source Attribution
The Citations API (anthropic-beta: citations-2025-02-28) enables Claude to ground its responses in specific passages from provided documents. When enabled, every claim in Claude's response includes a reference to the exact sentence, paragraph, or page it was derived from - dramatically reducing hallucination risk.
Citation Types
| Type | Granularity | Best For |
|---|---|---|
char_location | Character-level offset | Plain text documents |
page_location | Page number + bounding box | PDF documents |
content_block_location | Block index reference | Structured content arrays |
Enabling Citations
const response = await anthropic.messages.create({
model: "claude-3-7-sonnet-20250219",
max_tokens: 4096,
citations: { enabled: true },
messages: [{
role: "user",
content: [
{ type: "document", source: { type: "base64", media_type: "application/pdf", data: pdfBase64 }, title: "Contract.pdf" },
{ type: "text", text: "Summarize the key obligations in this contract with citations." }
]
}]
});SYNAPSE VERIFICATION
QUERY 1 // 1
What is the primary benefit of the Citations API?
Faster generation speed
Grounding claims with verifiable source references to reduce hallucination
Lower token usage
Automatic translation