generate barcode
generate_barcodeGenerate a barcode or QR code as SVG or PNG: QR, DataMatrix, PDF417, Code 128, Code 39, EAN-13, EAN-8, UPC-A, ISBN-13, ITF and GS1-128. EAN/UPC/ISBN check digits are computed (or verified, never silently replaced). QR and DataMatrix support colours, square/rounded/dot styles and (QR) a centre logo from an https URL. Every format is verified scannable. Returns SVG text or base64 PNG plus a data URI ready to embed in HTML, PDF or labels. Paid ($0.001, x402).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ec | No | QR error correction level (H when a logo is used) | |
| text | Yes | Data to encode (URL, text, digits for EAN/UPC/ISBN...) | |
| type | No | Barcode format | |
| color | No | Foreground colour #RRGGBB | |
| scale | No | Size: pixels per module (2D) or bar-width step (1D); default 4 (SVG) / 8 (PNG) | |
| style | No | Module style (qrcode, datamatrix) | |
| format | No | Output image format | |
| logo_url | No | QR only: https URL of a PNG/JPEG/WebP logo (max 200 KB) placed in the centre | |
| height_mm | No | Bar height for linear barcodes, in mm | |
| background | No | Background colour #RRGGBB | |
| include_text | No | Print the human-readable text under linear barcodes |