curl -L "/api.php?act=rand"
图片经接口 302 跳转输出,源地址不在页面中暴露。
接口文档
全部接口均为 GET,返回 JSON 或 302 跳转。默认每分钟 120 次。
GET
/api.php?act=rand
随机一张
| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
count | int | 1 | 返回数量,1–50。大于 1 时默认以 JSON 输出。 |
format | string | redirect | redirect 跳转、json 结构化、text 每行一条。 |
tag | string | 空 | 按标签筛选,留空为全部。 |
key | string | 空 | 后台开启鉴权后必填。 |
cdn | 0/1 | 跟随后台 | 是否拼接 CDN 加速域名。 |
proxy | 0/1 | 0 | 由服务器中转输出图片,完全隐藏源地址(需后台开启)。 |
curl "/api.php?act=rand&format=json"
curl "/api.php?act=rand&count=10"
curl "/api.php?act=rand&count=5&tag=sakura&key=YOUR_KEY"
返回结构
{"code":0,"msg":"ok","count":10,"data":[{"id":1,"url":"https://…","tag":"sakura","title":"…"}]}
在线示例
点击按钮直接调用当前站点接口。
等待调用…
接口状态运行中
图片总量0 张
限流策略120 次 / 分钟
鉴权公开调用