get_barcode
Barcode generator for product, shipping, and inventory labels: GET ?data=&type= and receive a print-ready SVG plus PNG (base64) and a data: URI. Types: code128 (default), ean13, ean8, upca, upce, code39, itf14, gs1-128, codabar, datamatrix, pdf417, aztec. Check digits, quiet zones, and the human-readable line are handled per spec; invalid input for a symbology returns a clear 400. Deterministic, no network. QR codes live at /api/qr. ($0.01 per call, paid via x402)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dark | No | Hex color of the bars (default #000000) | |
| data | Yes | Value to encode (required, up to 500 chars; digits-only types validate length + check digit) | |
| type | No | Symbology: code128 (default), ean13, ean8, upca, upce, code39, itf14, gs1-128, codabar, datamatrix, pdf417, aztec | |
| light | No | Hex background color (default #ffffff) | |
| scale | No | Module width multiplier for the PNG (1-8, default 3) | |
| height | No | Bar height for 1D types (4-60, default 12) | |
| text_line | No | Set to 'false' to omit the human-readable text under the bars |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | ||
| data | No | ||
| type | No | ||
| data_uri | No | ||
| png_base64 | No |