← 返回首页

随机图片 API

https://img-api.zyhh.qzz.io
GET /api/image 随机图片
根据设备类型自动返回适配图片,支持手动指定设备与 JSON 格式。
请求参数
参数类型说明
devicestringpc | mobile | tablet (可选)
formatstring设为 json 返回 JSON 而非 302 重定向 (可选)
调用示例
# 默认(302 重定向到图片) curl https://img-api.zyhh.qzz.io/api/image # 强制 PC + JSON curl "https://img-api.zyhh.qzz.io/api/image?device=pc&format=json" # 手机端 curl "https://img-api.zyhh.qzz.io/api/image?device=mobile&format=json"
响应示例 (format=json)
{ "success": true, "device": "pc", "image": { "filename": "wallpaper_001.jpg", "directory": "PC", "url": "https://cdn.zyhh.qzz.io/api?path=PC/wallpaper_001.jpg" }, "total_images": 42 }

    
通用信息
Base URL
https://img-api.zyhh.qzz.io
请求方式
GET
数据格式
JSON / 302 重定向
CORS
已启用
状态码
200 / 302 / 500
设备检测
User-Agent 自动识别