Lorem Picsum API

Beginner's Pick Photography / No Auth Required Beginner HTTPS
Free to Use
76 B
Measured Score 0 50 100 Speed 13/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

Lorem Picsum provides free, beautiful placeholder images sourced from Unsplash with a simple URL-based API that requires no authentication. You can get random or specific photos in any size by specifying dimensions in the URL. It is perfect for quickly filling designs and prototypes with realistic-looking photos.

Beginner Tip

Use the URL pattern https://picsum.photos/{width}/{height} to get a random photo at the exact size you need with no API key or sign-up required. Add ?grayscale or ?blur=2 as query parameters to apply simple effects instantly.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://picsum.photos/v2/list
Result
HTTP 200 · application/json · 5,063 bytes · compressed
Response time
295 ms (median of 3) · fastest 289 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
id string 0
author string Alejandro Escamilla
width integer 5000
height integer 3333
url string (url) https://unsplash.com/photos/yC-Yzbqy7PY
download_url string (url) https://picsum.photos/id/0/5000/3333

Captured Response

Captured from a real request to https://picsum.photos/v2/list on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
[
  {
    "id": "0",
    "author": "Alejandro Escamilla",
    "width": 5000,
    "height": 3333,
    "url": "https://unsplash.com/photos/yC-Yzbqy7PY",
    "download_url": "https://picsum.photos/id/0/5000/3333"
  }
]

Field Reference

id Unique identifier of the photo, usable in https://picsum.photos/id/{id}/{width}/{height} for a consistent image.
author Name of the photographer who took the photo on Unsplash.
width Original width of the photo in pixels before any resizing.
height Original height of the photo in pixels before any resizing.
url Link to the original Unsplash photo page for attribution.
download_url Direct URL to a full-resolution version of the photo.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://picsum.photos/400/300";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/plain
page not found

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

Image not loading in browser Requesting the same URL repeatedly may redirect to a cached image, or a firewall blocks external image domains.
Add a cache-busting parameter like ?random=1 or use the /seed/{seed}/{width}/{height} pattern to get a consistent specific image.
404 Not Found for specific photo ID The requested photo ID does not exist in the Picsum collection.
Check available photo IDs via https://picsum.photos/v2/list and use an ID from that list.
CORS error in browser fetch Fetching the image URL via JavaScript fetch() may trigger CORS if you are trying to read pixel data from a cross-origin image.
Use the image URL directly in an img src attribute instead of fetching it via JavaScript for simple display use cases.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 13/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 295ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Photography
Difficulty Beginner
Endpoint last called: 2026-08-10

Similar APIs

View All →