Skip to main content

URL structure

Generate images by constructing URLs with the following structure:
Example:

Engine name

Specifies which AI model and resolution to use. See Supported engines for available options.

Blueprint

Predefined prompt templates that add consistent styling. Use default for no additional styling, or create custom blueprints to apply specific visual styles.

Seed

A numeric value that ensures consistent results. The same seed with the same prompt always generates the same image. Example: 12345, 7890, 1

Prompt

The text description of what you want to generate. Hyphens are automatically converted to spaces, and file extensions (.jpg, .jpeg, .png) are removed. Example:
This creates cleaner, SEO-friendly URLs that are easier to share.

Supported engines

DALL-E 2

Created by OpenAI, DALL-E 2 excels at creative and abstract interpretations with descriptive inputs. Best for:
  • Concept art and illustrations
  • Pixel art and retro graphics
  • Abstract prompts and creative compositions
  • 3D renders and stylized artwork
Not ideal for:
  • Photo-realistic images
Example:

Stable Diffusion

Open-source model that uses keyword-focused prompting and excels at photo-realistic generation. Best for:
  • Photo-realistic images
  • Landscape and architectural photography
  • Traditional and digital art
  • Portrait and scene generation
Not ideal for:
  • Pixel art
  • Highly abstract concept art
  • Faces and hands (especially v2.1)
Example:
Stable Diffusion v2.1 is trained on an open-source dataset and may produce different results compared to v1.5, particularly for faces and hands. However, it excels at landscapes and architectural scenes.

Blueprints

Blueprints allow you to apply consistent styling across generated images by prepending or appending phrases to prompts. This simplifies URLs and maintains visual consistency across your application.

Creating a blueprint

Configure blueprints in Optimizer > Settings > Bunny AI:
  1. Name: The identifier used in the URL (e.g., avatar)
  2. Prefix: Text added before the prompt
  3. Suffix: Text added after the prompt
Example configuration:

Using blueprints

With the above blueprint, this URL:
Generates the prompt:
This creates a powerful system for generating unique user avatars, maintaining brand consistency, or applying complex styling across your site.
When generating pixel art, use DALL-E 2 engines for optimal results.

Advanced parameters

Configure additional generation parameters through blueprint settings. Some parameters are engine-specific:

Negative prompts

Stable Diffusion supports negative prompts to exclude unwanted elements from generated images. Bunny AI uses a default set optimized for quality:
These defaults are crucial for producing good results with Stable Diffusion v2.1. If you override them with a custom blueprint, test thoroughly to ensure quality output.
Override defaults by setting the NegativePrompt parameter in your blueprint configuration.

Prompt best practices

General guidelines

Effective prompts typically include:
  • Descriptive nouns: Subject matter (e.g., “bunny”, “robot”, “landscape”)
  • Style descriptors: Visual style (e.g., “digital art”, “oil painting”, “photorealistic”)
  • Colors and mood: Atmosphere and palette (e.g., “vibrant colors”, “moody lighting”)
  • Quality modifiers: Fidelity hints (e.g., “4k”, “high quality”, “detailed”)

Style suggestions

Try these style keywords for different visual effects:
  • digital art
  • oil painting of
  • traditional art
  • abstract art of
  • watercolor painting

Model-specific tips

For DALL-E 2: Use full descriptive sentences with creative, abstract concepts:
For Stable Diffusion: Use keyword-focused prompts for photo-realistic results:

Combining with Dynamic Images API

AI-generated images support all Dynamic Images transformations. Apply resizing, cropping, filters, and format conversions to AI-generated images:
This allows you to generate base images with AI and apply responsive sizing or branding overlays dynamically.

Security and token authentication

All AI generation paths are automatically protected with Token Authentication to prevent:
  • Unauthorized image generation
  • Abuse and excessive costs
  • Resource exhaustion attacks
The bunny.net dashboard automatically generates tokens for preview and testing. For dynamic URL generation in your application, implement token generation according to the Token Authentication documentation.

Performance and caching

First request:
  1. Bunny AI processes the generation using the specified engine
  2. The result is cached at the edge for 3 months
  3. Response time varies by engine and complexity (typically 5-30 seconds)
Subsequent requests:
  • Served instantly from the nearest edge location
  • Same performance as standard CDN-cached images
  • Cache purging works the same as regular images
Pre-generate common images during deployment or user onboarding to ensure instant delivery when users access them.