Lorem Picsum API
Free placeholder images at any size from a simple URL — no key.
What it does
Lorem Picsum (picsum.photos) is a placeholder-image service backed by a curated set of real photos. Ask for any width and height and it returns a random photo at that size, with options for a specific image, a stable seed, grayscale and blur.
Base URL
Authentication
None. /{width}/{height} (random), /id/{id}/{w}/{h} (specific), /seed/{seed}/{w}/{h} (deterministic), plus ?grayscale and ?blur=1..10. /v2/list returns image metadata as JSON.
Code examples
<img src="https://picsum.photos/400/300" alt="placeholder"> <img src="https://picsum.photos/seed/larzos/400/300?grayscale">
curl -s "https://picsum.photos/v2/list?page=1&limit=3" curl -sI "https://picsum.photos/200" # 302 to the actual image file
Rate limits & quotas
No key or documented hard rate limit. Requests 302-redirect to the real image file — follow redirects. Use /seed/{seed}/ so the same placeholder appears on every load (important for stable screenshots and layout tests).
Key response fields
| (image) | The photo bytes (after the redirect) |
| (/v2/list) [].id / author / width / height | Image metadata |
| (/v2/list) [].download_url | Direct link to the full-resolution file |
| Picsum-ID header | Which image you were served (on the image response) |
Common errors
| 404 | Unknown /id/{id} — valid ids come from /v2/list. |
| (random every load) | Use /seed/ or /id/ for a stable image. |
| (redirect not followed) | Your HTTP client must follow the 302 to get the file. |
When to use it (and alternatives)
The default for placeholder photos in mockups, design systems and layout tests. For placeholder avatars use DiceBear or UI Avatars; for food photos, Foodish.
FAQ
How do I get the same image every time?
Use /seed/{anything}/{w}/{h} — the same seed always maps to the same photo — or pin a specific /id/{id}/.
Can I get a blurred hero background?
Yes — ?blur=5 (1–10). Combine with ?grayscale for a muted backdrop.
Are the photos licensed for commercial mockups?
They are sourced from Unsplash and intended as placeholders. Swap in real, licensed imagery before shipping anything public.
New to APIs?
Short guides for working with this API — and any other.