
Free & Best Quality AI Image generator API
by Anish
🤖 AI Image Generation API 🖼️
Overview
This Hono.js-powered API allows you to generate stunning AI images using multiple state-of-the-art image generation models!
🚀 Quick Start
Base URL
https://ai-image-api.xeven.workers.devAvailable Query Parameters
prompt(optional): Your image description. Default:Cyberpunk Dinosaur robot, modern, 3D render, 8K, HDmodel(optional): Choose your AI model. Default Model:SD XL Lightningstrength(optional): Image generation strength. Default:1guidance(optional): Guidance scale. Default:7.5
🎨 Models Available
| Model Name | Query Parameter | Best For |
|---|---|---|
| Stable Diffusion XL Lightning | sdxl-lightning | Fast, high-quality images < 5 secs 🚀 |
| Stable Diffusion XL | sdxl | Balanced, professional images, highest quality < 12 secs 🖼️ |
| Flux Schnell | flux-schnell | Best and most realistic model with quick generations < 6secs 🔥 |
| Dreamshaper | dreamshaper | Fastest model < 2secs, low quality🌈 |
📝 Example Requests
Basic Request
GET /img?prompt=Cyberpunk landscape with neon citiesDetailed Request
GET /img?prompt=Futuristic robot&model=dreamshaper&strength=0.8&guidance=7Dreamshaper Example
GET /img?prompt=Fantasy castle&model=dreamshaperSD XL Lightning Example
GET /img?prompt=Space battle&model=sdxl-lightningSD XL Example
GET /img?prompt=Future cityscape&model=sdxlFlux Schnell Example
GET /img?prompt=Realistic portrait&model=flux-schnellCurl Example
curl -X GET "https://ai-image-api.xeven.workers.dev/img?prompt=Fantasy%20castle&model=dreamshaper" --output image.pngNote: Binary output can mess up your terminal. Use “—output -” to tell curl to output it to your terminal anyway, or consider “—output
Curl Example with Parameters
curl -X GET "https://ai-image-api.xeven.workers.dev/img?prompt=Fantasy%20castle&model=flex-schnell" --output image.png🛠️ Error Handling
- Invalid routes return a 404 “Not Found” JSON response
- Unsupported parameters fall back to default values
By Flux :

By Stable Diffusion Base :

By Stable Diffusion Lightning :

By Dreamshaper :
