import type { Metadata } from 'next'; import { TipBox } from '@/components/docs/shared/TipBox'; import { Table } from '@/components/docs/shared/Table'; import { CodeBlock } from '@/components/docs/shared/CodeBlock'; import { DocPage } from '@/components/docs/layout/DocPage'; import { JsonLd } from '@/components/seo/JsonLd'; import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo'; import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema'; import { Hero, SectionHeader, InlineCode } from '@/components/docs/blocks'; const PAGE = DOCS_PAGES['live-urls']; export const metadata: Metadata = createDocsMetadata(PAGE); const breadcrumbSchema = createBreadcrumbSchema([ { name: 'Home', path: '/' }, { name: 'Documentation', path: '/docs/' }, { name: 'Live URLs', path: '/docs/live-urls/' }, ]); const articleSchema = createTechArticleSchema(PAGE); const tocItems = [ { id: 'the-concept', text: 'The Concept', level: 2 }, { id: 'url-format', text: 'URL Format', level: 2 }, { id: 'try-it', text: 'Try It', level: 2 }, { id: 'placeholder-images', text: 'Placeholder Images', level: 2 }, { id: 'caching-behavior', text: 'Caching Behavior', level: 2 }, { id: 'scopes', text: 'Scopes', level: 2 }, { id: 'rate-limits', text: 'Rate Limits', level: 2 }, { id: 'use-cases', text: 'Use Cases', level: 2 }, { id: 'next-steps', text: 'Next Steps', level: 2 }, ]; export default function LiveUrlsPage() { return ( <>
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

Query parameters:

prompt, Yes , 'Text description of the image to generate', ], [ aspectRatio, No , 'Image ratio: 1:1, 16:9, 9:16, 3:2 (default: 16:9)', ], [ template, No , 'Enhancement template to use', ], [ autoEnhance, No , 'Enable prompt enhancement (default: true)', ], ]} />
Try It

Open this URL in your browser:

Or use it directly in HTML:

`} language="html" filename="HTML Usage" />
Caching Behavior

The response includes an X-Cache-Status header:

HIT , 'Image served from cache', 'Instant (milliseconds)', ], [MISS, 'New image generated', 'A 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.

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

{/*
Rate Limits
10 new generations/hour , 'Only applies to cache MISS', ], [ 'Per Scope', 30 generations , 'Configurable via API', ], [ 'Cache Hits', Unlimited , 'No limits on cached images', ], ]} />
Rate limits protect the service from abuse. For high-volume needs, use the generations API directly.
*/}
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.

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:

`} language="html" filename="Placeholder Examples" />
For dark mode interfaces, include "dark theme" or "dark background" in your prompt.
); }