Placeholder Image API

Get placeholder images of any size for mockups and tests: /v1/placeholder/600x400.png. SVG with custom text and colours, or a solid-colour PNG.

GEThttps://apibox.io.vn/v1/placeholder
Images & Codes▶ Try it online

The Placeholder Image API returns dummy images of exactly the size you need for wireframes, UI prototypes, seed data and automated tests. Put the size in the path – /v1/placeholder/600x400, /v1/placeholder/600x400.png or just /v1/placeholder/300 for a square – or use the width and height query parameters (default 600×400).

The default SVG output shows a centred label (the dimensions, or your own text up to 60 characters) on a neutral grey background; background (or bg) and color accept hex colours. SVG files are tiny and scale perfectly. With .png or format=png you get a solid-colour PNG of the requested size, without text, which is handy when a real raster file is required (upload tests, image pipelines).

Width and height go from 1 to 4000 pixels; PNG placeholders are limited to 4 megapixels. Responses are cacheable for 7 days.

Parameters

NameInTypeRequiredDefault
sizepathstringnoOptional path segment WIDTHxHEIGHT[.png|.svg], e.g. /v1/placeholder/600x400.png; a single number gives a square.
widthquerynumberno600Width in pixels (1–4000), when not given in the path.
heightquerynumberno400Height in pixels (1–4000).
formatquerystringnosvgsvg or png (PNG is a solid colour, max 4 megapixels).
textquerystringnoWIDTH×HEIGHTLabel shown in the SVG (max 60 characters).
backgroundquerystringnodde1e7Background colour, hex (alias bg).
colorquerystringno5a6270Text colour, hex.

Example

curl "https://apibox.io.vn/v1/placeholder/600x400?text=Hello" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o output

Response

binary image/svg+xml (600×400 grey placeholder with the text "Hello")

Use cases

  • Fill wireframes and UI prototypes with correctly sized images
  • Seed demo data and fixtures for e-commerce or CMS projects
  • Test image upload, resizing and CDN pipelines with real PNG files
  • Show a neutral fallback while real images are still loading

FAQ

How do I get a 1200×630 Open Graph placeholder?

Request /v1/placeholder/1200x630 for an SVG with the size written on it, or /v1/placeholder/1200x630.png for a PNG file.

Can I change the text and colours?

Yes, for SVG output: text=Hello&background=1e293b&color=ffffff. The text is limited to 60 characters and the font size adapts to the image. PNG placeholders are a solid background colour only.

What is the maximum size?

4000 pixels per side. PNG output is additionally limited to 4 megapixels (for example 2000×2000); larger PNG requests return a too_large error.

Related APIs

Start with 1,000 free requests every month. Get free API key →