Nodes/ComfyUI-DioBrando-Nodes/Grok Vision Analyze (URL)
ComfyUI Node

Grok Vision Analyze (URL)

No tensor juggling, same API bill

By workordie·Created 4 months ago·Updated 27 days ago· 0
Grok Vision Analyze (URL)
    • response
    • usage
    image_urlhttps://example.com/image.jpg
    promptDescribe this image in detail.
    modelgrok-4.3-latest
    max_tokens2048
    temperature0.70
    detailhigh
    api_key

    The sibling of Grok Vision Analyze (Image), with one difference that changes when you reach for it: instead of a decoded IMAGE tensor, it takes a URL to an image and asks Grok to look at that. Same API, same outputs, same billing - just no tensor in the middle. If the image you want analyzed already lives somewhere on the internet, this is the less fiddly node.

    How it works

    Under the hood it's the same HTTP call to https://api.x.ai/v1/chat/completions - the Grok vision models in this pack don't run locally, and your key comes from the XAI_API environment variable (or XAI_API_KEY / GROK_API_KEY) unless you paste it into the optional api_key input. The one real difference is that the URL variant doesn't serialize any pixels: it passes your image_url string straight into the API payload. That means xAI's servers fetch the image, not your machine. Two practical consequences follow.

    First, the URL has to be publicly reachable from xAI's side. A localhost address, a private server, or a signed-but-expiring link that only you can see will fail even though the image opens fine in your browser. If the image is on your disk, use the Image tensor variant instead - it base64-encodes whatever you already have. Second, since there's no tensor, there's no image_format or jpeg_quality input; the remote server decides what bytes get sent, which also means you can't shrink a monster PNG before it hits your token budget. Keep detail in mind for that.

    Inputs and outputs

    • image_url - the only thing you must fill in. A public URL to a JPEG, PNG, or whatever the image host serves.
    • prompt - what you're asking, default "Describe this image in detail." This is where you actually tell it what the analysis is for: captioning, style extraction, "does this match the reference?", whatever.
    • model - the same 11-model list as the Image node, defaulting to grok-4.3-latest. For cheap high-volume jobs, grok-4-1-fast-non-reasoning is the one.
    • max_tokens, temperature, detail - same as the tensor version; detail: high (the default) is the most accurate and the most expensive.

    Outputs: response (STRING - the model's text, ready to feed a prompt slot or text node) and usage (STRING - the token counts, so you can see what each call actually cost).

    Installing

    Same pack, same install, no extra deps - this is a 47-line module with a requirements.txt of just Pillow, numpy, and torch. ComfyUI Manager → search "ComfyUI-DioBrando-Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DanielBartolic/ComfyUI-DioBrando-Nodes
    cd ComfyUI-DioBrando-Nodes && pip install -r requirements.txt
    

    Restart and it lives under DioBrando/Grok. The pack is MIT-licensed, and nothing in it downloads model files.

    Common issues

    • "No xAI API key found" - the XAI_API env var isn't set and api_key is empty. Set it before launching ComfyUI, or paste the key in.
    • Failed to fetch / URL errors - usually the xAI side can't reach the URL. Check it's public and not behind auth, then check the raw URL in a browser.
    • HTTP 401 / 429 - bad key, or rate limit / balance. The node surfaces xAI's raw error body, and it's usually unambiguous.
    • Moderation rejections - xAI's API filters on its side; a rejected request comes back as an error even though the call may still have been billed. The community has hit exactly this with Grok-in-ComfyUI, so it's worth knowing it's not your graph.

    If the image is already on the web, this is the node to grab. If it's sitting in your workflow as a tensor, use the Image variant - that's the whole fork in the road.

    CategoryDioBrando/Grok

    Inputs (7)

    NameTypeDefaultDescription
    image_urlSTRINGhttps://example.com/image.jpg
    promptSTRINGDescribe this image in detail.
    modelCOMBOgrok-4.3-latest11 options: grok-4.3-latest, grok-4.3, grok-4.20-multi-agent-0309, grok-4.20-0309-reasoning, grok-4.20-0309-non-reasoning, grok-4-1-fast-reasoning, +5
    max_tokensINT204864–100000
    temperatureFLOAT0.700–2
    detailCOMBOhigh3 options: high, low, auto
    api_keyoptSTRING

    Outputs (2)

    NameTypeDescription
    responseSTRING
    usageSTRING