# ComfyUI API for Free AI Images?

**URL:** <https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438>\
**Category:** feature\
**Tags:** done\
**Created:** [August 2, 2024, 5:15pm UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438 "2024-08-02T17:15:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 2, 2024, 5:15pm UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/1 "2024-08-02T17:15:06Z")

</div>

Can you add Comfy UI API for images?

Take a look at all the AI image models … that we can get for FREE instead of paying 4-8 cents for each image credit.

THESE FREE MODELS ARE AMAZING:

> **[Civitai Models | Discover Free Stable Diffusion & Flux Models](https://civitai.com/models)**
>
> Browse from thousands of free Stable Diffusion & Flux models, spanning unique anime art styles, immersive 3D renders, stunning photorealism, and more

Here is a tutorial on enabling the ComfyUI API

[![](https://forum.seocontentmachine.com/uploads/default/original/2X/5/5924fd8df503ae48c2cd765ca78de46d69c7550f.jpeg "How To Create ComfyUI API Endpoint For AI Image Generation (Tutorial Guide)") ](https://www.youtube.com/watch?v=7ODVE7So7j0)

For beginners, you can install ComfyUI with 1 click

[![](https://forum.seocontentmachine.com/uploads/default/original/2X/c/c93c8d3030b35b087ec8320ba60928f0cfd3cc4a.jpeg "ComfyUI Tutorial For Beginners | Install ComfyUI in 1 CLICK!") ](https://www.youtube.com/watch?v=UCEqlWdsL4s)

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 3, 2024, 8:21am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/2 "2024-08-03T08:21:55Z")

</div>

Let me have a look…

From a quick glance looks very promising. However setup does seem to require a few steps to get going. Not as easy as LM studio for content gen.

Thanks for the feature post.

I will try to install it on my dev PC to get a first hand feel for it

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 3, 2024, 11:13am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/3 "2024-08-03T11:13:01Z")

</div>

This would really take SCM over the top … because what you can do with ComfyUI is rivaling BIG DATA … and it’s free. SCM would be in unprecedented territory.

Take a look at this new model FLUX … just came out yesterday.

[![](https://forum.seocontentmachine.com/uploads/default/original/2X/d/d00eb349a7476fc8428cf69e19ac5c342f5da3ae.jpeg "Flux Completely Destroys Stable Diffusion 3! The New Champion") ](https://www.youtube.com/watch?v=77zAWTmDmiU)

I really hope you can get it working. _fingers crossed_

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 5, 2024, 9:18am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/4 "2024-08-05T09:18:33Z")

</div>

Okay … when you watch the videos, it looks very complex, but here is how to make it easy for you to add ComfyUI to SCM via a simple API call.

BASIC STEPS NEEDED FOR COMFYUI API

1. Load the Workflow JSON string in any programming language
2. Change any desired field in the Workflow JSON string
3. Wrap the whole definition into dict under the “prompt” key ({“prompt”: })
4. Send it as POST request to [http://127.0.0.1:8188/prompt](http://127.0.0.1:8188/prompt) (or any other url)

SO in SCM under Settings/API Logins … add a new API accordion tab, ask user for :

1. ComfyUI Server Endpoint
2. Workflow (as a textarea for JSON string)
3. Image Prompt Tag (default it to “%IMGPROMPT%” or something that will jive nicely with the rest of SCM’s delimiters).
4. Timeout (s).

The Workflow is just a JSON string, and all SCM needs to do is replace the IMAGE PROMPT TAG with the value of the prompt from the SCM task.

The result will be a PNG image via API Websocket (or multiple images if a batch is run, but batches are not necessary for our purpose).

EXAMPLE:  
When I saved the ComfyUI Workflow API json file, I got this code:

```auto
{
  "5": {
    "inputs": {
      "width": 1024,
      "height": 768,
      "batch_size": 1
    },
    "class_type": "EmptyLatentImage",
    "_meta": {
      "title": "Empty Latent Image"
    }
  },
  "6": {
    "inputs": {
      "text": "Realistic Photo of a massive tsunami about to hit the Statue of Liberty",
      "clip": [
        "11",
        0
      ]
    },
    "class_type": "CLIPTextEncode",
    "_meta": {
      "title": "CLIP Text Encode (Prompt)"
    }
  },
  "8": {
    "inputs": {
      "samples": [
        "13",
        0
      ],
      "vae": [
        "10",
        0
      ]
    },
    "class_type": "VAEDecode",
    "_meta": {
      "title": "VAE Decode"
    }
  },
  "10": {
    "inputs": {
      "vae_name": "flux-vae.safetensors"
    },
    "class_type": "VAELoader",
    "_meta": {
      "title": "Load VAE"
    }
  },
  "11": {
    "inputs": {
      "clip_name1": "t5xxl_fp8_e4m3fn.safetensors",
      "clip_name2": "clip_l.safetensors",
      "type": "flux"
    },
    "class_type": "DualCLIPLoader",
    "_meta": {
      "title": "DualCLIPLoader"
    }
  },
  "12": {
    "inputs": {
      "unet_name": "flux1-schnell-fp8.safetensors",
      "weight_dtype": "fp8_e4m3fn"
    },
    "class_type": "UNETLoader",
    "_meta": {
      "title": "Load Diffusion Model"
    }
  },
  "13": {
    "inputs": {
      "noise": [
        "25",
        0
      ],
      "guider": [
        "22",
        0
      ],
      "sampler": [
        "16",
        0
      ],
      "sigmas": [
        "17",
        0
      ],
      "latent_image": [
        "5",
        0
      ]
    },
    "class_type": "SamplerCustomAdvanced",
    "_meta": {
      "title": "SamplerCustomAdvanced"
    }
  },
  "16": {
    "inputs": {
      "sampler_name": "uni_pc_bh2"
    },
    "class_type": "KSamplerSelect",
    "_meta": {
      "title": "KSamplerSelect"
    }
  },
  "17": {
    "inputs": {
      "scheduler": "sgm_uniform",
      "steps": 4,
      "denoise": 1,
      "model": [
        "12",
        0
      ]
    },
    "class_type": "BasicScheduler",
    "_meta": {
      "title": "BasicScheduler"
    }
  },
  "22": {
    "inputs": {
      "model": [
        "12",
        0
      ],
      "conditioning": [
        "6",
        0
      ]
    },
    "class_type": "BasicGuider",
    "_meta": {
      "title": "BasicGuider"
    }
  },
  "25": {
    "inputs": {
      "noise_seed": 1028320977096301
    },
    "class_type": "RandomNoise",
    "_meta": {
      "title": "RandomNoise"
    }
  },
  "26": {
    "inputs": {
      "images": [
        "27",
        1
      ]
    },
    "class_type": "PreviewImage",
    "_meta": {
      "title": "Preview Image"
    }
  },
  "27": {
    "inputs": {
      "empty_cache": true,
      "gc_collect": true,
      "unload_all_models": true,
      "image_pass": [
        "8",
        0
      ]
    },
    "class_type": "VRAM_Debug",
    "_meta": {
      "title": "VRAM Debug"
    }
  }
}

```

so all the user needs to do here is find his manual prompt in the API workflow he saved, and then change it to the Image Prompt Tag “%IMGPROMPT%”. Then copy/paste the whole JSON into SCM’s new API settings Workflow textarea box.

LIKE THIS:

```auto
{
  "5": {
    "inputs": {
      "width": 1024,
      "height": 768,
      "batch_size": 1
    },
    "class_type": "EmptyLatentImage",
    "_meta": {
      "title": "Empty Latent Image"
    }
  },
  "6": {
    "inputs": {
      "text": "%IMGPROMPT%",
      "clip": [
        "11",
        0
      ]
    },
    "class_type": "CLIPTextEncode",
    "_meta": {
      "title": "CLIP Text Encode (Prompt)"
    }
  },
  "8": {
    "inputs": {
      "samples": [
        "13",
        0
      ],
      "vae": [
        "10",
        0
      ]
    },
    "class_type": "VAEDecode",
    "_meta": {
      "title": "VAE Decode"
    }
  },
  "10": {
    "inputs": {
      "vae_name": "flux-vae.safetensors"
    },
    "class_type": "VAELoader",
    "_meta": {
      "title": "Load VAE"
    }
  },
  "11": {
    "inputs": {
      "clip_name1": "t5xxl_fp8_e4m3fn.safetensors",
      "clip_name2": "clip_l.safetensors",
      "type": "flux"
    },
    "class_type": "DualCLIPLoader",
    "_meta": {
      "title": "DualCLIPLoader"
    }
  },
  "12": {
    "inputs": {
      "unet_name": "flux1-schnell-fp8.safetensors",
      "weight_dtype": "fp8_e4m3fn"
    },
    "class_type": "UNETLoader",
    "_meta": {
      "title": "Load Diffusion Model"
    }
  },
  "13": {
    "inputs": {
      "noise": [
        "25",
        0
      ],
      "guider": [
        "22",
        0
      ],
      "sampler": [
        "16",
        0
      ],
      "sigmas": [
        "17",
        0
      ],
      "latent_image": [
        "5",
        0
      ]
    },
    "class_type": "SamplerCustomAdvanced",
    "_meta": {
      "title": "SamplerCustomAdvanced"
    }
  },
  "16": {
    "inputs": {
      "sampler_name": "uni_pc_bh2"
    },
    "class_type": "KSamplerSelect",
    "_meta": {
      "title": "KSamplerSelect"
    }
  },
  "17": {
    "inputs": {
      "scheduler": "sgm_uniform",
      "steps": 4,
      "denoise": 1,
      "model": [
        "12",
        0
      ]
    },
    "class_type": "BasicScheduler",
    "_meta": {
      "title": "BasicScheduler"
    }
  },
  "22": {
    "inputs": {
      "model": [
        "12",
        0
      ],
      "conditioning": [
        "6",
        0
      ]
    },
    "class_type": "BasicGuider",
    "_meta": {
      "title": "BasicGuider"
    }
  },
  "25": {
    "inputs": {
      "noise_seed": 1028320977096301
    },
    "class_type": "RandomNoise",
    "_meta": {
      "title": "RandomNoise"
    }
  },
  "26": {
    "inputs": {
      "images": [
        "27",
        1
      ]
    },
    "class_type": "PreviewImage",
    "_meta": {
      "title": "Preview Image"
    }
  },
  "27": {
    "inputs": {
      "empty_cache": true,
      "gc_collect": true,
      "unload_all_models": true,
      "image_pass": [
        "8",
        0
      ]
    },
    "class_type": "VRAM_Debug",
    "_meta": {
      "title": "VRAM Debug"
    }
  }
}

```

Notice the only change was under block 6 where I swapped the manual prompt from my saved API workflow with %IMGPROMPT%.

Then all SCM needs to do is a simple replace of %IMGPROMPT% and post the entire JSON string as the final prompt to ComfyUI endpoint.

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 5, 2024, 9:38am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/5 "2024-08-05T09:38:06Z")

</div>

By the way … I got FLUX working via ComfyUI and it is unbelievably amazing.

Here is the result I got for the prompt: “Photo of 3 smiling angels”. That’s all I wrote. Took 2 min to render because I need more ram, but the resulting images are beyond belief.

 ![ComfyUI_temp_ajmvi_00158_](https://forum.seocontentmachine.com/uploads/default/original/2X/9/92e5ef7bae3e40ed4d83a353f0157ee52a5b4770.jpeg)

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 6, 2024, 12:51am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/6 "2024-08-06T00:51:05Z")

</div>

Ok, thanks for breaking it down.

I need to put sometime to installing comfy ui and loading up a model first right?

As for the workflow JSON, is this setup by default?

I saw video and it was full of drag-drop pipes which looked confusing

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 6, 2024, 6:02am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/7 "2024-08-06T06:02:58Z")

</div>

I know you’re busy … so I will try to create a working WEBHOOK example and test it for you to see if I can get it working so you don’t have to deal with the complexities of ComfyUI.  
…

So … I was giving it some more thought. I think instead of chasing every API from here to eternity … and there will be many more. You will constantly be programming APIs. That is probably not the best solution.

I think what you should do is just create a Universal WEBHOOK Feature … that let’s the user create as many Webhooks / API types as they want while making your job easier with less work. It would be very similar to the structure I detailed earlier … and Of course, allow us to pass and extract Macro values to and from the webhooks.

Allow User to create unlimited webhooks and for each one  
ASK USER FOR:

1. Webhook Name
2. Server Endpoint
3. Method (GET or POST)
4. Workflow (TextArea for All Request Parameters, allow for Macro Variables)
5. Payload Type (type of response expected … is it text, json, xml, image, video?)
6. Payload Parser (TextArea that allows macro variables to be set from extracted data and returned to task)
7. Timeout (s).

You can even do templates for popular webhooks, like ComfyUI, or heck … anything … (think Zapier/Make.com - no limits!).

This way you are not chasing the horizon with every new API that comes out that users will want.

… or do you have a similar feature already? I looked, but couldn’t find a webhook system.

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 6, 2024, 7:34am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/9 "2024-08-06T07:34:29Z")

</div>

I created a new thread regarding Universal Webhook Feature … if you can make that happen, you can disregard this feature request as it would be unnecessary.

NEW THREAD:

> [@Universal Webhook Feature (instead of more APIs)](https://forum.seocontentmachine.com/t/universal-webhook-feature-instead-of-more-apis/445):
>
> So … I was giving it some more thought. I think instead of chasing every API from here to eternity … and there will be many more. You will constantly be programming APIs. That is probably not the best solution. I think what you should do is just create a Universal WEBHOOK Feature … that let’s the user create as many Webhooks / API types as they want while making your job easier with less work. It would be very similar to the structure I detailed earlier … and Of course, allow us to pass and ext…

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 7, 2024, 12:52am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/10 "2024-08-07T00:52:56Z")

</div>

Thankyou! will comment on your webhook thread.

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 9, 2024, 1:22pm UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/11 "2024-08-09T13:22:52Z")

</div>

FYI … I was able to get the Comfy API working.

All I need now is the webhook feature in SCM, so I can use it. 😉

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 22, 2024, 5:13am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/12 "2024-08-22T05:13:39Z")

</div>

Are you able to make it work with webhook?

You will need to get comfy ui to return image data via base64

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 28, 2024, 5:29am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/13 "2024-08-28T05:29:09Z")

</div>

Ok … I’m a bit confused … how would I call this from the Article Creator? Do I use “Webhook1” or “Webhook 1” (with space)?

```auto
%MyFeaturedImage% = [Webhook1: Realistic Picture of "%title%"]
or ??
%MyFeaturedImage% = [Webhook 1: Realistic Picture of "%title%"]

```

And in the body of the “Webhook 1” setting, I would pass the reserved macro %prompt% like below? … where “%prompt%” is specially reserved by SCM?

```auto
{
    "model": "image-model",
    "messages": [{
            "role": "system",
            "content": "Create an image"
        },
        {
            "role": "user",
            "content": %prompt%
        }
    ],
    "temperature": 0.7
}

```

Any examples you could provide of how this should work would be great.

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 28, 2024, 10:52am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/14 "2024-08-28T10:52:17Z")

</div>

Its called as same name as what is in the dropdown.

![image](https://forum.seocontentmachine.com/uploads/default/original/2X/d/dc913abf69d7c36c6aa6cfd40cc3ca6aa6c5be12.png)

So webhook 1

Correct. Inside webhook 1 body

Should look like this

![image](https://forum.seocontentmachine.com/uploads/default/original/2X/4/476557b0b3e1afbb4a66ffedaec447387aa1847e.png)

The final piece is the output, so you need to tell SCM what data to return.

Not sure what the JSON output is though, but if you do this.

You will get all data printed to your article.

![image](https://forum.seocontentmachine.com/uploads/default/original/2X/3/3a2f4cd4101843818efb00e3667ef32e92367878.png)

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 28, 2024, 12:40pm UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/15 "2024-08-28T12:40:22Z")

</div>

Refer to this for a in depth explanation

> [@Use Webhooks inside the Article creator to call your own AI models or services](https://forum.seocontentmachine.com/t/use-webhooks-inside-the-article-creator-to-call-your-own-ai-models-or-services/467):
>
> There are a lot of new AI models and services offering generated content via APIs. SCM supports popular models such as OpenAI, groq, gemini etc. This is the current list of in app supported models. [image] What happens if a service is not directly supported by SCM? You can actually use those services right now with 2 solutions. Solutions: Use OpenAI compatible API models Use Webhooks inside the Article creator OpenAI compatible APIs The first solution is very easy to use. Most AI model…

I added a test service button to make it easier to figure out the settings as well

 ![image](https://forum.seocontentmachine.com/uploads/default/original/2X/1/1e2f303d15235b28cc6b6d9a6546f9bd0cad6001.png)

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [August 30, 2024, 3:52am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/16 "2024-08-30T03:52:48Z")

</div>

I can confirm with a bit of server customization on my end, I was able to get the ComfyUI API working with your new Webhook feature. Big THUMBS UP! Thank You Tim.

When you can, can you increase the number of “OpenAI Alts” and “Webhooks” from just 2? Ideally it should be an unlimited number (you never know how many projects you will have to run that require different resources), but at least 5 each for now to begin with?

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 31, 2024, 9:07am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/17 "2024-08-31T09:07:48Z")

</div>

I might have to redo the UI to add new items as the list is getting a bit too long for one screen I think

New feature request

> [@Add more openai alt / webhooks](https://forum.seocontentmachine.com/t/add-more-openai-alt-webhooks/470):
>
> When you can, can you increase the number of “OpenAI Alts” and “Webhooks” from just 2? Ideally it should be an unlimited number (you never know how many projects you will have to run that require different resources), but at least 5 each for now to begin with?

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [September 12, 2024, 10:50pm UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/18 "2024-09-12T22:50:26Z")

</div>

Did you manage to get SCM to talk to comfyui properly at the end?

If you could share details so I can try it as well that would be great!

---

<div class="post-metadata">

**Author:** ![rcimedia](https://forum.seocontentmachine.com/letter_avatar_proxy/v4/letter/r/5fc32e/32.png) [@rcimedia](https://forum.seocontentmachine.com/u/rcimedia)\
**Post date:** [September 13, 2024, 11:43am UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/19 "2024-09-13T11:43:31Z")

</div>

The new UI for API logins looks great … I hope you are able to add more Open AIs and Webhooks because I have to create a different Ollama model with a different modelfile for each param set (ie context window etc) I want to use.

Anyways, yes, I was able to get ComfyUI to work. I ended up creating a multipurpose script tailored to my ComfyUI config that would I could use the Webhook with. My script wouldn’t work for anyone else because it was customized for my particular server setup.

However, all the script is doing can be done with your new webhook. Here’s how:

1. Save the ComfyUI API json file as the first tutorial video above shows.
2. Copy/Paste the long JSON string into your Webhook Box but Replace the literal prompt with your %prompt% tag.
3. Then Post the JSON workflow to ComfyUI endpoint
4. The only issue you might run into is I believe the ComfyUI result is a binary file, not base64. so my script saves the binary to disk and then has the following line in it:

```auto
$base64_image = base64_encode(file_get_contents($imagefile));

```

and then I have the script return the base64 string to your Webhook.

And it works!

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [September 19, 2024, 5:15pm UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/20 "2024-09-19T17:15:32Z")

</div>

Amazing,

Ok I am trying it now. Downloading it to PC…

Hopefully I can have a nice written tutorial for setting it up on the site soon

---

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [August 5, 2026, 11:18pm UTC](https://forum.seocontentmachine.com/t/comfyui-api-for-free-ai-images/438/21 "2026-08-05T23:18:41Z")

</div>

Native 1st class support added for ComfyUI.

> [@Add native ComfyUI API support. Generate images with a local ComfyUI server](https://forum.seocontentmachine.com/t/add-native-comfyui-api-support-generate-images-with-a-local-comfyui-server/1058):
>
> ComfyUI is a free open source method to use AI to generate images on your PC. The only way to use it in SCM is via webhooks, however we can promote ComfyUI to proper native support. ie You select via a dropdown, with model detection etc So now we have proper support for it. How to connect ComfyUI Go settings \> API logins \> AI image Most values are pre-filled (including URL) You can click on the dropdown to get a list of all checkpoints installed. No copy paste required.
