Free & Best Quality AI Image generator API

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

Available Query Parameters

General Parameters

Model-Specific Parameters

Lucid Origin (model=lucid-origin)
Phoenix (model=phoenix)
Flux Schnell (model=flux-schnell)
Stable Diffusion Base (model=sdxl) & Lightning (model=sdxl-lightning)
Dreamshaper (model=dreamshaper)

🎨 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🌈
Lucid Originlucid-originHigh-quality artistic images with advanced parameter control ✨
PhoenixphoenixProfessional-grade images with negative prompting support 🔥

📝 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&guidance=8&negative_prompt=blurry,low quality&height=768&width=768&num_steps=15&seed=42

SD 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=12345

Flux Schnell Example

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

Lucid 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=35

Phoenix 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=30

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 :

alt text

By Stable Diffusion Base :

sd-base

By Stable Diffusion Lightning :

alt text

By Dreamshaper :

alt text

Share this article