Barcode generator: Code 128 or EAN-13 as SVG
barcodeGenerate a barcode as an SVG image: Code 128 for any printable ASCII text (switching to the compact numeric set for runs of digits, with the mod-103 check symbol), or EAN-13 for 12 or 13 digits (the check digit is computed or verified). Set bar width and height and whether to print the text below. Returns the SVG and a data URL ready for an tag. Use for shipping labels, product codes, tickets or inventory; for QR codes use qr. Example: text=AGENT-12345. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | What to encode: ASCII text for Code 128, or 12-13 digits for EAN-13 | |
| type | No | code128 (default) or ean13 | |
| label | No | true (default) to print the text below the bars | |
| width | No | Module (narrowest bar) width in pixels, 1-6 (default 2) | |
| height | No | Bar height in pixels, 20-300 (default 80) |