Skip to content

Quickstart

The fastest way to integrate LabelZoom is an official SDK. Install it, and converting ZPL to a PDF is one call:

Terminal window
npm install @labelzoom/sdk
import { writeFile } from 'node:fs/promises';
import { LabelZoomClient } from '@labelzoom/sdk';
const client = new LabelZoomClient(); // reads LABELZOOM_API_KEY; anonymous if unset
const result = await client.convert()
.fromZpl('^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ')
.toPdf()
.withLabelSize(4, 6) // inches
.withDpi(203)
.execute();
await writeFile('label.pdf', result.bytes);

Node 20+, no runtime dependencies. → Full JavaScript quickstart

Open label.pdf — you’ll see the label exactly as a Zebra printer would print it.

Each SDK is a thin, dependency-light wrapper over the REST endpoint below. What it adds:

  • Source and target formats are distinct types. JPG and URL are source-only — JPG normalizes to JPEG, and URL is a fetch instruction, not an output — so toUrl() doesn’t exist. A compile error instead of a runtime 404.
  • Options are named, not hand-built query stringswithLabelSize(4, 6) rather than remembering that label.width is inches while dpi is dots per inch.
  • Typed errors per status code, instead of branching on integers.
  • The API key is picked up from LABELZOOM_API_KEY if you don’t pass one.

All eight are validated against a single shared conformance suite — 83 language-neutral fixtures every SDK must pass, plus an assertion that each suite really ran all of them — so the wire behaviour is identical across languages.

Working in a language without an SDK? The API is a plain HTTP call; see Calling the REST API directly below.

  1. Create a free LabelZoom account.
  2. Open your dashboard and copy your API key.

The free tier converts unlimited labels with a watermark; paid plans remove it and add SLAs.

An API key is optional — every SDK works anonymously on the free tier, which is why the examples above run as-is. Set LABELZOOM_API_KEY in the environment and the SDK picks it up with no code change. See Authentication for details.

The SDKs are a convenience, not a requirement — the API is plain HTTP, and no SDK is needed for a language that doesn’t have one yet. The same conversion as one curl command:

Terminal window
curl -X POST "https://api.labelzoom.com/api/v2/convert/zpl/to/pdf" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: text/plain" \
-d '^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ' \
--output label.pdf

Every language quickstart shows the raw-HTTP form alongside the SDK form.

Every conversion uses the same pattern:

POST https://api.labelzoom.com/api/v2/convert/{source}/to/{target}
Supported values
Source formats zpl, epl, ipl, tspl, dpl, sbpl, pdf, png, bmp, gif, jpg/jpeg, xml, json, url
Target formats pdf, png, bmp, gif, jpeg, zpl, epl, ipl, tspl, dpl, sbpl, xml, json

Send the label code (Content-Type: text/plain) or file bytes as the request body; the response body is the converted file.

See Supported formats for the content type each format needs, how to convert straight from a URL, and which conversion pairs require a paid plan.

Parameter SDK equivalent Meaning Default
label.width withLabelSize(w, h) / label_width Label width in inches 4
label.height withLabelSize(w, h) / label_height Label height in inches 6
dpi withDpi(n) / dpi Print density: 152, 203, 300, or 600 203

Example — a 4×6 inch label at 300 dpi:

POST /api/v2/convert/zpl/to/png?label.width=4&label.height=6&dpi=300

Many more parameters are available — rotation, scaling, color mode, variable-data filling, and PDF/ZPL options. See Conversion parameters for the full list; each has a matching SDK option.