API文档

基本信息

API 基础URL

https://api.zhihuiyun.work/image/api/image.php

请求方式

GET

返回格式

JSON 或 直接重定向到图片,取决于 type 参数

调用频率限制

普通用户:每分钟60次请求

高级用户:每分钟300次请求

特殊用户:无限制

参数名类型是否必须默认值说明示例
categorystringanime图片分类,可选值:anime(动漫)、scenery(风景)、game(游戏)、girl(美女)等anime
typestringjson返回类型,可选值:json(返回JSON数据)、redirect(直接重定向到图片)、random(随机返回类型)redirect
sizestringregular图片尺寸,可选值:small(小图)、regular(普通)、large(大图)、original(原图)large
r18number0是否返回成人内容,可选值:0(否)、1(是)、2(混合)0
proxynumber0是否通过代理获取图片,可选值:0(否)、1(是)0
formatstringall图片格式,可选值:jpg、png、gif、all(全部)jpg

API示例链接

获取随机动漫图片 (JSON)

https://api.zhihuiyun.work/image/api/image.php?category=anime&type=json

获取随机动漫图片 (直接显示)

https://api.zhihuiyun.work/image/api/image.php?category=anime&type=redirect

获取高清风景图片

https://api.zhihuiyun.work/image/api/image.php?category=scenery&type=redirect&size=large

获取JPG格式游戏图片

https://api.zhihuiyun.work/image/api/image.php?category=game&format=jpg&type=redirect

注意事项

  • 请合理调用API,避免频繁请求导致IP被封禁
  • 图片内容来自互联网,如有侵权请联系我们删除
  • 建议在使用时添加错误处理,以防API服务不可用时影响您的应用
  • 如需商业使用或更高调用频率,请联系我们获取授权
  • API服务可能会不定期更新,请关注文档变化