<!-- BusyBot node reference — https://busybot.net/tools/claude-citations/ -->

> Node: Claude Citations (`claude_citations`) · Action (binary) · v1
> Category: AI · Credentials: Anthropic (`anthropic`)
> Updated: 2026-08-16

# 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

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Anthropic** credentials.
See the [Credentials Guide](https://busybot.net/credentials/anthropic/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Model | `options` | No | `Claude Sonnet` | The 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 Prompt | `string` | No | — | Optional system prompt to set the model's behavior and context. Leave empty for default behavior. Supports expressions. |
| User Message | `string` | Yes | — | The question or prompt to send to Claude. Falls back to item.message or item.prompt if empty. Supports expressions like {{ $json.query }}. |
| Document Source | `options` | No | `text` | How 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 Text | `string` | No | — | The 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 Name | `string` | No | `data` | The 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 ID | `string` | No | — | The 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 Title | `string` | No | — | Optional title for the source document. Used for citation context. Supports expressions. |
| Options | `collection` | No | `{}` | Advanced generation and output settings. |
| — Max Tokens | `number` | No | `4096` | Maximum number of tokens to generate in the response. |
| — Temperature | `number` | No | `1` | Sampling temperature (0-1). Lower values are more deterministic, higher values more creative. |
| — Response Field Name | `string` | No | `response` | The output field name where the response text will be stored. |
| — Include Citations | `boolean` | No | `true` | Whether to include citation objects in the output. Disable to get only the response text. |
| Include Input | `boolean` | No | `false` | Whether to include the original input item fields in the output alongside the response. |
| Max Concurrency | `number` | No | `10` | Maximum 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.

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes 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.