Công cụ QR
Tạo mã QR
qr-code-generator
Use QR Code Generator through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · Headless
Quick actions
Input files 0Output files 1–2
Đầu vào
Accepted input contract for this Tool.
| Kind | data |
|---|---|
| File count | 0 – 0 |
| Accepted MIME types | Không có |
Tham số
Pass these values through request.options.
| Parameter | Type | Bắt buộc | Mặc định | Giá trị / Phạm vi | Mô tả |
|---|---|---|---|---|---|
content |
string | Required | — | — | URL, text, phone number or other QR content. |
size |
integer | Optional | 512 |
96 – 4096 | Output QR width and height in pixels. |
ecc |
enum | Optional | M |
L | M | Q | H | QR error correction level. A center logo forces H. |
foreground |
string | Optional | #000000 |
— | QR foreground color as #RRGGBB. |
background |
string | Optional | #ffffff |
— | QR background color as #RRGGBB. |
format |
enum | Optional | png |
png | svg | both | Output PNG, SVG or both files. |
Đầu ra
Result contract returned after successful processing.
| Type | files |
|---|---|
| File count | 1 – 2 |
| MIME types | image/png, image/svg+xml |
| Metadata | size, ecc, moduleCount, hasLogo, outputBytes |
| ZIP archive | No |
Ví dụ cơ bản
Choose a supported integration mode and copy the generated starter code.
Headless
const result = await client.run("qr-code-generator", {
options: { content: "value", size: 512, ecc: "M", foreground: "#000000" }
});
console.log(result.files, result.data, result.metadata);
Embedded
await client.mount({ tool: "qr-code-generator", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.