Qivo二维码工作室
生成二维码

用于集成

一次请求,获得二维码

将二维码生成集成到服务中,通过 GET / POST 发送内容和设计设置,直接获取 PNG 或 SVG,不进行额外的扫描验证。

免费。永远免费。PNG、SVG 和 API,无费用、无订阅。

直接编码的二维码。 无重定向,无有效期。

GET / POSThttps://qivo.umind.group/

请求与身份验证

请在 X-API-Key 请求头中传递密钥,无需编辑器会话或 cookie。示例中的 QIVO_API_KEY 是存放密钥的客户端环境变量。

curl 示例
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 参数传递密钥:

GET 网址示例
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 环境变量中; 不要在页面代码中发布。

qr-code.php
<?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);
qr-code.mjs
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()));
qr-code.py
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())

标志上传

POSThttps://qivo.umind.group/

Content-Type: multipart/form-data
X-API-Key: YOUR_SECRET_KEY

Qivo 可接受 PNG、JPEG 和 WebP 文件高达 2 MB,最大侧面为 2048 像素。

参数类型要求取值
X-API-Keyheader需要YOUR_SECRET_KEY
logostring需要upload
logoFilefile需要PNG / JPEG / WebP · ≤ 2 MiB · ≤ 2048 × 2048 px · ≤ 4,000,000 px
logoScaleinteger可选12–30 · 默认值: 24
logoPaddinginteger可选0–25% · 默认值: 5

GET → logo=none / whatsapp / …
POST → logo=upload + logoFile
logoUrl / logoBase64 / SVG / GIF → 422
Content-Length > 3 MiB → 413
level → H

cURL · multipart/form-data
curl --fail --show-error 'https://qivo.umind.group/' \
  --header "X-API-Key: $QIVO_API_KEY" \
  --form-string 'data=https://umind.group' \
  --form-string 'format=svg' \
  --form-string 'logo=upload' \
  --form-string 'logoPadding=10' \
  --form-string 'logoScale=24' \
  --form 'logoFile=@./logo.png;type=image/png' \
  --output qr-code.svg
PHP · CURLFile
<?php
$key = getenv('QIVO_API_KEY');
if (!$key) throw new RuntimeException('Set QIVO_API_KEY');
$curl = curl_init('https://qivo.umind.group/');
curl_setopt_array($curl, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['X-API-Key: ' . $key],
    CURLOPT_TIMEOUT => 30,
    CURLOPT_POSTFIELDS => [
        'data' => 'https://umind.group', 'format' => 'png',
        'logo' => 'upload', 'logoScale' => '24', 'logoPadding' => '10',
        'logoFile' => new CURLFile(__DIR__ . '/logo.png', 'image/png', 'logo.png'),
    ],
]);
$image = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
if ($image === false || $status !== 200) throw new RuntimeException('Qivo: ' . $status);
file_put_contents('qr-code.png', $image);
JavaScript · Node.js 20+
import { readFile, writeFile } from 'node:fs/promises';
const key = process.env.QIVO_API_KEY;
if (!key) throw new Error('Set QIVO_API_KEY');
const form = new FormData();
form.set('data', 'https://umind.group');
form.set('format', 'svg');
form.set('logo', 'upload');
form.set('logoPadding', '10');
form.set('logoFile', new Blob([await readFile('./logo.png')], { type: 'image/png' }), 'logo.png');
// FormData supplies Content-Type and the multipart boundary automatically.
const response = await fetch('https://qivo.umind.group/', {
  method: 'POST', headers: { 'X-API-Key': key }, body: form,
  signal: AbortSignal.timeout(30000)
});
if (!response.ok) throw new Error(`Qivo: ${response.status}`);
await writeFile('qr-code.svg', Buffer.from(await response.arrayBuffer()));
Python · requests
# python -m pip install requests
import os
from pathlib import Path
import requests

with open('logo.png', 'rb') as logo:
    response = requests.post(
        'https://qivo.umind.group/',
        headers={'X-API-Key': os.environ['QIVO_API_KEY']},
        data={'data': 'https://umind.group', 'format': 'svg', 'logo': 'upload', 'logoPadding': '10'},
        files={'logoFile': ('logo.png', logo, 'image/png')},
        timeout=30,
    )
response.raise_for_status()
Path('qr-code.svg').write_bytes(response.content)

一个 SVG 内部的 QR 地质是基于 vector 的. 您的上传的标志被嵌入为清洁的拉斯特图像,因此它的细节不会变得无限。

设计参数

参数类型要求取值
X-API-Key / keystring需要
密钥:标题或GET参数
datastring文本和URL
text/url 的必填内容
contentTypestring可选
texturlwifivcardwhatsapptelegramphoneviberemailsms
默认值: text
formatstring可选
pngsvg
默认值: png
sizeinteger可选
25651210242048
默认值: 1024
shapestring可选
squaresoftroundeddotsleaf-softleafhorizontalverticalpointednotchedstardiamondxx-roundedplusplus-roundedheartsparkleconfetti
默认值: square
borderstring可选
squarecircleroundedskewdrop-tldrop-brleafleaf-inner-brleaf-circleleaf-inner-tlsquare-circlesoft-tlsoft-brsoft-leafrough
默认值: square
centerstring可选
squarecircleroundedskewroughdrop-tldrop-brleafgearstardiamondxx-roundedplusplus-roundedheart
默认值: square
foreground / eyeColorstring可选
#RRGGBB
默认值: #192b39
backgroundstring可选
#RRGGBB
默认值: #ffffff
levelstring可选
LMQH
默认值: M
quietZoneinteger可选
0–12 个模块
默认值: 4
logostring可选
noneuploadwhatsapplinklocationwificredentialemailscanbellmenuscan-mescan-me-v2paypalbitcoinsparkplusdiamond
默认值: none
logoScaleinteger可选
12–30
默认值: 24
logoPaddinginteger可选
0–25%
默认值: 5

logo=upload → POST / · logoFile · level=H

内容类型

字段取决于 contentType。网址须包含 https:// 或 http://,电话号码须包含国家代码。

contentType需要的田野可选领域
text / urldata—
phone / viberphone—
whatsapp / smsphonemessage
telegramtelegram—
emailemailsubject, message
wifissid; wifiSecurity≠nopass → wifiPasswordwifiSecurity (WPA), wifiHidden (0)
vcardfirstName / lastNameorganization, jobTitle, phone, email, website, address
电话号码示例
https://qivo.umind.group/?key=YOUR_SECRET_KEY&contentType=phone&phone=%2B380671234567&format=svg

API 响应

成功响应直接返回图像文件,不使用 JSON 包装。Content-Type 为 image/png 或 image/svg+xml,错误则返回 JSON:

JSON
{"error":"Invalid API key."}
  • 200 — 图像已生成。
  • 401 — 密钥缺失或无效。
  • 405 — GET / POST
  • 413 — Content-Length > 3 MiB
  • 415 — POST: multipart/form-data
  • 422 — 参数无效或缺少内容。
  • 429 — 超出请求限制;Retry-After: 60。
  • 503 — API 尚未配置,或保护功能暂时不可用。
  • 500 — 内部生成错误。

限制与验证

默认每个 IP 每分钟 60 次请求,编码内容最多 800 字节,PNG 最大 2048 × 2048 像素,SVG 保留矢量图形。

API 验证参数格式、尺寸和对比度,但不运行解码器。装饰性设计和打印结果请用相机测试。

获取访问权限

API 是免费的,将永远是免费的. 填写短表格请求一个秘密密密钥。

所有三个字段都需要. 表格详细信息将发送给Qivo团队审查您的请求和回复。