Placeholders.io

Modern AI-powered image placeholder service

Get Started API Reference
AI-generated placeholder image

Basic Usage

Just add your desired image size to our URL and get a beautiful AI-generated placeholder image:

// Basic usage with width and height https://placeholders.io/400/300
Basic placeholder

Simple, elegant placeholders that are generated on-demand using AI technology. Each image is unique and tailored to your specifications.

Add Custom Prompts

Specify what your placeholder should contain by adding a text prompt:

// Add a custom prompt https://placeholders.io/500/300/mountain landscape
Mountain landscape placeholder

Direct the AI to generate images that match your website's theme or content. The more specific your prompt, the more tailored your placeholder will be.

Styles & Consistency

Control the style of your placeholders and ensure consistency with seeds:

// Using style and seed parameters https://placeholders.io/600/400/futuristic city?style=photographic&seed=42
Futuristic city placeholder

Using a specific seed ensures you get the same image each time. The style parameter lets you choose between photographic, artistic, anime, oil-painting, and 3d-render aesthetics.

API Reference

The base URL structure for all image requests:

https://placeholders.io/{width}/{height}/{prompt}?style={style}&seed={seed}

Path Parameters

Parameter Description Requirements
widthRequired Image width in pixels Integer between 128-2048
heightRequired Image height in pixels Integer between 128-2048
promptOptional Text description of the desired image URL-encoded string

Query Parameters

Parameter Description Options
styleOptional Visual style of the generated image photographic, artistic, anime, oil-painting, 3d-render
seedOptional Integer value for consistent results Any positive integer

Examples

// Basic placeholder 300x200 pixels https://placeholders.io/300/200 // Beach sunset placeholder https://placeholders.io/300/200/beach sunset // Forest in photographic style https://placeholders.io/300/200/forest?style=photographic // Forest in artistic style https://placeholders.io/300/200/forest?style=artistic // Consistent image with seed https://placeholders.io/500/300/abstract design?seed=123456

HTML Integration

Easily integrate our placeholders into your HTML:

<!-- Basic image tag with placeholder --> <img src="https://placeholders.io/800/400/abstract design" alt="Abstract design placeholder" class="my-image">

For responsive designs with specific aspect ratios:

<!-- Responsive image with fixed aspect ratio --> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <img src="https://placeholders.io/1600/900/technology" alt="Technology placeholder" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;"> </div>