Chat with
ImageGPT Reference

URL-Based Image
Generation

Generate images by constructing a URL. No SDKs, no API keys in headers—just build a URL and use it as an image source.

Psst, Agents should look here → llms.txt

Getting Started

Quick Start

The simplest way to generate an image.

Base URL Format

https://{project}.imagegpt.host/image?prompt={your prompt}

Example

<img src="https://demo.imagegpt.host/image?prompt=A%20sunset%20over%20mountains" alt="Sunset" />

Project slug: Your project slug is the subdomain. Create a project in the dashboard to get your unique slug.

Reference

Parameters

The parameters for image generation.

ParameterTypeDescription
promptstringText description of the image to generateRequired
routestringPredefined route with provider fallback chain. See available routes
modelstringModel alias (e.g., flux-2-dev) or explicit provider@model format. See available aliases
aspect_ratiostringImage aspect ratio. See supported ratios
seedintegerReproducible generation—same seed produces same image
cachestringSet to 'false' to bypass cache and force new generation
Routing

Routes

Routes provide automatic fallback between providers. If one provider fails, the next in the chain is tried.

quality/fastFast & Cheap

Prioritizes speed and cost. Best for prototyping and high-volume use.

quality/balancedBalanced

Balanced quality, cost, and speed for production use.

quality/highHigh Quality

Premium quality for hero images and marketing assets.

text/fastFast Text

Quick text generation for prototyping.

text/balancedBalanced Text

Good text accuracy with reasonable speed.

text/highHigh Text

Best readable text in images.

realistic/fastFast Photorealism

Quick photorealistic generation.

realistic/balancedBalanced Photorealism

Good photorealism with reasonable speed.

realistic/highMaximum Photorealism

Maximum photorealism for portraits and realistic scenes.

Example

<img src="https://demo.imagegpt.host/image?prompt=A%20sunset&route=quality/high" alt="Sunset" />
Models

Model Aliases

Request a specific model by its canonical name. The system automatically tries multiple providers for reliability and performance.

Gemini

gemini-3-proPremium

Google Gemini 3 Pro — flagship multimodal image generation.

nano-banana-2High Quality

Gemini 3.1 Flash — fast, high-quality generation and editing with pro-level quality.

gemini-2.5-flashBalanced

Google Gemini 2.5 Flash — fast multimodal image generation.

Flux 2

flux-2-devBalanced

Flux 2 Dev — high quality image generation.

flux-2-proPremium

Flux 2 Pro — premium quality image generation.

flux-2-dev-turboFast

Flux 2 Dev Turbo — fast variant of Flux 2.

flux-2-klein-4bUltra-Fast

Flux 2 Klein 4B — ultra-fast 4 billion parameter model.

flux-2-klein-4b-distilledUltra-Fast

Flux 2 Klein 4B Distilled — fastest Klein variant.

flux-2-klein-9bFast

Flux 2 Klein 9B — higher quality 9 billion parameter model.

Flux 1

flux-1-schnellUltra-Fast

Flux 1 Schnell — fastest Flux model.

flux-1.1-pro-ultraPremium

Flux 1.1 Pro Ultra — premium 4MP raw mode.

Other Models

recraft-v3High Quality

Recraft V3 — versatile style-based generation.

ideogram-v3Best Text

Ideogram V3 — industry-leading text rendering.

qwen-image-2512High Quality

Qwen Image 2512 — excellent realism and multilingual text.

seedream-4.5High Quality

Seedream 4.5 — high quality with strong typography.

glm-imageHigh Quality

GLM Image — excellent text rendering and realism.

grok-imagineBalanced

Grok Imagine — highly aesthetic photorealistic images.

imagineart-1.5Balanced

ImagineArt 1.5 — lifelike realism and text rendering.

imagineart-1.5-proPremium

ImagineArt 1.5 Pro — 4K professional-grade visuals.

Example

<img src="https://demo.imagegpt.host/image?prompt=A%20sunset&model=flux-2-dev" alt="Sunset" />

Automatic failover: Model aliases try multiple providers in order. If one provider fails, the next is tried automatically — same reliability as routes. You can also use provider@model format (e.g., fal@flux-2-dev) to target a specific provider directly.

Dimensions

Aspect Ratios

Control the shape and size of generated images.

1:1

Square (1024x1024)

16:9

Landscape (1344x768)

9:16

Portrait (768x1344)

4:3

Standard (1152x896)

3:4

Tall (896x1152)

3:2

Photo (1216x832)

Response

Response Format

All requests return an image with HTTP response headers conveying information about that request.

Response Headers

HeaderDescription
Content-Typeimage/webp, image/jpeg, or image/png
X-Generation-Time-MsGeneration duration in milliseconds
X-Request-IdUnique request identifier for debugging
IGPT-CreditsCredits consumed by this request

Always an image: Every response returns valid image data, making the URL safe to use directly in <img> tags and image contexts without error handling.

Troubleshooting

Errors

When an error occurs, the response still returns an image (a placeholder) with error details in headers.

Error Headers

HeaderDescription
X-Error-CodeError code identifying the issue
X-Error-MessageHuman-readable error description
X-Request-IdRequest identifier for debugging

Error Codes

CodeMeaning
VALIDATION_ERRORInvalid or missing parameters
PROJECT_NOT_FOUNDInvalid project slug in subdomain
UNKNOWN_ROUTESpecified route does not exist
LIMITRate limit exceeded
TRIAL_CREDITS_EXHAUSTEDTrial credits used up
CREDIT_LIMIT_REACHEDMonthly credit limit reached
GENERATION_FAILEDAll providers failed to generate

Error Image

When an error occurs, an error image is returned instead of a broken image. The image includes the error category and a brief description:

Example error placeholder
Examples

Full Examples

Basic HTML

<img src="https://demo.imagegpt.host/image?prompt=A%20sunset%20over%20mountains" alt="Sunset over mountains" />

High quality with aspect ratio

<img src="https://demo.imagegpt.host/image?prompt=Professional%20headshot&route=quality/high&aspect_ratio=3:4" alt="Professional headshot" />

Text rendering (sign, label, etc.)

<img src="https://demo.imagegpt.host/image?prompt=A%20neon%20sign%20that%20says%20OPEN&route=text/high" alt="Neon open sign" />