Click the button above to deploy this project directly to Cloudflare Workers!
We have developed this powerful AI Image Generator API, hosted on Cloudflare Workers, leveraging Hugging Face models for seamless image creation.
With this API, you can generate high-quality images using a variety of Stable Diffusion and AI Models.
| 🔥 Model Name | 📌 Model Path |
|---|---|
| Realistic Vision | SG161222/Realistic_Vision_V5.1_noVAE |
| DreamShaper | Lykon/DreamShaper-v7 |
| SDXL | stabilityai/stable-diffusion-xl-base-1.0 |
| Deliberate | XpucT/Deliberate |
| Anything V5 | stabilityai/stable-diffusion-2-1 |
| Protogen | darkstorm2150/Protogen_x5.8 |
| Flux | black-forest-labs/FLUX.1-dev |
This repository provides an AI Image Generator API powered by Cloudflare Workers and Hugging Face Models. Follow the steps below to deploy it using GitHub Actions.
| Step | Description |
|---|---|
| ✅ 1. Add GitHub Secrets | Go to your repository Settings → Secrets and Variables → Actions and add the following secrets: |
| 🔹 CLOUDFLARE_API_TOKEN | Your Cloudflare API Token (Required for deployment) |
| 🔹 HUGGINGFACE_TOKEN | Your Hugging Face API Key (Required for generating images) |
| Action | Steps |
|---|---|
| Automatic Deployment | Deployment happens automatically when you push changes to the master branch. |
| Manual Deployment | 1️⃣ Go to GitHub Actions → Select Deploy to Cloudflare Workers workflow 2️⃣ Click Run Workflow |
✅ Your Worker will be live on Cloudflare! 🎉
| Command | Description |
|---|---|
wrangler tail |
Check Cloudflare Worker logs |
| Cloudflare Workers Docs | Official Cloudflare Workers documentation |
This API utilizes Hugging Face Inference API to generate AI-powered images.
By passing URL Parameters, you can specify:
✅ Prompt – The text description for the image
✅ Model Name – Select from the available AI models
✅ Image Size – Define the resolution of the generated image
🚀 Simple & Fast – Ready to integrate into your projects!
📌 Explore the API in detail at the official Hugging Face platform.
WOODcraft – Telegram
🔥 Join for Updates & Support!