Nodes/ComfyUI_API_Manager/Image Post Node
ComfyUI Node

Image Post Node

Send a generated image straight to an external endpoint

By CC-BryanOttho·Created 3 years ago·Updated 2 years ago· 24
Image Post Node
  • images
    api_url
    api_object_id
    api_key

    This is the closing move of the ComfyUI_API_Manager pack (see the writeups on its siblings APIRequestNode and TextPromptCombinerNode): it's an output node, meaning it doesn't feed anything back into your graph - it fires your generated image off to an external API and stops there. If your workflow's whole point is "generate an image tied to a record in some other system, then push it back into that system," this is the node that does the pushing.

    Why you'd reach for it

    The normal ComfyUI ending is a Save Image node writing a PNG to disk. Fine if a human's going to go look in the output folder. Useless if what's actually consuming your image is a CMS, a product catalog, or any other system with its own API and its own idea of where uploads live. PostImageToAPI skips the disk entirely and posts straight to wherever that system expects images, tying the upload to a specific object by ID as it goes. It's built to close out the pipeline the pack's README describes: fetch data with APIRequestNode, build a prompt from it with TextPromptCombinerNode, generate, then hand the result off here.

    The inputs that matter - there's no output to speak of

    It's a genuine sink: is_output_node is true and nothing is wired onward from it, so this is the last stop in the graph.

    • images - the IMAGE output from wherever your generation finishes, typically straight off a VAE Decode. No Save Image node needed in between.
    • api_url - the endpoint you're posting to. The README's convention: put $id in the URL wherever the object ID should go, e.g. https://yourapi.com/objects/$id/image, and the node substitutes it for you.
    • api_object_id - the ID that fills in $id. If you're chaining off TextPromptCombinerNode, that's its ID output, pulled from whatever field you named in that node's id_field_name.
    • api_key - auth for the request. Built the way the pack intends, this is APIRequestNode's API_KEY output, so you authenticate once at the top of the graph and reuse the token here instead of hardcoding it twice.

    How to install it

    Same pack, same one-step install - ComfyUI Manager (search "ComfyUI_API_Manager") or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CC-BryanOttho/ComfyUI_API_Manager.git
    

    Restart ComfyUI and the node shows up under the API Manager category. No dependencies, no models to download - this pack is pure Python glue.

    Common issues & troubleshooting

    The request goes out but the API rejects it. This node is deliberately unopinionated about what your target API expects - it doesn't know if you want multipart form data, base64-in-JSON, or raw bytes, and the README doesn't spell it out either. If uploads keep failing, that's the first thing to check against your API's own docs rather than assuming the node guesses right.

    $id isn't getting substituted. It's a literal string match on $id inside api_url - typo it as ${id} or :id and the node will happily post to the broken, un-substituted URL instead of failing loudly.

    Nothing visibly happens after the run. Because this is a true output node with zero return values, ComfyUI won't show a preview or result panel the way it does for an image save. Check your target API directly (or the console log) to confirm the post actually landed - silence isn't confirmation.

    One honest caveat: this whole pack started as one dev's fix for his own workflow and got shared before it was polished for general use. Treat this node like you'd treat any small, unmaintained integration script - read what it's actually sending before pointing it at production data, and don't be surprised if a quirk in your API's upload format means going and reading the source.

    CategoryAPI Manager

    Inputs (4)

    NameTypeDefaultDescription
    imagesIMAGE
    api_urlSTRING
    api_object_idSTRING
    api_keySTRING

    Outputs (0)

    No outputs