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
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.
Parameters
The parameters for image generation.
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text description of the image to generateRequired |
| route | string | Predefined route with provider fallback chain. See available routes |
| model | string | Model alias (e.g., flux-2-dev) or explicit provider@model format. See available aliases |
| aspect_ratio | string | Image aspect ratio. See supported ratios |
| seed | integer | Reproducible generation—same seed produces same image |
| cache | string | Set to 'false' to bypass cache and force new generation |
Routes
Routes provide automatic fallback between providers. If one provider fails, the next in the chain is tried.
quality/fastFast & CheapPrioritizes speed and cost. Best for prototyping and high-volume use.
quality/balancedBalancedBalanced quality, cost, and speed for production use.
quality/highHigh QualityPremium quality for hero images and marketing assets.
text/fastFast TextQuick text generation for prototyping.
text/balancedBalanced TextGood text accuracy with reasonable speed.
text/highHigh TextBest readable text in images.
realistic/fastFast PhotorealismQuick photorealistic generation.
realistic/balancedBalanced PhotorealismGood photorealism with reasonable speed.
realistic/highMaximum PhotorealismMaximum photorealism for portraits and realistic scenes.
Example
<img src="https://demo.imagegpt.host/image?prompt=A%20sunset&route=quality/high" alt="Sunset" />Model Aliases
Request a specific model by its canonical name. The system automatically tries multiple providers for reliability and performance.
Gemini
gemini-3-proPremiumGoogle Gemini 3 Pro — flagship multimodal image generation.
nano-banana-2High QualityGemini 3.1 Flash — fast, high-quality generation and editing with pro-level quality.
gemini-2.5-flashBalancedGoogle Gemini 2.5 Flash — fast multimodal image generation.
Flux 2
flux-2-devBalancedFlux 2 Dev — high quality image generation.
flux-2-proPremiumFlux 2 Pro — premium quality image generation.
flux-2-dev-turboFastFlux 2 Dev Turbo — fast variant of Flux 2.
flux-2-klein-4bUltra-FastFlux 2 Klein 4B — ultra-fast 4 billion parameter model.
flux-2-klein-4b-distilledUltra-FastFlux 2 Klein 4B Distilled — fastest Klein variant.
flux-2-klein-9bFastFlux 2 Klein 9B — higher quality 9 billion parameter model.
Flux 1
flux-1-schnellUltra-FastFlux 1 Schnell — fastest Flux model.
flux-1.1-pro-ultraPremiumFlux 1.1 Pro Ultra — premium 4MP raw mode.
Other Models
recraft-v3High QualityRecraft V3 — versatile style-based generation.
ideogram-v3Best TextIdeogram V3 — industry-leading text rendering.
qwen-image-2512High QualityQwen Image 2512 — excellent realism and multilingual text.
seedream-4.5High QualitySeedream 4.5 — high quality with strong typography.
glm-imageHigh QualityGLM Image — excellent text rendering and realism.
grok-imagineBalancedGrok Imagine — highly aesthetic photorealistic images.
imagineart-1.5BalancedImagineArt 1.5 — lifelike realism and text rendering.
imagineart-1.5-proPremiumImagineArt 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.
Aspect Ratios
Control the shape and size of generated images.
1:1Square (1024x1024)
16:9Landscape (1344x768)
9:16Portrait (768x1344)
4:3Standard (1152x896)
3:4Tall (896x1152)
3:2Photo (1216x832)
Response Format
All requests return an image with HTTP response headers conveying information about that request.
Response Headers
| Header | Description |
|---|---|
| Content-Type | image/webp, image/jpeg, or image/png |
| X-Generation-Time-Ms | Generation duration in milliseconds |
| X-Request-Id | Unique request identifier for debugging |
| IGPT-Credits | Credits 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.
Errors
When an error occurs, the response still returns an image (a placeholder) with error details in headers.
Error Headers
| Header | Description |
|---|---|
| X-Error-Code | Error code identifying the issue |
| X-Error-Message | Human-readable error description |
| X-Request-Id | Request identifier for debugging |
Error Codes
| Code | Meaning |
|---|---|
| VALIDATION_ERROR | Invalid or missing parameters |
| PROJECT_NOT_FOUND | Invalid project slug in subdomain |
| UNKNOWN_ROUTE | Specified route does not exist |
| LIMIT | Rate limit exceeded |
| TRIAL_CREDITS_EXHAUSTED | Trial credits used up |
| CREDIT_LIMIT_REACHED | Monthly credit limit reached |
| GENERATION_FAILED | All 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:
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"
/>