Reference · Tools

Claude Chat

Chat with Anthropic Claude models using the Messages API.

Action AI v1

The Claude Chat node sends a user message to Anthropic's Messages API and returns the model's reply along with token usage and stop reason. Each item flowing into the node triggers a separate API call, making it straightforward to run per-record summarization, classification, or drafting tasks at scale. For example, you could feed a list of customer support tickets and have Claude draft a suggested reply for each one.

Node type
Action
Parameters
8
Outputs
Output, Error
Credentials
Anthropic

Claude Chat

Chat with Anthropic Claude models using the Messages API.

Overview

Sends a user message to Anthropic’s Claude chat completion API (POST /v1/messages) and returns the model’s response text. Supports Claude Opus, Sonnet, and Haiku models with configurable system prompt, temperature, top_p, top_k, and max_tokens. Each input item produces one API call. The response text is stored in a configurable output field (default: “response”) along with model name, token usage, and stop reason.

Category: AI
Tool Name: claude_chat
Version: 1

Appearance: Icon: anthropic | Color: #d4a574

Node Type

Action — processes input items and produces output

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 chat completion. Always uses the latest version (auto-updated).
Options: Claude Opus (most capable — complex analysis, coding and multi-step reasoning), Claude Sonnet (balanced — strong quality at lower cost and latency), Claude Haiku (fastest — simple tasks, classification and high-volume work). 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 user message to send to Claude. Falls back to item.message or item.prompt if empty. Supports expressions like {{ $json.text }}.
Attachment File IDstringNoOptional Anthropic file_id from a previous Claude File Upload node. When set, the file is attached to the user message alongside your text. Falls back to item.fileId if empty. Supports expressions.
Attachment TypeoptionsNodocumentHow Claude should interpret the attached file. Ignored when Attachment File ID is empty.
Options: document (PDF, plaintext, or other document file), image (JPG, PNG, GIF, or WebP image)
OptionscollectionNo{}Advanced sampling 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.
— Top PnumberNoNucleus sampling: only consider tokens with cumulative probability up to this value.
— Top KnumberNoOnly sample from the top K most likely tokens at each step.
— Response Field NamestringNoresponseThe output field name where the Claude response text will be stored.
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 response text lands on the field named by Response Field Name (response by default), and binary data on the input item is forwarded unchanged. With Include Input on, the original item fields are merged in alongside the result.

{
  "response": "The model's reply text",
  "model": "claude-...",
  "usage": { "input_tokens": 412, "output_tokens": 268 },
  "stopReason": "end_turn"
}
  • model is the model that actually answered, as reported by Anthropic.
  • usage is the token accounting Anthropic returned for the call.
  • 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.response }}.

Usage Examples

  • Ask Claude a question and get a text response
  • Summarize text using Claude Sonnet
  • Generate creative content with a system prompt
  • Classify input items using Claude Haiku for speed
  • Extract structured information from unstructured text

Example Configuration

Minimal — send one message per item:

{
  "type": "claude_chat",
  "parameters": {
    "userMessage": "Summarize the following article: {{ $json.articleText }}"
  }
}

Add a system prompt to control tone and format:

{
  "type": "claude_chat",
  "parameters": {
    "systemPrompt": "You are a concise technical writer. Respond only with well-structured bullet points.",
    "userMessage": "Explain the concept of backpressure in stream processing.",
    "includeInput": false,
    "maxConcurrency": 10
  }
}

Deterministic classification into a named output field:

{
  "type": "claude_chat",
  "parameters": {
    "systemPrompt": "Classify the sentiment of the input text. Respond with exactly one word: POSITIVE, NEGATIVE, or NEUTRAL.",
    "userMessage": "{{ $json.reviewText }}",
    "includeInput": true,
    "maxConcurrency": 20,
    "options": {
      "maxTokens": 10,
      "temperature": 0,
      "responseFieldName": "sentiment"
    }
  }
}

Ask a question about a file uploaded by a Claude File Upload node:

{
  "type": "claude_chat",
  "parameters": {
    "userMessage": "What are the payment terms in this contract?",
    "attachmentFileId": "{{ $json.fileId }}",
    "attachmentType": "document",
    "options": {
      "maxTokens": 1024,
      "temperature": 0.2,
      "responseFieldName": "contractAnswer"
    }
  }
}

Error Handling

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

Tips

Claude Chat sends user messages to the Anthropic Messages API and returns conversational responses from Claude Opus, Sonnet, or Haiku models. Use it when a workflow step requires natural language generation, reasoning, or instruction-following with configurable temperature, top_p, top_k, and max_tokens parameters. Each input item produces one API call, and the output fields include response text, model name, token usage counts, and stop reason.

Frequently asked questions

Which Claude models can I use with this node?

The node supports Claude Opus, Sonnet, and Haiku. Opus is the most capable, Haiku is the fastest and cheapest, and Sonnet sits in between. You choose the model in the node's parameters, so you can swap it without rewiring your workflow.

What exactly does the node output — just the response text?

No, it outputs several fields: the response text (stored in a configurable field that defaults to 'response'), the model name that was used, input and output token counts, and the stop reason. The token counts are useful if you need to track API costs or enforce usage budgets downstream.

Where do I put my Anthropic API key?

The node uses the Anthropic credential type. You add it once in BusyBot's credential manager and then select it in the node. You do not paste the key directly into node parameters.

If my workflow processes 50 records, does the node make 50 separate API calls?

Yes. Each input item produces exactly one call to POST /v1/messages. There is no batching. Keep this in mind for large datasets, both for latency and for Anthropic rate limit considerations on your account.

Can I give Claude a system prompt, or is it user messages only?

The node supports a configurable system prompt in addition to the user message. You can set it in the node parameters to give Claude standing instructions, a persona, or output formatting rules that apply to every call made by that node.

Build with the Claude Chat 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.