Screenshot API

Compose a styled screenshot (background, padding, rounded corners, shadow, blur, and image filters) via a single POST request. No API key required.

Endpoint

POST https://freeplaceholder.com/api/screenshot
Content-Type: multipart/form-data

Form fields

FieldTypeDefaultDescription
imagefile_required_Screenshot to frame (PNG, JPEG, WebP, GIF). Max 10 MB.
bgstring#f0f0f0Solid hex (#rgb, #rrggbb) or CSS linear-gradient(...) when not using bg_image.
bg_imagefileOptional background image (max 5 MB). Overrides solid/gradient bg.
widthnumber1200Output width in px (64–4096).
heightnumberproportionalOutput height in px (64–4096). If omitted, defaults to 3/4 of width.
paddingnumber80Padding from canvas edge to the screenshot frame (px).
scalenumber0.8Screenshot size as a fraction of the padded inner area (0.05–1).
radiusnumber12Corner radius on the screenshot (px).
object_fitstringcontainHow the screenshot fills its frame: contain (letterbox), cover (crop), fill or stretch (distort to fill). Alias field: screenshot_fit.
shadowstringmdnone, sm, md, lg, xl.
shadow_directionstringallall (soft omnidirectional) or bottom (drop shadow).
blurnumber0Extra blur on **background image** only (0–100).
formatstringpngpng, jpeg, webp.
screenshot_filterstringnonePreset or custom CSS-style filter string for the screenshot layer.
bg_filterstringnonePreset or custom filter string for the background layer.

Filter presets

Both screenshot_filter and bg_filter accept the same preset names (case-insensitive):

PresetEffect
noneNo filter
grayscaleFull desaturation
sepiaSepia tone
invertInvert colors
blurLight Gaussian blur
brightness~+30% brightness
contrast~+30% contrast
saturate~+50% saturation
hue-rotate180° hue rotation
vintageSepia + stronger contrast
matteDesaturated, softer contrast
vividHigher saturation and contrast

You can also pass a small CSS filter subset, e.g. brightness(1.2) contrast(0.9) saturate(1.1).

Examples

cURL

bash
curl -sS -X POST "https://freeplaceholder.com/api/screenshot" \
  -F "image=@./screenshot.png" \
  -F "bg=linear-gradient(135deg, #f97316, #a855f7)" \
  -F "width=1200" \
  -F "height=800" \
  -F "padding=72" \
  -F "scale=0.85" \
  -F "radius=16" \
  -F "shadow=lg" \
  -F "shadow_direction=bottom" \
  -F "screenshot_filter=none" \
  -F "bg_filter=grayscale" \
  -F "format=png" \
  --output framed.png

JavaScript (fetch)

javascript
const form = new FormData();
form.append("image", fileInput.files[0]);
form.append("bg", "linear-gradient(120deg, #0ea5e9, #6366f1)");
form.append("width", "1600");
form.append("height", "900");
form.append("padding", "96");
form.append("scale", "0.82");
form.append("radius", "20");
form.append("shadow", "md");
form.append("shadow_direction", "all");
form.append("screenshot_filter", "vivid");
form.append("bg_filter", "matte");
form.append("format", "webp");

const res = await fetch("https://freeplaceholder.com/api/screenshot", {
  method: "POST",
  body: form,
});
const blob = await res.blob();

Python

python
import requests

url = "https://freeplaceholder.com/api/screenshot"
files = {"image": open("screenshot.png", "rb")}
data = {
    "bg": "#111827",
    "width": "1200",
    "height": "630",
    "padding": "64",
    "scale": "0.88",
    "radius": "12",
    "shadow": "xl",
    "shadow_direction": "bottom",
    "format": "jpeg",
    "screenshot_filter": "none",
    "bg_filter": "none",
}
r = requests.post(url, files=files, data=data)
r.raise_for_status()
open("out.jpg", "wb").write(r.content)

Responses

CodeMeaning
200Image body (image/png, image/jpeg, or image/webp)
400Missing/invalid fields or unsupported image type
413File larger than the limit
405GET is not supported (use POST)
500Rendering error

Responses are not cached (Cache-Control: no-store).

Try it in the browser

Use the visual editor at /screenshots to tweak settings and download the same output the API produces.