随机占位图 接口
分类:媒体图片
请求方式:GET / POST
根据宽高参数生成随机占位图, 返回图片地址。
接口编码
placeholder-image
调用地址
/api/data/placeholder-image
按次价格
0.10 元/次
包月价格
9.90 元/月
随机占位图 接口说明
请求参数
调用时携带以下参数(计费方式为按次 / 包月,详见下方「计费说明」):
| 参数路径 | 类型 | 示例值 |
|---|---|---|
| width | number | 400 |
| height | number | 300 |
请求示例
GET /api/data/placeholder-image?width=400&key=你的访问Key
请求体(POST)
{
"width": 400,
"height": 300
}
返回示例
{
"code": 0,
"data": {
"width": 400,
"height": 300,
"format": "png",
"url": "https://picsum.photos/400/300"
}
}
计费与试用说明
- 按次计费:0.10 元/次,调用成功才扣费,余额不足返回 5001。
- 包月套餐:9.90 元/月 ,每月调用次数不限
- 接口调用需要先注册账号并开通,未开通或未登录无法直接调用。