Reference · Tools

Claude Citations

Get citation-backed responses from Claude with source references.

Action (binary) AI v1 Binary data

Claude Citations sends documents to Anthropic's Messages API and gets back answers where every claim is tied to an exact passage in your source material. It supports inline text, binary PDFs, or files previously uploaded via a Claude File Upload node. Use it to build workflows like contract reviewers or research summarizers where you need to trace every generated statement back to its origin.

Node type
Action (binary)
Parameters
11
Outputs
Output, Error
Credentials
Anthropic

Claude Citations

Get citation-backed responses from Claude with source references.

Overview

Claude Citations uses the Anthropic Messages API (POST /v1/messages) with document content blocks to generate responses that include precise citations back to source material. Supports four document source modes: “text” (inline text documents), “binary” (PDF or other binary documents carried on the item), “file” (a document previously uploaded to Anthropic), and “none” (no document source). Returns the response text along with citation objects containing cited_text, document_index, and character positions. Citations provide verifiable references that trace each claim back to the source document.

Category: AI
Tool Name: claude_citations
Version: 1

Appearance: Icon: anthropic | Color: #d4a574

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Anthropic credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
ModeloptionsNoClaude SonnetThe Claude model to use for citation-backed responses. Always uses the latest version (auto-updated).
Options: Claude Opus (most capable — complex document analysis and reasoning), Claude Sonnet (balanced — strong quality at lower cost and latency), Claude Haiku (fastest — simple lookups and high-volume queries). Each option tracks the current release of its tier, so the underlying model ID updates without any change to your node.
System PromptstringNoOptional system prompt to set the model’s behavior and context. Leave empty for default behavior. Supports expressions.
User MessagestringYesThe question or prompt to send to Claude. Falls back to item.message or item.prompt if empty. Supports expressions like {{ $json.query }}.
Document SourceoptionsNotextHow to provide the source document for citation extraction.
Options: text (provide document content as inline text), binary (read the document from binary data, such as a PDF), file (reference a document previously uploaded to Anthropic via Claude File Upload), none (no document source — citations from model knowledge only)
Document TextstringNoThe text content of the source document. Only used when Document Source is “text”. Falls back to item.documentText or item.document. Supports expressions. (shown when Document Source is text)
Binary Property NamestringNodataThe name of the binary property containing the document file (PDF, etc.). Only used when Document Source is “binary”. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. (shown when Document Source is binary)
Anthropic File IDstringNoThe file_id returned by a previous Claude File Upload node. Only used when Document Source is “file”. Falls back to item.fileId if empty. Supports expressions. (shown when Document Source is file)
Document TitlestringNoOptional title for the source document. Used for citation context. Supports expressions.
OptionscollectionNo{}Advanced generation and output settings.
— Max TokensnumberNo4096Maximum number of tokens to generate in the response.
— TemperaturenumberNo1Sampling temperature (0-1). Lower values are more deterministic, higher values more creative.
— Response Field NamestringNoresponseThe output field name where the response text will be stored.
— Include CitationsbooleanNotrueWhether to include citation objects in the output. Disable to get only the response text.
Include InputbooleanNofalseWhether to include the original input item fields in the output alongside the response.
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

One API call per input item, and one output item per input item. The answer lands on the field named by Response Field Name (response by default) and the supporting references land on citations. Binary data on the input item is forwarded unchanged — including a source PDF — and with Include Input on the original item fields are merged in alongside the result.

{
  "response": "Net revenue grew 18% year over year, driven by enterprise sales.",
  "citations": [
    {
      "cited_text": "Net revenue grew 18% YoY driven by enterprise sales.",
      "document_index": 0,
      "start_char_index": 41,
      "end_char_index": 93
    }
  ],
  "model": "claude-...",
  "usage": { "input_tokens": 3120, "output_tokens": 214 },
  "stopReason": "end_turn"
}
  • citations is the citation array Anthropic attached to the answer text. It is omitted when Include Citations is off, and it is an empty array when the model produced no citable references — which is the normal result when Document Source is none.
  • Citation objects identify the passage by cited_text and by its position within the document, so you can highlight the source span downstream.
  • model is the model that actually answered, as reported by Anthropic.
  • usage is the token accounting Anthropic returned for the call — the whole document is sent as input, so long documents dominate the cost.
  • stopReason says why generation stopped — for example end_turn (finished naturally) or max_tokens (hit the Max Tokens cap).

Reference the result downstream by expression, e.g. {{ $json.citations }}.

Usage Examples

  • Ask a question about a PDF document and get cited answers
  • Analyze a text document with verifiable source references
  • Summarize a document with citations to specific passages
  • Extract key facts from a document with source tracing
  • Get citation-backed answers from inline text content

Example Configuration

Question and answer over an inline text document:

{
  "type": "claude_citations",
  "parameters": {
    "userMessage": "What are the key findings in this document?",
    "documentSource": "text",
    "documentText": "{{ $json.reportText }}",
    "documentTitle": "Q3 Financial Report",
    "systemPrompt": "You are a financial analyst. Be concise and cite specific figures.",
    "options": {
      "maxTokens": 1024,
      "temperature": 0.3,
      "responseFieldName": "analysis",
      "includeCitations": true
    }
  }
}

Review a PDF that arrived as binary data on the item:

{
  "type": "claude_citations",
  "parameters": {
    "userMessage": "Summarize the contract terms and identify any unusual clauses.",
    "documentSource": "binary",
    "binaryPropertyName": "data",
    "documentTitle": "Vendor Contract",
    "systemPrompt": "You are a legal assistant. Highlight any non-standard terms.",
    "includeInput": true,
    "maxConcurrency": 5,
    "options": {
      "maxTokens": 2048,
      "temperature": 0.1,
      "responseFieldName": "contractSummary",
      "includeCitations": true
    }
  }
}

Cite against a document already uploaded by a Claude File Upload node:

{
  "type": "claude_citations",
  "parameters": {
    "userMessage": "Extract the invoice number, total amount, due date, and vendor name from this document.",
    "documentSource": "file",
    "documentFileId": "{{ $json.fileId }}",
    "documentTitle": "Invoice",
    "systemPrompt": "Extract only factual values present in the document. Do not infer or estimate.",
    "options": {
      "maxTokens": 512,
      "temperature": 0,
      "responseFieldName": "extractedFields",
      "includeCitations": true
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Claude Citations calls the Anthropic Messages API with document blocks — inline text, a binary PDF, or an Anthropic file_id from an upstream Claude File Upload node — to generate responses grounded in and referenced back to provided source material. Use it when every generated claim must be verifiable, such as in document summarization, legal review, or research workflows requiring traceable sourcing. Outputs include response text alongside citation objects containing cited_text, document_index, and character start and end positions that pinpoint each reference within the source.

Frequently asked questions

What does the citation output actually look like — what data comes back?

The node returns two things: the full response text from Claude, and a list of citation objects. Each citation object contains the cited_text (the exact quoted passage), a document_index indicating which source document was referenced, and character start and end positions that pinpoint where in the source that passage lives. This lets downstream nodes verify or display source references precisely.

What are the four document source modes and when would I use each?

The node supports 'text' for inline plain-text documents you pass directly in the workflow, 'binary' for PDF or other binary files carried on the workflow item, 'file' for a document already uploaded to Anthropic using an upstream Claude File Upload node (referenced by its file_id), and 'none' if you want to run the node without attaching a source document. Choose 'binary' when your workflow receives PDFs dynamically; choose 'file' when you want to upload once and reuse across many queries.

What credentials does this node require?

It requires an Anthropic credential configured in BusyBot. You'll need an Anthropic API key, which you obtain from your Anthropic account dashboard. There is no separate credential type — the same Anthropic credential used by other Claude nodes in your workspace applies here.

When should I use Claude Citations instead of a standard Claude message node?

Use Claude Citations specifically when you need every generated claim to be verifiable against a source document — for example, legal contract review, academic research summaries, compliance checks, or any output where a human needs to confirm where a statement came from. If you just need a free-form answer with no source traceability required, a standard message node is simpler. The citations overhead is only worth it when auditability matters.

Can the node handle errors, and what triggers the Error output?

Yes — the node has two outputs: Output for successful responses and Error for failures. The Error path will receive the item if the Anthropic API call fails, for example due to an invalid file_id, an unsupported document format, or an API authentication problem. Routing the Error output to a separate handler lets your workflow log failures or retry without stopping the entire run.

Build with the Claude Citations node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Anthropic credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.