Generate placeholder images with a simple URL structure. No authentication required, just construct your URL and get instant results.
Customizable
Choose dimensions, background and foreground colors, text, font size, and text wrapping options to create the perfect placeholder for your needs.
High Performance
Optimized for speed with caching headers and efficient image generation. Perfect for development and production environments.
Interactive Image Generator
Create custom placeholder images with our interactive generator. Adjust parameters and see results in real-time.
50%80%95%
Your generated image will appear here
Configure your image and click "Generate Image" to see the URL
API Documentation
Overview
ImageZT provides a simple RESTful API for generating placeholder images on-demand. All images are generated dynamically based on URL parameters and returned as image files with appropriate caching headers.
The service supports both standalone deployment and serverless functions (Netlify), with consistent API behavior across platforms.
dims: Image dimensions in format WxH (e.g., 800x600) Requirements: Width and height must be positive integers between 1 and 5000 pixels
bgColor: Background color as 6-digit hex (without #) Example: ffffff for white, 000000 for black
fgColor: Foreground/text color as 6-digit hex (without #) Example: 000000 for black, ff0000 for red
Query Parameters
text: Custom text to display on the image Default: The dimensions string (e.g., "800x600") Note: Text is URL-encoded, so spaces become %20 or +
fontSize: Font size in pixels Range: 8-128 pixels Default: Auto-sized based on image dimensions Available sizes: 8, 16, 32, 64, 128 (nearest size is selected)
textWrap: Enable text wrapping Values: true or false Default: false Note: When enabled, long text will wrap to multiple lines
textWrapWidth: Text wrap width percentage Range: 50-95 Default: 80 Note: Controls the maximum width of wrapped text as a percentage of image width
Response
Content-Type: image/png (default), image/jpeg, or image/bmp based on configuration
Note: In standalone deployment, additional fields like uptime are included
Error Responses
The API returns standard HTTP status codes with descriptive error messages:
400 Bad Request: Invalid parameters Examples: Invalid dimensions, colors, font size, or text wrap width
500 Internal Server Error: Image generation failed Note: Detailed error messages are available in verbose mode
Example Error Response
HTTP/1.1 400 Bad Request
Content-Type: text/plain
Invalid dimensions format. Use WxH with positive numbers, e.g., 800x600
Performance Features
Caching: In-memory caching of generated images and fonts Cache Size: 100 items (configurable) Cache Key: Based on all parameters including text and formatting options
HTTP Caching: Optimized cache headers for browser and CDN caching Cache-Control: public, max-age=31536000, immutable ETag: Automatic ETag generation for conditional requests
Rate Limiting: Configurable rate limiting to prevent abuse Default: 100 requests per 15 minutes per IP
Image Optimization: Configurable output formats and quality settings Formats: PNG, JPEG, BMP JPEG Quality: 90% (configurable) PNG Compression: Balanced for speed and size
Try It Yourself
Click on any example below to see different placeholder images: