二维码
接口信息
GET / POST
api.vsaa.cn/api/demo/qrcode/index.php
Method
GET / POST
分类
太上玄虚
Calls
1,081
KEY
无需 KEY
计费
免费
QPM
120/MIN
鉴权方式
无需密钥
作者
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| content | string | 否 | 内容自动识别:网址自动补 https://,base64 自动解码,其余按文本处理(与 text / url / base64 三选一,优先级 text > url > base64 > content) | |
| text | string | 否 | 要生成二维码的文本内容(优先于 url / base64 / content) | |
| url | string | 否 | 要生成二维码的网址,无协议时自动补 https:// | |
| base64 | string | 否 | base64 编码的内容,自动解码后生成二维码(不做长度限制) | |
| size | string | 否 | 二维码尺寸:单值如 300(正方形),或 宽x高 如 220x220(支持 x/X/× 和空格),范围 100~2000,默认 300 | |
| margin | integer | 否 | 二维码留白像素,默认 20,范围 0~200 | |
| ecc | string | 否 | 纠错等级 L / M / Q / H,默认 M | |
| img | integer | 否 | 传 1 时直接输出 PNG 图片流(Content-Type: image/png),不返回 JSON;默认返回 JSON | |
| host | string | 否 | 指定返回图片地址的完整域名,如 https://api.example.com;不传时按当前请求推断 |
[
{
"name": "content",
"type": "string",
"required": false,
"description": "内容自动识别:网址自动补 https://,base64 自动解码,其余按文本处理(与 text / url / base64 三选一,优先级 text > url > base64 > content)",
"example": ""
},
{
"name": "text",
"type": "string",
"required": false,
"description": "要生成二维码的文本内容(优先于 url / base64 / content)",
"example": ""
},
{
"name": "url",
"type": "string",
"required": false,
"description": "要生成二维码的网址,无协议时自动补 https://",
"example": ""
},
{
"name": "base64",
"type": "string",
"required": false,
"description": "base64 编码的内容,自动解码后生成二维码(不做长度限制)",
"example": ""
},
{
"name": "size",
"type": "string",
"required": false,
"description": "二维码尺寸:单值如 300(正方形),或 宽x高 如 220x220(支持 x/X/× 和空格),范围 100~2000,默认 300",
"example": ""
},
{
"name": "margin",
"type": "integer",
"required": false,
"description": "二维码留白像素,默认 20,范围 0~200",
"example": ""
},
{
"name": "ecc",
"type": "string",
"required": false,
"description": "纠错等级 L / M / Q / H,默认 M",
"example": ""
},
{
"name": "img",
"type": "integer",
"required": false,
"description": "传 1 时直接输出 PNG 图片流(Content-Type: image/png),不返回 JSON;默认返回 JSON",
"example": ""
},
{
"name": "host",
"type": "string",
"required": false,
"description": "指定返回图片地址的完整域名,如 https://api.example.com;不传时按当前请求推断",
"example": ""
}
]
详细文档
暂无详细文档
快速上手
暂无代码示例。管理员可在后台用 AI 生成或手动编写。
在线测试
请求地址
api.vsaa.cn/api/demo/qrcode/index.php
Method
参数
Response
等待中
// 结果将在此处显示