一眼丁真合集,目前已收集504张
随机查看: https://dj.aya1.top
- 返回一张随机的丁真表情包
参数 | 类型 | 默认值 | 说明 |
---|---|---|---|
r | int | 1 | 值为0时不进行重定向 |
g | int | 0 | 值为1时返回github的直链 |
直接访问 https://api.aya1.top/randomdj 跳转到图片地址
访问 https://api.aya1.top/randomdj?r=0 时,返回json
curl调用:
$ curl -s "https://api.aya1.top/randomdj?r=0"
输出:
{"status":"ok","url":"https://ayatale.coding.net/p/picbed/d/DingZhen/git/raw/main/src/917021660f75098cba21f16aa3d7a2ae.jpg"}
$ curl -s "https://api.aya1.top/randomdj?r=0&g=1"
输出:
{"status":"ok","url":"https://raw.githubusercontent.com/Brx86/DingZhen/main/src/87754eabec44cc90ba5c198454871990.jpg"}
- 根据关键词,调用wombo即时生成
- 备注:该api受wombo服务器波动影响较大,返回时间可能在10秒到1分钟不等,在调用时请注意修改超时时间。当wombo服务器繁忙时,长时间未响应将返回
{"status": "timeout"}
,请注意错误处理。
参数 | 类型 | 默认值 | 说明 |
---|---|---|---|
keywords | str | (必填) | 待生成图片的关键词 |
style | int | 1~26随机 | 图片风格(1~26的序号) |
file | int | 0 | 值为1时返回图片文件 |
- curl调用,关键词
cloud
,返回json
curl -X POST "https://api.aya1.top/wombo" \
-d '{"keywords":"cloud"}' \
-H "Content-type: application/json" | jq
// 输出:
{
"style": "Ghibli",
"keywords": "cloud",
"status": "ok",
"url": "https://prod-wombo-paint.s3.amazonaws.com/exports/8d0ea5be-b4f8-4de5-b510-9aba6d9cfac4/blank_tradingcard.jpg?AWSAccessKeyId=AKIAWGXQXQ6WCOB7PP5J&Signature=9b9%2B8eVegCrkf8T060cQxCOd9Ek%3D&Expires=1663739352"
}
- python调用,关键词
desert
,风格18
RoseGold,返回json
r = requests.post(
"https://api.aya1.top/wombo",
json={"keywords": "desert", "style": 18},
timeout=60,
)
print(r.json())
// 输出:
{
"style": "RoseGold",
"keywords": "desert",
"status": "ok",
"url": "https://prod-wombo-paint.s3.amazonaws.com/exports/67c29cda-b4f3-46ab-982e-a312ae3bbb53/blank_tradingcard.jpg?AWSAccessKeyId=AKIAWGXQXQ6WCOB7PP5J&Signature=6qm%2BS162%2F3bzlg0kEcfCJnOnFIg%3D&Expires=1663741052"
}
- curl调用,关键词
ocean of flowers
,风格5
FantasyArt,保存到图片
curl -X POST "https://api.aya1.top/wombo" \
-d '{"keywords":"ocean of flowers","style":5,"file":1}' \
-H "Content-type: application/json" \
-o example.jpg