ComfyUI Node Runs on cloud

Claude API

Wire Anthropic's Claude into ComfyUI

By sipherxyz·Created 3 years ago·Updated 4 months ago· 352
Claude API
    • llm_api
    claude_api_key
    endpointhttps://api.anthropic.com/v1
    version2023-06-01

    This is the connection node for Anthropic's Claude in the ArtVenture LLM set. Like its OpenAI and OpenRouter siblings, it doesn't prompt anything itself - it takes your Anthropic key, builds a connection, and outputs an LLM_API handle for the pack's LLM Chat or LLM Completion nodes to use. It's the "sign in to Claude" step; the talking happens downstream.

    Why route to Claude specifically? People like it for the language-heavy chores around generation: writing and rewriting prompts, expanding a one-line idea into a rich description, captioning input images with the vision models, or cleaning up messy text into a usable prompt. It's a taste thing as much as anything - some folks prefer Claude's phrasing for prompt work. Having it available as a node means you can A/B it against GPT or an open model without leaving your workflow.

    How it works

    The node assembles an API config aimed at Anthropic's endpoint, carrying your key and an API version header, and passes it downstream. The actual request - model choice, messages, any attached image - happens in the LLM node you connect this to.

    Inputs and outputs

    Three required inputs:

    • claude_api_key - your key from Anthropic, typed in as a string.
    • endpoint - defaults to https://api.anthropic.com/v1. Leave it unless you're pointing at a proxy.
    • version - the Anthropic API version header, defaulting to 2023-06-01. This is the dated version string Anthropic's API expects; the default is the standard value and you rarely touch it.

    The output is llm_api (type LLM_API) - into an ArtVenture LLM Chat or LLM Completion node, where you pick the actual Claude model.

    Installing it

    Ships with the ArtVenture pack. ComfyUI Manager: search comfyui-art-venture, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sipherxyz/comfyui-art-venture
    

    Restart ComfyUI. No model download - Claude runs on Anthropic's servers; you're calling it. You'll need network access and a funded Anthropic account.

    Common issues

    Your key is baked into the workflow file. The key is typed into the node, so it's saved into the workflow JSON and goes wherever the file goes. Don't share a workflow with a live key in it - strip it first and rotate if it's already out. On shared or cloud runners, treat anything in the graph as visible.

    401 or auth errors. Wrong or expired key, or an account with no credit. Check both on Anthropic's console.

    The model name is rejected. The specific Claude model gets chosen in the downstream LLM node, and Anthropic's model IDs change over time as new versions ship. A stale or misspelled model ID there surfaces as an error even when this node is fine - grab the current model name from Anthropic's docs.

    Vision input isn't working. Image captioning needs a vision-capable Claude model and the image wired into the downstream LLM node, not here. Confirm both.

    Version header confusion. The version field is the API version, not the model version. Leave it at the default 2023-06-01 unless Anthropic's docs tell you otherwise - it has nothing to do with which Claude model you run.

    CategoryArtVenture/LLM

    Inputs (3)

    NameTypeDefaultDescription
    claude_api_keySTRING
    endpointSTRINGhttps://api.anthropic.com/v1
    versionCOMBO2023-06-011 options: 2023-06-01

    Outputs (1)

    NameTypeDescription
    llm_apiLLM_API