接口地址:
PC端(横屏)https://api.xiaofa520.cn/PCimg-API/
移动端(竖屏)https://api.xiaofa520.cn/Mimg-API/
返回格式: 图片
请求方式: GET
GET https://api.xiaofa520.cn/PCimg-API/
GET https://api.xiaofa520.cn/Mimg-API/
当前API没有需要额外提供的请求参数,只需要发送一个GET请求即可获取随机图片。
名称 | 类型 | 说明 |
---|---|---|
Content-Type | string | 图片的MIME类型,例如image/jpeg |
format | string | 可选,设置为json 获取元数据 |
图片数据 | binary | 返回的图片文件内容 |
{
"status": "success",
"data": {
"filename": "80942286_p0.png",
"url": "https://api.xiaofa520.cn/PCimg-API/PCAPI-Image/80942286_p0.png",
"size": 1500547,
"mime_type": "image/png",
"dimensions": {
"0": 2000,
"1": 1125,
"2": 3,
"3": "width=\"2000\" height=\"1125\"",
"bits": 8,
"mime": "image/png"
},
"timestamp": 1741347103,
"count": 10
},
"error": null,
"timestamp": 1741347103
}
{
"status": "error",
"data": null,
"error": {
"error": "请求频率超标",
"unlock_time": "2023-08-20 15:30:00"
},
"timestamp": 1692532800
}
当前手机API的总调用次数为:加载中...
当前PC API的总调用次数为:加载中...
错误码 | 说明 |
---|---|
200 | 请求成功,返回图片 |
404 | 访问过于频繁,被封禁 |
500 | 服务器内部错误 |