Civitai- API

Hello,

I want to integrate the CivitAI API with Make.com to generate AI-generated images (e.g., Stable Diffusion) and upload the results to Airtable. I’m struggling to set up the automation correctly.

What I aim to achieve:

  1. Use the CivitAI API to generate images based on prompts.
  2. Handle binary output data (image format) from the API response.
  3. Convert and store the generated image in a sharable format (e.g., PNG/JPEG).
  4. Upload the final image file to the AI Image column in Airtable.

Questions:

  1. How can I properly call the CivitAI API in Make.com and handle binary image output?

Thank you for your guidance!

I can see from your example that you’re using Bearer authorization.

It’s kind of counter-intuitive, but you’d be better using the HTTP Make an API Key Auth Request module. By using this, you won’t have to keep your Bearer token in plain text in the scenario, plus all API Key data in centralized for easier management.

Details are in the help here.

What problems are you having in calling the CivitAI API?

Hi David,

I’m trying to integrate the CivitAI API with Make.com to generate images and upload them to Airtable. However, I’m struggling to run any model I like via the API. I couldn’t find any examples online regarding this process. Do I need to purchase a paid service from CivitAI for this functionality?

With Hugging Face, I can get outputs from certain models through their API permissions, but CivitAI has a much richer variety of models. I might lack some knowledge in this area, so I’d greatly appreciate your guidance. If running models via the API is not possible, could you suggest an alternative method? I’ve also tried following the API documentation, but so far, I haven’t had any success.

Thank you in advance! :blush:

From looking at the Civitai API docs, it looks like there’s only endpoints for retrieving information about creators, images or models (the endpoints only have a GET method option, no POST).

So there’s no way of creating images using Civitai models with their API - not with Make or any other tool.

If you’re looking for a way to generate images using a variety of models, you might want to check out fal.ai instead.

Thanks for the clarification! I understand that Civitai’s API doesn’t support POST requests for creating images directly. However, if I download a model I like from Civitai and upload it to Hugging Face, I believe I can create a POST setup from there.

You can certainly use models on Hugging Face from Make.

We have modules in the Hugging Face app for Create a Summary, Create a Text Classification, Create a Translation and Create an Answer.

We don’t yet have a module for Create an Image, but you will be able to achieve the same result by using the Make an API Call module in conjunction with the Hugging Face API documentation for their Text to Image endpoint.