本API基于华为云对象存储,使用华为CDN云加速,全球平均下载速度达10MB/s。API中已收录1100+张二次元图片,20+张Bing壁纸(每日自动抓取),150+张二次元头像,10+张图床上传图片。

This API is based on Huawei Cloud Object Storage and uses Huawei CDN Cloud acceleration. The global average download speed is 10MB/s. The API has included 1100+ two-dimensional pictures, 20+ Bing wallpapers (automatically captured daily), 150+ two-dimensional avatars, and 10+ pictures uploaded on the bed.

本API不承诺永久维护,使用前请务必斟酌使用风险!!

1 API地址

  • https://api.yimian.xyz/img

2 快速入门

随机二次元图片

随机Bing壁纸

随机二次元头像

随机图床图片

随机1920x1080尺寸二次元图片

3 参数列表

名称 描述 格式 示例
type 图片种类 moe/wallpaper/head/imgbed type=moe
size 根据图片大小筛选 ??x??;
*x??;
*x*;
??-??x??;
??-??x??-??;
??-??x*
display=1920x1080;
display=1920x*;
display=1920-1950x230-500;
display=1920-1950x*;
range 尺寸误差范围 number range=100
id 根据图片id筛选 number id=15
path 根据路径提取图片 abs path path=wallpaper/img_··mal.jpg
display 是否以网页格式展示 true/false(default) display=true
R18 是否显示18禁图片 true/false(default) R18=true

4 参数详解

4.1 type

二次元(默认)

bing每日壁纸

二次元头像

呓喵酱图床

こいぬちゃん

EasyVer人机验证

4.2 display

如果本参数置为true,则会禁用302跳转,直接返回完整图片编码。本方法效率极低,速度很慢,请慎用。

false(默认)

true

4.3 size

使用本参数限制图片尺寸。本参数支持以下格式:

??x??

??x*

\x??*

\x**

??-??x??

??x??-??

??-??x??-??

??-??x*

\x??-??*

4.4 range

本参数规定允许的size的误差,需搭配size使用,默认为0。

对于??型size参数

对于??-??型size参数

对于*型size参数

  • GET/POST /img?size=*x*&range=100
  • 描述: range无效

4.5 id

每一个种类都有自己的id系统,同一种类下不同图片id唯一。

二次元

bing每日壁纸

二次元头像

呓喵酱图床

4.6 path

使用绝对路径直接提取图片,优先级高于type,效率最高

请前往呓喵酱の图库获取图片的path!

4.7 R18

是否显示18禁图片,默认为false。

5 报错格式

5.1 找不到指定type类型

若找不到指定的type类型,将会自动返回一个moe类型的图片。

5.2 找不到符合条件的图片

返回JSON

1
2
3
{
"err": "错误信息"
}

每台设备每天全局调用上限500次!!


CHANGELOG:

  • 2021-1-23: 修改R18参数说明,在path方法中添加图库链接

This API does not promise permanent maintenance, please be sure to consider use risks before use! !

1 API address

  • https://api.yimian.xyz/img

2 Quick start

Random two-dimensional picture

Random Bing Wallpaper

Random two-dimensional avatar

Random bed pictures

Random 1920x1080 size two-dimensional picture

3 Parameter list

Name Description Format Example
type Image type moe/wallpaper/head/imgbed type=moe
size Filter by image size ??x??;
*x??;
*x*;
??-??x??;
??-??x??-??;
??-??x*
display=1920x1080;
display=1920x*;
display=1920-1950x230-500;
display=1920-1950x*;
range Size error range number range=100
id Filter by image id number id=15
path Extract pictures based on path abs path path=wallpaper/img_··mal.jpg
display Whether to display in web page format true/false(default) display=true
R18 Whether to display 18 prohibited pictures true/false(default) R18=true

4 Detailed parameters

4.1 type

Two-dimensional (default)

bing daily wallpaper

Two-dimensional avatar

Miao meow sauce picture bed

こいぬちゃん

EasyVer man-machine verification

4.2 display

If this parameter is set to true, 302 jump will be disabled and the complete picture encoding will be returned directly. This method is very low and slow. Please use it carefully.

false (default)

true

4.3 size

Use this parameter to limit the image size. This parameter supports the following formats:

??x??

??x*

\x??*

\x**

??-??x??

??x??-??

??-??x??-??

??-??x*

\x??-??*

4.4 range

This parameter specifies the allowable size error, which needs to be used with size, and the default is 0.

For the?? type size parameter

For??-?? type size parameter

For *type size parameter

  • GET/POST /img?size=*x*&range=100
  • Description: Invalid range

4.5 id

Each category has its own id system, and different image ids under the same category are unique.

*Two-dimensional *

bing daily wallpaper

Two-dimensional avatar

Miao meow sauce picture bed

4.6 path

Use absolute path to directly extract pictures, priority is higher than type, highest efficiency.

Please go to 呓喵酱の Gallery to get the path of the picture!

4.7 R18

Whether to display 18 prohibited pictures, the default is false.

5 Error format

5.1 Cannot find the specified type

If the specified type cannot be found, a moe type picture will be automatically returned.

5.2 Can’t find matching images

Return JSON

1
2
3
{
"err": "error message"
}

The maximum number of global calls for each device is 500 per day!!