ComfyUI Node

Anthropic Claude

Calls the Anthropic Claude API with text and optional image inputs. Features: vision, extended thinking, seed-based caching. Setup: set CLAUDE_API_KEY env var. Install: pip install anthropic>=0.122.0

By alexmunteanu·Created 7 months ago·Updated 8 days ago· 0
Anthropic Claude
  • images
  • response
  • thinking
prompt
modelSonnet 4.6
seed739204185613097
templateNone
instructions
temperature1.00
max_tokens4096
extended_thinkingfalse
thinking_budget4096
max_image_size1024
CategoryLLM/Anthropic

Inputs (11)

NameTypeDefaultDescription
promptSTRINGThe text prompt to send to Claude.
modelCOMBOSonnet 4.6Claude model to use. Fetched from the Anthropic API at startup; falls back to a built-in list if unavailable.
seedINT7392041856130970–1125899906842624Controls caching. Fixed = reuse cached result (no API call). Randomize = new API call each run.
imagesoptIMAGEOptional images for Claude's vision. Accepts batched images. Each is converted to JPEG before sending.
templateoptCOMBONonePre-built instructions for optimizing prompts for specific AI models. Overridden when instructions input is connected.
instructionsoptSTRINGSystem-level instructions that guide Claude's behavior and response style.
temperatureoptFLOAT1.000–1Controls randomness. 0.0 = deterministic, 1.0 = most creative. Forced to 1.0 when extended thinking is enabled.
max_tokensoptINT40961–128000Maximum number of tokens in Claude's response. Higher = longer responses, more cost.
extended_thinkingoptBOOLEANfalseEnable Claude's extended thinking for complex reasoning. Forces temperature to 1.0.
thinking_budgetoptINT40961024–128000Max tokens for the thinking process. Only used when extended thinking is enabled.
max_image_sizeoptINT102464–1568Max pixel dimension for images. Images are resized to fit. API max is 1568px. Lower = fewer tokens, lower cost.

Outputs (2)

NameTypeDescription
responseSTRINGClaude's text response to the prompt.
thinkingSTRINGClaude's internal reasoning when extended thinking is enabled. Empty otherwise.