Free & Best Quality AI Image generator API

Free & Best Quality AI Image generator API

Anish

🤖 AI Image Generation API 🖼️

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/img

Available Query Parameters

🎨 Models Available

Model NameQuery ParameterBest For
Stable Diffusion XL Lightningsdxl-lightningFast, high-quality images < 5 secs 🚀
Stable Diffusion XLsdxlBalanced, professional images, highest quality < 12 secs 🖼️
Flux Schnellflux-schnellBest and most realistic model with quick generations < 6secs 🔥
DreamshaperdreamshaperFastest model < 2secs, low quality🌈

📝 Example Requests

Basic Request

GET https://ai-image-api.xeven.workers.dev/img?prompt=Cyberpunk landscape with neon cities

Detailed Request

GET https://ai-image-api.xeven.workers.dev/img?prompt=Futuristic robot&model=dreamshaper&strength=0.8&guidance=7

Dreamshaper Example

GET https://ai-image-api.xeven.workers.dev/img?prompt=Fantasy castle&model=dreamshaper

SD XL Lightning Example

GET https://ai-image-api.xeven.workers.dev/img?prompt=Space battle&model=sdxl-lightning

SD XL Example

GET https://ai-image-api.xeven.workers.dev/img?prompt=Future cityscape&model=sdxl

Flux Schnell Example

GET https://ai-image-api.xeven.workers.dev/img?prompt=Realistic portrait&model=flux-schnell

Curl Example

curl -X GET "https://ai-image-api.xeven.workers.dev/img?prompt=Fantasy%20castle&model=dreamshaper" --output image.png

Note: Binary output can mess up your terminal. Use “—output -” to tell curl to output it to your terminal anyway, or consider “—output” to save to a file.

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

By Flux :

flux

By Stable Diffusion Base :

sd-base

By Stable Diffusion Lightning :

sdxllightning

By Dreamshaper :

dreamshaper

Share this article