BYTETOOLS

Lorem Picsum API

Free placeholder image API with no key. Random or specific photos at any size, with grayscale and blur effects, straight from a URL. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the Lorem Picsum API?

Lorem Picsum is a free placeholder image API that serves real photographs at any dimensions from a simple URL. It needs no API key, and supports grayscale, blur and fixed-seed images for reproducible layouts.

Lorem Picsum replaced grey placeholder boxes with actual photography, which changed how designs read during development — real images expose contrast, cropping and text-overlay problems that flat placeholders hide entirely.

The feature that matters most in practice is the seed. A URL like `/seed/hero/800/400` always returns the same photo, so your mockups and screenshots stay stable between reloads instead of reshuffling every refresh.

Quick facts

Base URL
https://picsum.photos
Authentication
No key required.
Rate limit
No published limit; commercial use permitted.
Pricing
Free. Photos are sourced from Unsplash.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the Lorem Picsum API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. Fetch metadata for a specific image

GET https://picsum.photos/id/1/info

curl
curl 'https://picsum.photos/id/1/info'
JavaScript (fetch)
const res = await fetch("https://picsum.photos/id/1/info");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://picsum.photos/id/1/info", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "id": "1",
  "author": "Alejandro Escamilla",
  "width": 5000,
  "height": 3333,
  "url": "https://unsplash.com/photos/LNRyGwIJr5c",
  "download_url": "https://picsum.photos/id/1/5000/3333"
}

Parameters

ParameterTypeRequiredDescription
<width>/<height>pathRequiredImage dimensions in pixels. 800/400
seed/<seed>pathOptionalFixed seed so the same image is returned every time. seed/hero
id/<id>pathOptionalRequest one specific photo by id. id/1
grayscalequeryOptionalReturn the image in black and white. grayscale
blurqueryOptionalBlur level from 1 to 10. blur=2

Response fields

(binary image)image
Image endpoints return the photo itself, not JSON.
id / authorstring
On /id/{id}/info, the photo id and photographer name.
width / heightinteger
Native dimensions of the source photo.
download_urlstring
Direct URL to the full-size image.

What you can build with the Lorem Picsum API

  • Fill design mockups and prototypes with realistic photography
  • Test responsive image loading, lazy loading and aspect ratios
  • Produce stable screenshots using seeded URLs
  • Demonstrate image grids and card layouts in tutorials

Common errors and how to fix them

404

Requested photo id does not exist.

Fix: Not all ids are populated; use /v2/list to enumerate valid ids, or use a seed instead.

Different image every reload

You used a random endpoint.

Fix: Use /seed/{seed}/{w}/{h} to pin a stable image.

Lorem Picsum API — frequently asked questions

Is Lorem Picsum free for commercial use?

Yes, it is free to use including in commercial projects. The photographs come from Unsplash under its licence, and it needs no API key.

How do I get the same placeholder image every time?

Use a seeded URL such as https://picsum.photos/seed/hero/800/400. The same seed always returns the same photo, which keeps mockups and screenshots stable.

Can I get grayscale or blurred placeholders?

Yes. Append ?grayscale for black and white, or ?blur=1 through ?blur=10 for progressive blurring — useful for testing overlay text legibility.

Does Lorem Picsum return JSON?

The image endpoints return the image itself. For metadata such as photographer and dimensions, request /id/{id}/info, which returns JSON.

Tools that pair with this API

Lorem Picsum is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.