Anthropic Claude
Add Claude to a flow: messages, structured replies, streaming, tools, classification, token counts, memory and batches.
Guides
Building AI Endpoints Building with AIBlocks
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_createSubmit 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. - get batch
anthropicconnection_batch_getPoll a batch by id. Fires `ended` and returns all results (text/usage/cost per custom_id) once processing finishes. - build output template
anthropicconnection_build_schemaPick 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. - build tool
anthropicconnection_build_toolDefine 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. - classify
anthropicconnection_classifyClassify input into exactly one of your labels using Claude; route the resulting label with a switch block. - count tokens
anthropicconnection_count_tokensCount the input tokens a prompt (with system + attachments) would use, and estimate the cost; before you send it. Free; no spend. - create memory
anthropicconnection_create_memoryOpen (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. - delete memory
anthropicconnection_delete_memoryDelete a memory by id (forget the conversation and its files). - get memory
anthropicconnection_get_memoryRead a memory's contents by id (conversation history, memory files, summary) without creating one. - get usage
anthropicconnection_get_usageReport total tokens and cost used on this connection (USD and the connection's currency), with a per-category breakdown. - list memories
anthropicconnection_list_memoriesList all memories (id, timestamps, expiry, turn count) for browsing or housekeeping. - memory from JSON
anthropicconnection_memory_from_jsonCast a raw {id, guid} object into a memory handle for a send message block; for passing a memory handle you already have. - send message
anthropicconnection_messageSend a message to Claude and get the reply, with built-in cost guard, model allowlist and typed error reporting. - stream message
anthropicconnection_message_streamSend a prompt to Claude and stream the reply token-by-token to a WebSocket channel as it generates, then return the full text. - parse JSON (repair)
anthropicconnection_parse_jsonRecover and parse JSON from messy text (code fences, prose, trailing commas, truncation). No API call. - preflight document
anthropicconnection_preflightConvert 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. - preflight documents
anthropicconnection_preflight_batchConvert 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. - output template from JSON
anthropicconnection_schema_from_jsonCast 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. - summarize memory
anthropicconnection_summarize_memoryCompact 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. - tool if
anthropicconnection_tool_branchPick a tool based on a condition: outputs the true tool when the condition holds, otherwise the false tool. Add elseif branches for more cases. - code execution tool
anthropicconnection_tool_code_executionLet Claude run Python in a sandbox (data analysis, math, charts); Anthropic-hosted. Wire the tool output into a message block's tools pin. - tool from JSON
anthropicconnection_tool_from_jsonCast a raw JSON object into a tool for a message block's tools pin; for full control beyond the build tool block. - memory tool
anthropicconnection_tool_memoryLet 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. - multiple
anthropicconnection_tool_multipleCombine several tools into one connection for a message block's tools pin. - tool switch
anthropicconnection_tool_switchPick a tool by matching an expression against case values (with an optional default). Wire the result into a message block's tools pin. - web search tool
anthropicconnection_tool_web_searchLet Claude search the web (Anthropic-hosted). Wire the tool output into a message block's tools pin. Optionally cap uses or restrict domains. - open connection
function_create_anthropicconnectionCreate a connection to the Anthropic (Claude) API for use by Claude blocks.