AnyPlaceholder API reference
AnyPlaceholder.com lets designers and developers create custom placeholder images and text on-the-fly. You can use our browser UI or call the simple REST APIs directly from your code.
1. Using the Web UI
- Open the Image Generator or Text Generator.
- Adjust the parameters to your needs.
- Copy the generated URL or download/copy the result.
Exact-size files, SVG backgrounds and WAV audio are generated in your browser and do not have HTTP endpoints. For task-based walkthroughs, see the practical guides.
2. Using the HTTP API
Make a GET request to /placeholder with the query parameters below.
On small screens, swipe tables sideways to read every column. You can also focus a table and use the left and right arrow keys.
| Parameter | Required | Description | Example |
|---|---|---|---|
| width | No | Image width (1–3,000 px, default 150) | 300 |
| height | No | Image height (1–3,000 px, default 150) | 200 |
| bg | No | Background color (3, 6 or 8 hex digits, no #). With 8 digits, the last two specify alpha (00–ff) | 09f or 0099ff80 (semi-transparent) |
| color | No | Text color (3, 6 or 8 hex digits, no #). With 8 digits, the last two specify alpha (00–ff) | fff or ffffffcc (semi-transparent) |
| text | No | Custom text. Defaults to "{width}x{height}" | Hello |
| fontSize | No | Font size (8–1,000 px, default 20) | 24 |
| radius | No | Corner radius (px) | 8 |
| format | No | Output format: svg (default) / png / jpg / webp | png |
| retina | No | If set to 1, creates a @2x image | 1 |
Example
https://anyplaceholder.com/placeholder?width=400&height=300&bg=333&color=fff&text=Demo&format=png
PNG, JPEG and WebP images are limited to 1,000,000 pixels after retina scaling (width × height). Larger requests return 422 before rendering. SVG keeps the 3,000 px limit per side.
3. Text Placeholder API
Make a GET request to /text with the query parameters below.
| Parameter | Required | Description | Example |
|---|---|---|---|
| paragraphs | No | Number of paragraphs (1-50, default 3) | 5 |
| sentences | No | Sentences per paragraph (1-15, default 5) | 3 |
| format | No | Output format: text (default) / html / json | json |
| lang | No | Text corpus: en = Lorem Ipsum (default); ja = Japanese sample sentences | ja |
Examples
https://anyplaceholder.com/text?paragraphs=3&sentences=5
https://anyplaceholder.com/text?paragraphs=2&format=html&lang=ja
https://anyplaceholder.com/text?paragraphs=1&sentences=3&format=json
4. Avatar API
Make a GET request to /api/avatar to generate an avatar image from the text you provide.
| Parameter | Required | Description | Example |
|---|---|---|---|
| text | No | Text shown as-is, max 12 characters (default "AP") | JD |
| size | No | Image size in px (16-1000, default 128) | 128 |
| shape | No | Avatar shape: circle (default) / square | circle |
| bg | No | Background color (hex, no #). Defaults to a color auto-derived from the text | 4f46e5 |
| color | No | Text color (hex, no #, default fff) | fff |
| format | No | Output format: svg (default) / png | png |
Example
https://anyplaceholder.com/api/avatar?text=JD&size=128&shape=circle&format=png
5. Dummy Data API
Make a GET request to /api/data to generate dummy data as JSON or CSV.
| Parameter | Required | Description | Example |
|---|---|---|---|
| type | No | Dataset type: users (default) / posts / todos / products | users |
| count | No | Number of records (1-100, default 10) | 10 |
| lang | No | Language: en (default) / ja | ja |
| format | No | Output format: json (default) / csv | json |
| seed | No | Seed for deterministic output (default 1) | 1 |
Example
https://anyplaceholder.com/api/data?type=users&count=10&lang=ja&format=json
6. Chart API
Make a GET request to /api/chart to generate a bar, line, or pie chart image.
| Parameter | Required | Description | Example |
|---|---|---|---|
| type | No | Chart type: bar (default) / line / pie | bar |
| points | No | Number of data points (2-20, default 6) | 8 |
| width | No | Image width in px (100-2000, default 600) | 600 |
| height | No | Image height in px (100-2000, default 400) | 400 |
| seed | No | Seed for deterministic output (default 1) | 1 |
| title | No | Chart title (optional) | Sales |
| format | No | Output format: svg (default) / png. PNG output is capped at 1000px to stay within size limits | svg |
Example
https://anyplaceholder.com/api/chart?type=bar&points=8&title=Sales&format=svg
7. PDF API
Make a GET request to /api/pdf to generate a multi-page dummy PDF.
| Parameter | Required | Description | Example |
|---|---|---|---|
| pages | No | Number of pages (1-20, default 1) | 3 |
| title | No | Document title (default "Dummy PDF"). Up to 100 printable ASCII characters; long titles wrap | Sample |
Note: Characters outside printable ASCII, including Japanese and accented letters, are removed from title. If no characters remain, the title becomes "Dummy PDF".
Example
https://anyplaceholder.com/api/pdf?pages=3&title=Sample
8. Map API
Make a GET request to /api/map to generate an image of a fictional city. Maps are pre-rendered in 10 visual styles and resized to your requested dimensions on the fly.
| Parameter | Required | Description | Example |
|---|---|---|---|
| width | No | Image width in px (100-2000, default 600) | 800 |
| height | No | Image height in px (100-2000, default 400) | 600 |
| seed | No | Seed for deterministic output — picks one of 50 fictional cities per style (default 1) | 42 |
| scheme | No | Visual style. Omit to auto-pick from the seed. One of: Default, Apple, AppleDark, Assassin, Google, GoogleNoZoom, Paper, SubtleGrey, UltraLight, Wy | Apple |
| format | No | Output format: jpg (default) / webp / png | jpg |
This map is decorative only — every city is fictional and does not represent any real location.
Example
https://anyplaceholder.com/api/map?width=800&height=600&seed=42&scheme=Apple
Map images are pre-generated with ProbableTrain's MapGenerator. See the author’s generated asset usage guidance.
9. Notes for All Endpoints
A few things that apply to every API above:
- Seeded generators reuse the same settings to produce repeatable fixtures. Download a copy for tests that must remain unchanged across service updates.
- Responses include CORS headers (
Access-Control-Allow-Origin: *), so you can call them directly from the browser. - Generated APIs other than maps return 422 with
output_too_largewhen the serialized response, including encoding and headers, exceeds 40 KiB. Reduce dimensions, paragraphs or records, or try SVG/WebP for images. Maps have a separate 1 MiB response limit and may return JPEG when another format is too large. If compression is still insufficient, maps also return 422. Reduce the dimensions and check the response Content-Type.
10. Attribution / License
Generated images are free to use, even in commercial projects. No attribution required, but a backlink is appreciated.
11. Need Help?
Contact us on X (Twitter) @_Kit_Ok_ or visit our contact page. Support is optional and is not required to ask a question.