Random Pic API

Random Image Service

Random Image →

📡 API Endpoints

  • /api/randomRandom image
  • /api/random?format=jsonJSON response
  • /api/random?category=xxxBy category
  • /api/pic/pathImage proxy
  • /api/categoriesList categories

💡 Usage Examples

# HTML - Random Image
<img src="/api/random" />

# HTML - JSON Response
fetch('/api/random?format=json')
  .then(r => r.json())
  .then(data => console.log(data.data.url))

# Direct Image URL
<img src="/api/pic/meitu/landscape/xxx.jpg" />

# By Category
<img src="/api/random?category=landscape" />

🎯 Features

  • ✅ Category Management
  • ✅ Referer Hotlink Protection
  • ✅ Format Negotiation (AVIF/WebP/JPG)
  • ✅ Hidden Storage Domain