Nodes/StudioDeep/LLM Backend
ComfyUI Node

LLM Backend

Wiring Claude or OpenAI into StudioDeep

By studiodeep-ai·Created 6 months ago·Updated 5 months ago· 0
LLM Backend
    • backend
    provider
    modelclaude-sonnet-4-6
    reasoningoff
    api_key

    StudioDeep's whole thing is AI-assisted prompt building, and the LLM Backend is where that starts. This node doesn't call any API itself - it's a config node that packages a provider, a model, a reasoning setting, and an API key into a single AI_BACKEND value. Then you run a wire from its backend output into the nodes that actually do the work, like Story Panel or T2V Prompt Builder. One backend node, several consumers. It's the credential wallet for the pack.

    The mechanism is dead simple: it builds a Python dict {type: "claude"|"openai", model, api_key, reasoning} and hands it along the wire. What's slightly clever is the reasoning dropdown. For Claude it maps low/medium/high onto extended-thinking token budgets (1024, 5000, 16000 tokens under the hood); for OpenAI it becomes the reasoning_effort parameter. The consuming nodes read this back, so one decision here ripples through every LLM call downstream.

    The inputs that matter

    • provider - Claude or OpenAI. The pack's JS extension swaps the model list when you switch, so you'll see only the models for the selected provider.
    • model - on Claude: claude-opus-4-6, claude-sonnet-4-6 (default), claude-haiku-4-5-20251001. On OpenAI: gpt-5o, gpt-5o-mini.
    • reasoning - off, low, medium, high. Off is the default and the cheapest; flip it up if the prompt work needs genuine multi-step reasoning. Haiku with high reasoning is usually money wasted, by the way.
    • api_key - masked as a password field. This is where your Anthropic or OpenAI key goes.

    The only output is backend (AI_BACKEND). Don't feed it to SD_N8NBackend consumers interchangeably - the N8N node is a different route with a different contract (a webhook, not an LLM).

    Installing

    Via ComfyUI Manager, search for "StudioDeep" and install. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/studiodeep-ai/comfyui-studiodeep StudioDeep
    pip install -r StudioDeep/requirements.txt
    

    Then restart ComfyUI. The pack needs anthropic, openai, and requests - no model files to download, nothing local to quantize. You'll see the StudioDeep nodes under the StudioDeep/... categories in the node menu.

    One note: the README talks about copying .env.example to .env and filling in keys there. Don't go hunting for that file - there isn't one in the repo and no node reads an .env. Keys go straight into this node's widget.

    Troubleshooting

    • "API key is required" - that ValueError fires immediately when the field is empty. Paste a real key (Anthropic for Claude, OpenAI for OpenAI) and re-run.
    • Keys are only used at execution time by the consumers, so a bad key shows up as an API error from the LLM call, not here.
    • If you bump reasoning to high, expect slower, pricier calls - 16k budget tokens is real thinking, and the downstream nodes pay for it. For turning a scene description into a shot list, low is usually enough.

    The one to reach for if you're on a budget: claude-haiku with reasoning off for bulk description work, sonnet for anything that needs taste.

    CategoryStudioDeep/Backends

    Inputs (4)

    NameTypeDefaultDescription
    providerCOMBO2 options: Claude, OpenAI
    modelCOMBOclaude-sonnet-4-65 options: claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5-20251001, gpt-5o, gpt-5o-mini
    reasoningCOMBOoff4 options: off, low, medium, high
    api_keySTRING

    Outputs (1)

    NameTypeDescription
    backendAI_BACKEND