Endpoint
Authentication
| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your API key (bun_...) |
Content-Type | Yes | application/json |
Overview
Generate barcodes and QR codes on demand. Bunny’s Barcode API converts any text or URL into a pixel-perfect image: QR codes, Code 128, EAN-13, PDF417, Data Matrix, and more. Returns a base64-encoded PNG ready to embed in web pages, PDFs, or print flows.Use cases
- Product labels and inventory management
- QR code generation for links and contact cards
- Shipping and logistics barcode printing
- Event tickets and access passes
Details
Supported types:qrcode, code128, code39, ean13, ean8, upca, upce, pdf417, datamatrix, azteccode, interleaved2of5. All barcodes are rendered as PNG at a fixed scale with human-readable text below the symbol where applicable.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
data | string | Yes | The data to encode in the barcode |
type | string | No | Barcode type (e.g. qrcode, code128, ean13). Default: "code128" |
Example
Response
200 OK
| Field | Type | Description |
|---|---|---|
barcode_base64 | string | Base64-encoded PNG barcode image |
mime_type | string | Always "image/png" |
type | string | The barcode type used |
data | string | The encoded data |

