freeapis

Lorem Picsum

来自 Unsplash 的图片

认证方式
No auth
HTTPS
Yes
CORS
Unknown
分类
摄影
数据来源
public-apis + marcelscruz

简介

Lorem Picsum 从 Unsplash 提供随机占位照片——一个 URL 返回任意尺寸的真实图片,外加小型 JSON 信息 API。免密钥且免费(实测可用),是占位图、背景图和 UI 线框的标准“随机图片”服务。

快速开始

指定尺寸的随机图片:

curl "https://picsum.photos/400/300" -o image.jpg

按 ID 获取特定图片:

curl "https://picsum.photos/id/237/400/300" -o dog.jpg

图片元数据(实测可用):

curl "https://picsum.photos/id/237/info"
{
  "id": "237",
  "author": "André Spieker",
  "width": 3500,
  "height": 2095,
  "url": "https://unsplash.com/photos/8wTPqxlnKM4",
  "download_url": "https://picsum.photos/id/237/3500/2095"
}

图片列表(分页):

curl "https://picsum.photos/v2/list?page=1&limit=5"

灰度 / 模糊:

curl "https://picsum.photos/400/300?grayscale"
curl "https://picsum.photos/400/300?blur=2"

认证方式

无需认证——免密钥。

速率限制与注意事项

  • 免费;没有文档化的硬性限制——请礼貌使用。
  • URL 模式:/400(方形)、/400/300(尺寸)、/id/{id}/400/300(特定照片)、?grayscale、?blur=N。
  • 图片重定向到 Unsplash 的 CDN(快速、支持热链)。
  • /v2/list 端点列出照片 ID/作者(分页);/id/{id}/info 给单张图片的元数据。

常见问题

Lorem Picsum 免费吗? 是的——免费且免密钥。

如何获取特定图片? /id/{id}/{宽}/{高}——浏览 /v2/list 找 ID。

可以用于生产线框吗? 可以——它就是为占位图和热链设计的。

摄影 分类更多

APIAuthHTTPSCORS
APITemplate.io

Dynamically generate images and PDFs from templates with a simple API

API KeyYesUnknown↗
Bruzu

Image generation with query string

API KeyYesYes↗
Change Image Background API

This API helps you change the background of any image

API KeyYesUnknown↗
CheetahO

Photo optimization and resize

API KeyYesUnknown↗
Convert Images to PDF API

Convert any image to a PDF without losing quality with one API call

API KeyYesUnknown↗