二维码生成 接口
分类:开发工具
请求方式:GET / POST
根据内容文本生成二维码图片, 支持自定义模块像素, 返回 Base64。
接口编码
qrcode
调用地址
/api/data/qrcode
按次价格
0.10 元/次
包月价格
9.90 元/月
二维码生成 接口说明
请求参数
调用时携带以下参数(计费方式为按次 / 包月,详见下方「计费说明」):
| 参数路径 | 类型 | 示例值 |
|---|---|---|
| content | string | "https://www.example.com" |
| pixelsPerModule | number | 20 |
| withDataPrefix | true | true |
请求示例
GET /api/data/qrcode?content="https://www.example.com"&key=你的访问Key
请求体(POST)
{
"content": "https://www.example.com",
"pixelsPerModule": 20,
"withDataPrefix": true
}
返回示例
{
"code": 0,
"data": "data:image/png;base64,..."
}
计费与试用说明
- 按次计费:0.10 元/次,调用成功才扣费,余额不足返回 5001。
- 包月套餐:9.90 元/月 ,每月调用次数不限
- 接口调用需要先注册账号并开通,未开通或未登录无法直接调用。