Skip to main content
POST
Render ZPL labels
Caretly exposes a single HTTP endpoint at https://caretly.dev/render. Send your ZPL as the raw request body and the response is the rendered label.

Get an API key

Every request needs an API key. Create one on the API keys page of the console. Start with a test key: it’s free, and stamps TEST on every label. Then store the key in the ZPL_API_KEY environment variable:
See Authentication for live keys, billing and errors. Click Try it to render the example shipping label directly from this page. Paste your key in the authorization field, and set format to png to preview the label inline.

Example

Use --data-binary instead of -d so curl keeps the newlines in your ZPL intact.
Just trying ZPL? The playground renders in your browser without a key. It’s free, but stamps PREVIEW on every label and PDF.

Authentication

Live and test keys, billing per label, safe retries and error codes.

Render many labels at once

Send several labels, ^PQ copies or a batch of ZPL files in one request, optionally gzip-compressed.

Authorizations

Authorization
string
header
required

An API key from the console, sent as Authorization: Bearer <key>. Live keys start with zpl_live_, test keys with zpl_test_.

Headers

Content-Encoding
enum<string>

Set when the request body is compressed. The 100 MiB limit applies to the decompressed body.

Available options:
gzip,
deflate
Idempotency-Key
string

Any string up to 255 characters, for example an order number. A retry with the same API key, Idempotency-Key, labels and query parameters is billed once; different labels or parameters are billed as a new request.

Maximum string length: 255

Query Parameters

format
enum<string>
default:pdf

The output format. pdf contains every page; png is the single page chosen with page.

Available options:
pdf,
png
page
integer
default:1

For format=png: the page to render, starting at 1. Pages are counted across all files of a multipart request. Out of range returns 400.

Required range: x >= 1
dpmm
enum<integer>
default:8

Printer resolution in dots per millimetre: 6 (152 dpi), 8 (203 dpi), 12 (300 dpi) or 24 (600 dpi).

Available options:
6,
8,
12,
24
timings
boolean

Return server-side timings for each stage in a Server-Timing response header.

Body

Raw ZPL, or several ZPL files as multipart form data. At most 100 MiB after decompression.

Raw ZPL. May contain several labels (^XA…^XZ).

Response

The rendered labels.

The response is of type file.