# generatebarcode: Generate Barcode – EAN, Code 128, DataMatrix, PDF417

> generatebarcode (Generate Barcode – EAN, Code 128, DataMatrix, PDF417) is a 1001fx API function in the group Images: POST https://api.1001fx.com/images/generatebarcode, 3 credits per call. It works as a ready-made module in Make or as a plain HTTP call.

Creates a barcode image (PNG or SVG): EAN-13/8, UPC-A/E, Code 128/39/93, ITF-14, ISBN, GS1-128, DataMatrix, PDF417 and Aztec. For QR codes use images/generateqrcode.

- Group: Images
- Endpoint: `POST https://api.1001fx.com/images/generatebarcode`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 3 credits per call
- Ready-made in: Make
- Docs: https://1001fx.com/functions/generatebarcode

## Parameters

- `text` (string, required) – Content: Value to encode, e.g. 4006381333931 for EAN-13.
- `type` (enum, required, one of `code128`, `ean13`, `ean8`, `upca`, `upce`, `code39`, `code93`, `itf14`, `interleaved2of5`, `isbn`, `datamatrix`, `pdf417`, `azteccode`, `gs1-128`) – Barcode type: code128 (default for text), EAN/UPC, Code 39/93, ITF-14, DataMatrix, PDF417, Aztec, GS1-128.
- `format` (enum, optional, one of `png`, `svg`, default `png`) – Image format: png (default) or svg.
- `scale` (number, optional, default `3`, min 1, max 10) – Scale: Size factor 1 to 10, default 3.
- `height` (number, optional, default `15`, min 2, max 100) – Bar height (mm): For linear barcodes, default 15.
- `includeText` (boolean, optional, default `true`) – Show text: Human-readable text below the bars (default true).

## Example: Generate Barcode – EAN, Code 128, DataMatrix, PDF417

```bash
curl -X POST 'https://api.1001fx.com/images/generatebarcode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"text":"4006381333931","type":"ean13"}'
```
