二维码生成,支持颜色、logo,二维码
返回首页
二维码生成
请求示例
curl -X GET https://api.zhuimengapi.com/api/v1/qrcode-create \
-H "X-API-Key: RPA-xxxxxxxx"
-d "content=your_content \
-d "type=your_type \
-d "size=your_size \
-d "drawPreColor=your_drawPreColor \
-d "drawBgColor=your_drawBgColor \
-d "detectOutColor=your_detectOutColor \
-d "detectInColor=your_detectInColor \
-d "base64=your_base64 \
-d "url=your_url \
-d "logoBorder=your_logoBorder \
-d "logoStyle=your_logoStyle \
-d "logoBgColor=your_logoBgColor \
-d "logoBorderBgColor=your_logoBorderBgColor \
-d "bgOpacity=your_bgOpacity \
-d "level=your_level \
-d "bgWidth=your_bgWidth \
-d "bgHeight=your_bgHeight \
-d "startX=your_startX \
-d "startY=your_startY \
-d "padding=your_padding"import requests
url = "https://api.zhuimengapi.com/api/v1/qrcode-create"
headers = {"X-API-Key": "RPA-xxxxxxxx"}
data = {
"content": "your_content",
"type": "your_type",
"size": "your_size",
"drawPreColor": "your_drawPreColor",
"drawBgColor": "your_drawBgColor",
"detectOutColor": "your_detectOutColor",
"detectInColor": "your_detectInColor",
"base64": "your_base64",
"url": "your_url",
"logoBorder": "your_logoBorder",
"logoStyle": "your_logoStyle",
"logoBgColor": "your_logoBgColor",
"logoBorderBgColor": "your_logoBorderBgColor",
"bgOpacity": "your_bgOpacity",
"level": "your_level",
"bgWidth": "your_bgWidth",
"bgHeight": "your_bgHeight",
"startX": "your_startX",
"startY": "your_startY",
"padding": "your_padding"
}
res = requests.get(url, data=data, headers=headers)
print(res.json())const axios = require('axios');
axios.get("https://api.zhuimengapi.com/api/v1/qrcode-create", {
content: "your_content",
type: "your_type",
size: "your_size",
drawPreColor: "your_drawPreColor",
drawBgColor: "your_drawBgColor",
detectOutColor: "your_detectOutColor",
detectInColor: "your_detectInColor",
base64: "your_base64",
url: "your_url",
logoBorder: "your_logoBorder",
logoStyle: "your_logoStyle",
logoBgColor: "your_logoBgColor",
logoBorderBgColor: "your_logoBorderBgColor",
bgOpacity: "your_bgOpacity",
level: "your_level",
bgWidth: "your_bgWidth",
bgHeight: "your_bgHeight",
startX: "your_startX",
startY: "your_startY",
padding: "your_padding"
}, {
headers: { "X-API-Key": "RPA-xxxxxxxx" }
}).then(res => console.log(res.data));响应示例
{
"code": 0,
"msg": "返回码对应描述",
"taskNo": "本次请求号",
"data": {
"image": "图片Base64数据",
"picType": "图片类型"
}
}
接口信息
请求地址
https://api.zhuimengapi.com/api/v1/qrcode-create
请求方式
GETPOST
Content-Type
application/x-www-form-urlencoded
鉴权方式
X-API-Key: RPA-xxxxxxxx
请求参数
content
string
必填 内容
type
string
类型 base - 基本 color - 指定颜色 logo - 指定logo override - 全覆盖背景 fill - 填充模式背景 penetrate - 渲染模式背景 默认base
size
string
二维码大小,100-1000之间, 默认200,小于100或大于1000按默认大小处理
drawPreColor
string
着色点颜色,rgb值,默认:#000000(黑色),可以不带# , type为color,override,fill,penetrate时有效
drawBgColor
string
背景颜色,rgb值,默认:#ffffff(白色),可以不带# , type为color,override,fill,penetrate时有效
detectOutColor
string
定位点外边颜色,rgb值,默认:#000000(黑色),以不带#,type为color时有效
detectInColor
string
定位点内部颜色,rgb值,默认:#000000(黑色),可以不带# ,type为color时有效
base64
string
logo图片base64串,base64、url 必须提供一个, type为logo,override,fill,penetrate时有效
url
string
logo图片url,base64、url 必须提供一个,type为logo,override,fill,penetrate时有效
logoBorder
string
logo是否有边框,默认true, type为logo时有效
logoStyle
string
logo样式,NORMAL-普通, ROUND-圆角,CIRCLE-圆,默认NORMAL,type为logo时有效
logoBgColor
string
logo背景颜色,rgb值,默认:#000000,可以不带#,type为logo时有效
logoBorderBgColor
string
logo边框颜色,rgb值,默认:#000000,可以不带# type为logo时有效
bgOpacity
string
二维码的透明度,值为0-1之间,默认是0.6f,type为override时有效
level
string
纠错级别,[ L、M、Q、H ] 默认是H,type为override,fill,penetrate时有效
bgWidth
string
背景图片宽度, 默认:500 ,type为fill时有效
bgHeight
string
背景图片高度, 默认:500 ,type为fill时有效
startX
string
二维码的绘制在背景图上的x坐标, 默认:130 type为fill时有效
startY
string
二维码的绘制在背景图上的y坐标, 默认是:120 type为fill时有效
padding
string
空白, 0 - 4 (0表示无空白), type为fill时有效
返回字段
code
int
必填 返回码,详见返回码说明
msg
string
必填 返回码对应描述
taskNo
string
必填 本次请求号
data
object
必填 返回数据
image
string
必填 图片Base64数据
picType
string
必填 图片类型
- 200请求成功
- 401API Key 无效或已过期,请检查密钥是否正确
- 402余额不足,请充值后再试
- 403IP 地址不在允许范围内或被限制访问
- 404接口路由不存在,请检查接口地址
- 429请求频率超限,请稍后再试
- 500服务器内部错误,请联系技术支持
- 502接口异常,或者传参错误,请联系技术支持
请求地址
https://api.zhuimengapi.com/api/v1/qrcode-create
请求方式
GET/POST
Content-Type
application/x-www-form-urlencoded
鉴权 Header
X-API-Key
Params
GET 请求只通过 URL 查询参数发送
Body 表单模式
POST + application/x-www-form-urlencoded 使用表单键值对请求体
快速信息
| 接口路由 | qrcode-create |
| 接口分类 | - |
| 请求方式 | GETPOST |
| 计费方式 | 0.1 积分/次 |
| 频率限制 | 100 次/秒 |
| 认证方式 | X-API-Key |
| 接口提供 | 官方接口 |