Search all guides

Reference · Tools

Claude Batch

Submit many Claude message requests as one asynchronous Message Batches job at half the standard price, then check its status or cancel it; each input item becomes one request.

Action AI v1

Claude Batch sends multiple independent Claude message requests to Anthropic's Message Batches API in a single submission, processing them asynchronously at half the cost of standard API calls. It supports creating a batch, polling its status, and cancelling an in-flight job — making it practical to build things like nightly content classification pipelines or bulk document summarization workflows without paying full per-request pricing.

Works as
Action
Tool name
claude_batch
Operations
3 — Create Batch , Check Status , Cancel Batch
Parameters
7
Outputs
Output, Error
Credentials
Anthropic
Official docs
Anthropic docs platform.claude.com

What you can build with Claude Batch

  • Submit 500 prompts as a single Claude batch for 50% cost savings.
  • Check the status of a running Claude batch job.
  • Cancel a processing Claude batch.
  • Create a batch of Claude messages with a system prompt.
  • Submit batch with polling to wait for completion.

Each of these runs as a step in a BusyBot workflow or inside an agent, so the result can be routed, filtered and sent on with the core nodes and any of the communication integrations.

Overview

Claude Batch uses the Anthropic Message Batches API to process multiple Claude message requests asynchronously. Supports three operations: create (collect input items into a batch of message requests), check (poll batch status), and cancel (cancel a processing batch). For the create operation, all input items are submitted as a single batch. Optionally polls for completion with configurable intervals and timeouts. Batch processing offers a 50% cost discount over standard API calls.

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.

Operations

OperationValueDescription
Create BatchcreateCollect upstream items into a single batch. Each input item becomes one batch request
Check StatuscheckCheck the status of an existing batch
Cancel BatchcancelCancel a processing batch

Parameters

ParameterTypeRequiredDefaultDescription
Model (default)stringNoclaude-sonnet-4-6Default Claude model applied to EVERY batch request. Each upstream item can override this by including an item.model field. Always uses the latest version (auto-updated). (shown when Operation is create)
System Prompt (default)stringNo—Default system instructions applied to EVERY batch request. Each upstream item can override this by including an item.systemPrompt field. Per-item fields supported on each upstream item: item.message (or item.prompt/item.text) for a single-turn user message; item.messages for a full multi-turn array; item.systemPrompt to override the shared default; item.attachmentFileId (+ optional item.attachmentType) to attach an Anthropic file; item.model, item.maxTokens, item.temperature for per-request overrides. See the tool documentation for full details and examples. (shown when Operation is create)
Batch IDstringNo—The batch ID to check or cancel. Falls back to item.json.batchId if empty. (shown when Operation is check, cancel)
OptionscollectionNo{}
— Max TokensnumberNo4096Maximum number of tokens per response in the batch.
— Poll Interval (ms)numberNo30000How often to poll for completion status in milliseconds.
— Max Poll Duration (ms)numberNo600000Maximum total time to spend polling for completion in milliseconds.
— Wait for CompletionbooleanNofalseIf true, poll until the batch completes (or fails/expires) before returning.
— Response Field NamestringNobatchField name in the output JSON where the batch result will be placed.
Include InputbooleanNofalseWhether to include the original input item fields in the output.
Max ConcurrencynumberNo5Maximum number of items to process concurrently (for check/cancel operations).

Output Data

Create Batch submits one batch for the whole node run and then emits one output item per input item, each carrying the same batch metadata. Check Status and Cancel Batch process items individually. Binary data on the input item is forwarded unchanged, and with Include Input on the original item fields are merged in alongside the result.

{
  "batch": { "id": "msgbatch_01...", "processing_status": "in_progress" },
  "batchId": "msgbatch_01...",
  "status": "in_progress",
  "requestCount": 500,
  "resultsUrl": "https://api.anthropic.com/v1/messages/batches/msgbatch_01.../results",
  "requestCounts": { "processing": 480, "succeeded": 20, "errored": 0, "canceled": 0, "expired": 0 }
}
  • The field named by Response Field Name (batch by default) holds the batch object exactly as Anthropic returned it.
  • batchId and status are lifted to the top level for convenience. batchId is what a downstream Check Status or Cancel Batch node reads automatically when its own Batch ID is left empty.
  • requestCount is returned by Create Batch only, and is the number of requests that went into the batch.
  • resultsUrl and requestCounts appear once Anthropic has published them — typically after the batch has ended. requestCounts is where you see how many individual requests succeeded or errored; a batch can end successfully with errored requests inside it.
  • With Wait for Completion on, the node polls until the batch reports ended (or the Max Poll Duration elapses), so the values above are the final ones. With it off, the node returns as soon as the batch is accepted.
  • If no input item carried a usable message, Create Batch submits nothing and emits items with a null batch, batchId: null and status: "empty".

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

Example Configuration

Create a batch and continue immediately:

{
  "type": "claude_batch",
  "parameters": {
    "operation": "create",
    "systemPrompt": "You are a concise summarization assistant. Return only the summary.",
    "options": {
      "maxTokens": 1024,
      "waitForCompletion": false,
      "responseFieldName": "batch"
    }
  }
}

Create a batch and block until every request has been processed:

{
  "type": "claude_batch",
  "parameters": {
    "operation": "create",
    "systemPrompt": "Classify the sentiment of the provided text as positive, negative, or neutral.",
    "includeInput": true,
    "options": {
      "maxTokens": 256,
      "waitForCompletion": true,
      "pollIntervalMs": 20000,
      "maxPollDurationMs": 900000,
      "responseFieldName": "sentimentResult"
    }
  }
}

Check a batch created earlier, taking the ID from the incoming item:

{
  "type": "claude_batch",
  "parameters": {
    "operation": "check",
    "batchId": "",
    "options": {
      "waitForCompletion": true,
      "pollIntervalMs": 30000,
      "maxPollDurationMs": 600000,
      "responseFieldName": "batch"
    }
  }
}

Cancel a batch by ID:

{
  "type": "claude_batch",
  "parameters": {
    "operation": "cancel",
    "batchId": "{{ $json.batchId }}",
    "options": {
      "responseFieldName": "cancelResult"
    }
  }
}

Error Handling

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

Tips

Claude Batch submits multiple Claude message requests to the Anthropic Message Batches API asynchronously, supporting create, check, and cancel operations at a 50% cost discount over standard API calls. Use it when processing large volumes of independent prompts where real-time responses are unnecessary and minimizing inference cost is a priority. It outputs per-request response data to the main channel upon batch completion, or routes submission and processing failures to the error channel.

Frequently asked questions

When should I use Claude Batch instead of the regular Claude node?

Use Claude Batch when you have a large set of independent prompts and don't need responses in real time. The 50% cost discount only applies through the Message Batches API, so if your workflow can tolerate asynchronous processing — bulk classification, offline summarization, dataset annotation — Claude Batch is the cost-efficient choice. If you need an immediate response inline in your workflow, use the standard Claude node instead.

What credentials does this node require?

Claude Batch uses Anthropic credentials (the `anthropic` credential type in BusyBot). You'll need an Anthropic API key with access to the Message Batches API configured before the node will authenticate successfully.

What do the Output and Error channels actually carry?

When a batch completes, the Output channel receives per-request response data — one result for each input item submitted. The Error channel handles two distinct failure cases: problems during batch submission (create failures) and processing-level failures that occur while the batch is running. Routing errors to the Error channel lets you handle submission issues and runtime failures separately in your workflow.

What are the three operations and when do I use each one?

The create operation collects your input items and submits them to Anthropic as a single batch job. The check operation polls the batch for its current status, useful if you want to build your own polling loop rather than relying on the node's built-in polling. The cancel operation terminates a batch that is still processing — for example, if you submitted the wrong prompts or need to stop a long-running job early.

Does the node wait for the batch to finish, or do I have to poll manually?

The create operation can optionally poll for completion on your behalf, with configurable intervals and timeouts. If you enable that, the node blocks until the batch finishes and then emits results to the Output channel. If you prefer to handle timing yourself — for instance, to fan out or do other work in parallel — you can use the check operation in a separate workflow step to poll the batch status on your own schedule.

Build with the Claude Batch 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 reviewed . Spotted something wrong? Tell us.