Lorem Picsum API

Beginner's Pick Photography / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

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.

Available Data

image URLs in multiple sizes
photographer credit
image dimensions
download link
color data
Use case: Integrate images from unsplash data into web and mobile applications

Example Response

JSON Response
{
  "id": "Dwu85P9SOIk",
  "urls": {
    "full": "https://images.unsplash.com/photo-...",
    "regular": "https://images.unsplash.com/photo-...?w=1080",
    "thumb": "https://images.unsplash.com/photo-...?w=200"
  },
  "width": 4000,
  "height": 3000,
  "user": {
    "name": "John Doe",
    "username": "johndoe"
  }
}

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

Request
const url = "https://picsum.photos/";
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.

Common Errors & Troubleshooting

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.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Photography
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →