娱乐

随机图片(ACG)

随机返回一张 ACG 图片地址(JSON / 302 / 200 三种模式)

GET

random-image

公开接口 累计 370 次
/api/v1/demo/random-image

说明

默认返回 JSON(含 total/index);redirect=302 直接 302 到图片;redirect=200 返回 HTTP 200,正文为纯文本图片地址。

参数

1 个
参数类型必填默认值说明
redirect integer 可选 0 0=JSON;302=跳转到图片;200=纯文本图片地址

响应示例

{
    "ok": true,
    "data": {
        "result": {
            "url": "https://...",
            "total": 93,
            "index": 42
        }
    }
}

命令行调用

curl -X GET '/api/v1/demo/random-image?redirect=0'