
Free & Best Quality AI Image generator API
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.dev/imgAvailable Query Parameters
General 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
Model-Specific Parameters
Lucid Origin (model=lucid-origin)
guidance(optional): Controls prompt adherence (0-10). Default:4.5seed(optional): Random seed for reproducibility (≥0)height(optional): Image height in pixels (0-2500). Default:1120width(optional): Image width in pixels (0-2500). Default:1120num_stepsorsteps(optional): Diffusion steps (1-40)
Phoenix (model=phoenix)
guidance(optional): Controls prompt adherence (2-10). Default:2seed(optional): Random seed for reproducibility (≥0)height(optional): Image height in pixels (0-2048). Default:1024width(optional): Image width in pixels (0-2048). Default:1024num_steps(optional): Diffusion steps (1-50). Default:25negative_prompt(optional): What to exclude from the image
Flux Schnell (model=flux-schnell)
steps(optional): Diffusion steps (1-8). Default:4
Stable Diffusion Base (model=sdxl) & Lightning (model=sdxl-lightning)
guidance(optional): Controls prompt adherence. Default:7.5negative_prompt(optional): What to exclude from the imageheight(optional): Image height in pixels (256-2048)width(optional): Image width in pixels (256-2048)num_steps(optional): Diffusion steps (1-20). Default:20strength(optional): Transformation strength for img2img (0-1). Default:1seed(optional): Random seed for reproducibilityimage_b64(optional): Base64-encoded input image for img2img tasks
Dreamshaper (model=dreamshaper)
guidance(optional): Controls prompt adherence. Default:7.5negative_prompt(optional): What to exclude from the imageheight(optional): Image height in pixels (256-2048)width(optional): Image width in pixels (256-2048)num_steps(optional): Diffusion steps (1-20). Default:20strength(optional): Transformation strength for img2img (0-1). Default:1seed(optional): Random seed for reproducibilityimage_b64(optional): Base64-encoded input image for img2img tasks
🎨 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🌈 |
| Lucid Origin | lucid-origin | High-quality artistic images with advanced parameter control ✨ |
| Phoenix | phoenix | Professional-grade images with negative prompting support 🔥 |
📝 Example Requests
Basic Request
GET https://ai-image-api.xeven.workers.dev/img?prompt=Cyberpunk landscape with neon citiesDetailed Request
GET https://ai-image-api.xeven.workers.dev/img?prompt=Futuristic robot&model=dreamshaper&strength=0.8&guidance=7Dreamshaper Example
GET https://ai-image-api.xeven.workers.dev/img?prompt=Fantasy castle&model=dreamshaper&guidance=8&negative_prompt=blurry,low quality&height=768&width=768&num_steps=15&seed=42SD XL Lightning Example
GET https://ai-image-api.xeven.workers.dev/img?prompt=Space battle&model=sdxl-lightning&guidance=8&negative_prompt=blurry&height=1024&width=1024&num_steps=15```SD XL Example
GET https://ai-image-api.xeven.workers.dev/img?prompt=Future cityscape&model=sdxl&guidance=9&height=1536&width=1536&num_steps=18&seed=12345Flux Schnell Example
GET https://ai-image-api.xeven.workers.dev/img?prompt=Realistic portrait&model=flux-schnell&steps=6Lucid Origin Example
GET https://ai-image-api.xeven.workers.dev/img?prompt=Mystical forest&model=lucid-origin&guidance=6&height=1500&width=1500&num_steps=35Phoenix Example
GET https://ai-image-api.xeven.workers.dev/img?prompt=Futuristic city&model=phoenix&guidance=3&negative_prompt=blurry,low quality&height=1536&width=1536&num_steps=30Curl 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=flux-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 :
