Nodes/ComfyUI-ADIC/ADIC Common API
ComfyUI Node

ADIC Common API

The generic API-call node hiding behind a very specific default

By jinchanz·Created about a year ago·Updated a day ago· 5
ADIC Common API
    • response
    params
    app_nameNHCI
    api_key
    api_endpoint/open/api/v1/ai/imageTranslate

    ADIC Common API is the kitchen-sink version of everything else in this pack: a generic "POST this JSON to a Bearer-token endpoint and give me the response back as a string" node. If you squint, it's ImageTranslateAPI with the branding filed off - same headers, same error handling, same response envelope - but with an endpoint you're free to point anywhere. The author built it as a reusable front door for internal "ADIC" services, and it happens to be a decent primitive if you have any HTTP API you want to call from inside a workflow.

    Here's the whole mechanism. It takes your params (a JSON string), parses it, builds headers - Authorization: Bearer <api_key> plus an X-App-Name header - and POSTs the body to api_endpoint with a 600-second timeout. It expects the API's response to carry a success boolean (a very Chinese-platform convention), returns the whole thing pretty-printed as a JSON string, and if the request or the business call fails, it returns a JSON object with an error field instead of crashing the run.

    The inputs that matter

    • params - the JSON request body, as a string. It's forceInput, so wire it from a builder node (like StringToJsonArray or PythonCodeExecutor in the same pack) rather than typing it.
    • api_key - required, used for Bearer auth. Empty string and the node refuses politely.
    • api_endpoint - the URL you're POSTing to.
    • app_name - lands in the X-App-Name header. Defaults to NHCI, which is the author's internal app identifier; you can usually leave it.

    The only output is response, a STRING. It's an output node, so the result shows up in the UI and the node always runs.

    The two traps

    First, the default api_endpoint is /open/api/v1/ai/imageTranslate - a relative path. The source does a plain requests.post against it, so unless you supply a full https://host/... URL, this node errors out on first run. Don't be surprised; type the whole URL.

    Second, look at the source and you'll find verify=False - SSL certificate verification is switched off. That's par for the course in internal-service nodes like this (and everywhere else in this pack), but it means the node will happily talk to a MITM'd endpoint. Fine for a trusted internal API; don't feed it secrets over a hostile network without thinking about it.

    Installing ComfyUI-ADIC

    This pack has no requirements.txt and no model downloads - it's pure Python, so install is boring:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jinchanz/ComfyUI-ADIC
    

    then restart ComfyUI. Or use ComfyUI Manager and search "ComfyUI-ADIC". The README asks for pip install requests, which ComfyUI already pulls in, so usually nothing extra is needed. Expect the pack's README to be in Chinese and to document only the translate nodes - everything else, including this one, is discoverable in the source or on comfy.icu.

    CategoryMalette

    Inputs (4)

    NameTypeDefaultDescription
    paramsSTRING
    app_nameSTRINGNHCI
    api_keySTRING
    api_endpointSTRING/open/api/v1/ai/imageTranslate

    Outputs (1)

    NameTypeDescription
    responseSTRING