用于集成
一次请求,获得二维码
将二维码生成集成到服务中,通过 GET 发送内容和设计设置,直接获取 PNG 或 SVG,不进行额外的扫描验证。
免费。永远免费。PNG、SVG 和 API,无费用、无订阅。
直接编码的二维码。 无重定向,无有效期。
GEThttps://qivo.umind.group/
请求与身份验证
请在 X-API-Key 请求头中传递密钥,无需编辑器会话或 cookie。示例中的 QIVO_API_KEY 是存放密钥的客户端环境变量。
curl --fail --show-error --get 'https://qivo.umind.group/' \
--header "X-API-Key: $QIVO_API_KEY" \
--data-urlencode 'data=https://umind.group' \
--data-urlencode 'contentType=url' \
--data-urlencode 'format=svg' \
--data-urlencode 'shape=rounded' \
--data-urlencode 'size=1024' \
--output qr-code.svg如果集成只接受网址,可通过 key 参数传递密钥:
https://qivo.umind.group/?key=YOUR_SECRET_KEY&data=https%3A%2F%2Fumind.group&format=png&size=1024将 YOUR_SECRET_KEY 替换为密钥,请求头优先。参数值需进行 URL 编码:# → %23,+ → %2B,值中的 & → %26。
使用 HTTPS,并将密钥保存在服务器上,不要写入公开 JavaScript。网址中的密钥和数据可能进入浏览器历史或日志,因此密钥优先使用请求头传递。
代码例子
在服务器上运行这些例子. 将密钥存储在 QIVO_API_KEY 环境变量中; 不要在页面代码中发布。
<?php
$key = getenv('QIVO_API_KEY');
if (!$key) throw new RuntimeException('Set QIVO_API_KEY');
$query = http_build_query([
'data' => 'https://umind.group', 'format' => 'svg',
'shape' => 'rounded', 'size' => 1024,
], '', '&', PHP_QUERY_RFC3986);
$curl = curl_init('https://qivo.umind.group/?' . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . $key],
CURLOPT_TIMEOUT => 30,
]);
$image = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
if ($image === false || $status !== 200) {
throw new RuntimeException('Qivo request failed: ' . $status);
}
file_put_contents('qr-code.svg', $image);import { writeFile } from 'node:fs/promises';
const key = process.env.QIVO_API_KEY;
if (!key) throw new Error('Set QIVO_API_KEY');
const url = new URL('https://qivo.umind.group/');
url.search = new URLSearchParams({
data: 'https://umind.group', format: 'svg',
shape: 'rounded', size: '1024'
});
const response = await fetch(url, {
headers: { 'X-API-Key': key },
signal: AbortSignal.timeout(30000)
});
if (!response.ok) throw new Error(`Qivo request failed: ${response.status}`);
await writeFile('qr-code.svg', Buffer.from(await response.arrayBuffer()));import os
from pathlib import Path
from urllib.parse import urlencode
from urllib.request import Request, urlopen
key = os.environ['QIVO_API_KEY']
query = urlencode({
'data': 'https://umind.group', 'format': 'svg',
'shape': 'rounded', 'size': 1024,
})
request = Request('https://qivo.umind.group/?' + query,
headers={'X-API-Key': key})
# urlopen raises HTTPError for unsuccessful HTTP responses.
with urlopen(request, timeout=30) as response:
Path('qr-code.svg').write_bytes(response.read())设计参数
| 参数 | 类型 | 要求 | 取值 |
|---|---|---|---|
X-API-Key / key | string | 需要 | 密钥:标题或GET参数 |
data | string | 文本和URL | text/url 的必填内容 |
contentType | string | 可选 | texturlwifivcardwhatsapptelegramphoneviberemailsms默认值: text |
format | string | 可选 | pngsvg默认值: png |
size | integer | 可选 | 25651210242048默认值: 1024 |
shape | string | 可选 | squaresoftroundeddotsleaf-softleafhorizontalverticalpointednotchedstardiamondxx-roundedplusplus-roundedheartsparkleconfetti默认值: square |
border | string | 可选 | squarecircleroundedskewdrop-tldrop-brleafleaf-inner-brleaf-circleleaf-inner-tlsquare-circlesoft-tlsoft-brsoft-leafrough默认值: square |
center | string | 可选 | squarecircleroundedskewroughdrop-tldrop-brleafgearstardiamondxx-roundedplusplus-roundedheart默认值: square |
foreground / eyeColor | string | 可选 | #RRGGBB 默认值: #192b39 |
background | string | 可选 | #RRGGBB 默认值: #ffffff |
level | string | 可选 | LMQH默认值: M |
quietZone | integer | 可选 | 0–12 个模块 默认值: 4 |
logo | string | 可选 | nonewhatsapplinklocationwificredentialemailscanbellmenuscan-mescan-me-v2paypalbitcoinsparkplusdiamond默认值: none |
logoScale | integer | 可选 | 12–30 默认值: 24 |
带标志的二维码自动使用 H 级纠错。GET 支持内置图标,不支持上传文件或外部标志网址。
内容类型
字段取决于 contentType。网址须包含 https:// 或 http://,电话号码须包含国家代码。
| contentType | 需要的田野 | 可选领域 |
|---|---|---|
| text / url | data | — |
| phone / viber | phone | — |
| whatsapp / sms | phone | message |
| telegram | telegram | — |
| subject, message | ||
| wifi | ssid; wifiSecurity≠nopass → wifiPassword | wifiSecurity (WPA), wifiHidden (0) |
| vcard | firstName / lastName | organization, jobTitle, phone, email, website, address |
https://qivo.umind.group/?key=YOUR_SECRET_KEY&contentType=phone&phone=%2B380671234567&format=svgAPI 响应
成功响应直接返回图像文件,不使用 JSON 包装。Content-Type 为 image/png 或 image/svg+xml,错误则返回 JSON:
{"error":"Invalid API key."}- 200 — 图像已生成。
- 401 — 密钥缺失或无效。
- 405 — 必须使用 GET。
- 422 — 参数无效或缺少内容。
- 429 — 超出请求限制;Retry-After: 60。
- 503 — API 尚未配置,或保护功能暂时不可用。
- 500 — 内部生成错误。
限制与验证
默认每个 IP 每分钟 60 次请求,编码内容最多 800 字节,PNG 最大 2048 × 2048 像素,SVG 保留矢量图形。
API 验证参数格式、尺寸和对比度,但不运行解码器。装饰性设计和打印结果请用相机测试。