Live URLs

Generate images directly from URL parameters. No API calls needed — just use the URL in your HTML.

The Concept

Put your prompt in a URL. Use it directly in an <img src="..."> tag.

First request generates the image. All subsequent requests serve it from cache instantly.

URL Format

Live URL Format
https://cdn.banatie.app/{org}/{project}/live/{scope}?prompt=...&aspectRatio=...

Query parameters:

Parameter
Required
Description
promptYesText description of the image to generate
aspectRatioNoImage ratio: 1:1, 16:9, 9:16, 3:2 (default: 16:9)
templateNoEnhancement template to use
autoEnhanceNoEnable prompt enhancement (default: true)

Try It

Open this URL in your browser:

Example Live URL
https://cdn.banatie.app/my-org/my-project/live/demo?prompt=a+friendly+robot+waving+hello&aspectRatio=16:9

Or use it directly in HTML:

HTML Usage
<img
  src="https://cdn.banatie.app/my-org/my-project/live/hero?prompt=mountain+landscape+at+sunset&aspectRatio=16:9"
  alt="Mountain landscape"
/>

Caching Behavior

The response includes an X-Cache-Status header:

Status
Meaning
Response Time
HITImage served from cacheInstant (milliseconds)
MISSNew image generatedA few seconds

Cache hits are unlimited and don't count toward rate limits. Only new generations (cache MISS) are rate limited.

Scopes

Scopes organize your live generations. Each scope has its own generation limit.

Scope Examples
# Different scopes for different purposes
https://cdn.banatie.app/my-org/my-project/live/hero-section?prompt=...
https://cdn.banatie.app/my-org/my-project/live/product-gallery?prompt=...
https://cdn.banatie.app/my-org/my-project/live/blog-images?prompt=...

Scopes are auto-created on first use. You can also pre-configure them via the API to set custom limits.

Use Cases

  • Static HTML & serverless sites

    Deploy HTML pages without configuring asset hosting or CDN infrastructure. Images are served directly from Banatie's edge network.

  • AI-assisted development

    Enable AI coding assistants to generate complete HTML or JSX with contextual images in a single pass—no asset pipeline required.

  • Rapid prototyping

    Test different visuals without writing backend code.

  • AI placeholder images

    Replace gray boxes and random stock photos with contextual AI images. Perfect for prototypes, client demos, and design mockups.

  • Personalized content

    Generate unique images based on user data or preferences for dynamic, individualized experiences.

Pro Tip
Use Live URLs as intelligent placeholder images during development. Generate contextual visuals that match your design intent—no more gray boxes or random stock photos.

Common placeholder configurations:

Placeholder Examples
<!-- Avatar placeholder (200×200) -->
<img src="https://cdn.banatie.app/.../live/avatars?prompt=professional+headshot&aspectRatio=1:1" />

<!-- Thumbnail placeholder (300×200) -->
<img src="https://cdn.banatie.app/.../live/thumbs?prompt=product+photo&aspectRatio=3:2" />

<!-- Hero placeholder (1200×630) -->
<img src="https://cdn.banatie.app/.../live/hero?prompt=modern+office+interior&aspectRatio=1200:630" />

<!-- Card image placeholder (400×300) -->
<img src="https://cdn.banatie.app/.../live/cards?prompt=abstract+gradient+background&aspectRatio=4:3" />
For dark mode interfaces, include "dark theme" or "dark background" in your prompt.

Next Steps