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