Generate SVG placeholder images with custom dimensions, background colors, and text labels — all with a single GET request.
| Param | Required | Description |
|---|---|---|
w | Optional | Width in pixels (default 300) |
h | Optional | Height in pixels (default 200) |
bg | Optional | Background color hex (default cccccc) |
color | Optional | Text color hex (default 333333) |
text | Optional | Label text (default "WxH") |
curl "https://api-snap.com/api/placeholder?w=600&h=400&bg=4f46e5&color=fff&text=Hero+Image" \
-H "Authorization: Bearer snp_your_key" -o placeholder.svg// Use directly in an img tag (server-side rendering)
const url = "https://api-snap.com/api/placeholder?w=300&h=200&text=Loading...";
// Or fetch the SVG content
const res = await fetch(
"https://api-snap.com/api/placeholder?w=800&h=600&bg=1e293b&color=94a3b8",
{ headers: { Authorization: "Bearer snp_your_key" } }
);
const svg = await res.text();import requests
r = requests.get(
"https://api-snap.com/api/placeholder",
params={"w": 400, "h": 300, "bg": "f59e0b", "text": "Thumbnail"},
headers={"Authorization": "Bearer snp_your_key"},
)
with open("placeholder.svg", "w") as f:
f.write(r.text)Fill image slots in wireframes and mockups with correctly-sized placeholders
Show placeholder images while real content is loading
Use placeholder images during email template development
Illustrate image dimensions and layouts in design documentation
Custom size, color, and text. One GET request.
Get Your Free API Key