---
title: "Anthropic Claude integration · RUAL Documentation"
description: "Use Anthropic Claude in RUAL blueprints. Add Claude to a flow: messages, structured replies, streaming, tools, classification, token counts, memory and batches."
canonical: https://docs.rual.nl/integrations/anthropic
language: en
---

# Anthropic Claude

Add Claude to a flow: messages, structured replies, streaming, tools, classification, token counts, memory and batches.

## Guides

- [Building AI Endpoints](https://docs.rual.nl/tutorials/ai-endpoints)

- [Building with AI](https://docs.rual.nl/web/with-ai)

## Blocks

Add these blocks on the canvas by searching for their name. Each block page lists its pins and how it behaves.

- [create batch `anthropicconnection_batch_create` Submit many prompts as one asynchronous batch at 50% of the standard price (results within 24h). Wire on_finished/on_item to be called automatically when the batch completes (the system polls in the background), or poll the batch_id yourself with the get batch block.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_batch_create)

- [get batch `anthropicconnection_batch_get` Poll a batch by id. Fires `ended` and returns all results (text/usage/cost per custom_id) once processing finishes.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_batch_get)

- [build output template `anthropicconnection_build_schema` Pick the fields Claude should return and describe each one; produces an output template for a Claude block's output template. Each field's type comes from the field itself; per field you set a description and (optionally) the allowed options. No JSON Schema knowledge needed.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_build_schema)

- [build tool `anthropicconnection_build_tool` Define a tool Claude can call and pick the function that runs it. The function receives the model's arguments as in-pins and returns the result back to Claude. Feed the output into a message block's tools pin.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_build_tool)

- [classify `anthropicconnection_classify` Classify input into exactly one of your labels using Claude; route the resulting label with a switch block.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_classify)

- [count tokens `anthropicconnection_count_tokens` Count the input tokens a prompt (with system + attachments) would use, and estimate the cost; before you send it. Free; no spend.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_count_tokens)

- [create memory `anthropicconnection_create_memory` Open (or create) a persistent memory by id. The same id returns the same memory across runs, so Claude can pick a conversation back up weeks later. Feed the memory into a send message block.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_create_memory)

- [delete memory `anthropicconnection_delete_memory` Delete a memory by id (forget the conversation and its files).](https://docs.rual.nl/block-types/anthropic/anthropicconnection_delete_memory)

- [get memory `anthropicconnection_get_memory` Read a memory's contents by id (conversation history, memory files, summary) without creating one.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_get_memory)

- [get usage `anthropicconnection_get_usage` Report total tokens and cost used on this connection (USD and the connection's currency), with a per-category breakdown.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_get_usage)

- [list memories `anthropicconnection_list_memories` List all memories (id, timestamps, expiry, turn count) for browsing or housekeeping.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_list_memories)

- [memory from JSON `anthropicconnection_memory_from_json` Cast a raw {id, guid} object into a memory handle for a send message block; for passing a memory handle you already have.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_memory_from_json)

- [send message `anthropicconnection_message` Send a message to Claude and get the reply, with built-in cost guard, model allowlist and typed error reporting.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_message)

- [stream message `anthropicconnection_message_stream` Send a prompt to Claude and stream the reply token-by-token to a WebSocket channel as it generates, then return the full text.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_message_stream)

- [parse JSON (repair) `anthropicconnection_parse_json` Recover and parse JSON from messy text (code fences, prose, trailing commas, truncation). No API call.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_parse_json)

- [preflight document `anthropicconnection_preflight` Convert a document (PDF, image, HTML, spreadsheet, text) to clean Markdown with a cheap model, stripping boilerplate; run before sending it to an expensive model to cut tokens.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_preflight)

- [preflight documents `anthropicconnection_preflight_batch` Convert several documents to clean Markdown with a cheap model, in parallel. Returns one .md file per input plus the concatenated Markdown; run before sending an upload set to an expensive model.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_preflight_batch)

- [output template from JSON `anthropicconnection_schema_from_json` Cast a raw JSON Schema object into an output template for a message block (or a tool's parameters); for full control beyond the build output template block.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_schema_from_json)

- [summarize memory `anthropicconnection_summarize_memory` Compact a memory: fold the older turns into a running summary and trim the history, so a long conversation stays cheap and in-context while keeping its gist. Run it periodically.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_summarize_memory)

- [tool if `anthropicconnection_tool_branch` Pick a tool based on a condition: outputs the true tool when the condition holds, otherwise the false tool. Add elseif branches for more cases.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_tool_branch)

- [code execution tool `anthropicconnection_tool_code_execution` Let Claude run Python in a sandbox (data analysis, math, charts); Anthropic-hosted. Wire the tool output into a message block's tools pin.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_tool_code_execution)

- [tool from JSON `anthropicconnection_tool_from_json` Cast a raw JSON object into a tool for a message block's tools pin; for full control beyond the build tool block.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_tool_from_json)

- [memory tool `anthropicconnection_tool_memory` Let Claude manage its own long-term memory notes (read, write, search) for the wired memory. Drop into a message block's tools pin; use the toggles to limit what it may do.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_tool_memory)

- [multiple `anthropicconnection_tool_multiple` Combine several tools into one connection for a message block's tools pin.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_tool_multiple)

- [tool switch `anthropicconnection_tool_switch` Pick a tool by matching an expression against case values (with an optional default). Wire the result into a message block's tools pin.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_tool_switch)

- [web search tool `anthropicconnection_tool_web_search` Let Claude search the web (Anthropic-hosted). Wire the tool output into a message block's tools pin. Optionally cap uses or restrict domains.](https://docs.rual.nl/block-types/anthropic/anthropicconnection_tool_web_search)

- [open connection `function_create_anthropicconnection` Create a connection to the Anthropic (Claude) API for use by Claude blocks.](https://docs.rual.nl/block-types/anthropic/function_create_anthropicconnection)

## Next steps

- [Third-Party Integrations](https://docs.rual.nl/tutorials/third-party-integrations): Calling outside APIs, receiving their webhooks, keeping data in sync and handling failures.

- [All integrations](https://docs.rual.nl/integrations): Everything RUAL connects to, by what it is for.
