Labelisk API
Render a Paxar PCL label format as a PNG image at print size.
Labelisk interprets the label format language of Paxar SNAP 500 and SNAP 700 printers, delimited by ~XA and ~ZZ. The commands are listed in the command reference. The service returns the label as the printer would produce it, including text, lines, barcodes, resident logos and images embedded in the print job.
The base URL is https://labelisk.com. The API is stateless HTTP; no SDK or session is required.
Authentication
Send your API key in the Authorization header. Create keys on your profile page; each key is shown once.
Authorization: Bearer lk_xxxxxxxxxxxxxxxxxxxxxxxx
The header X-API-Key: lk_… is also accepted. Requests without a key are served under a reduced daily allowance per IP address, intended for evaluation.
Render a label
POST/v1/render
The request body is the label format itself — plain text, or the raw bytes of a print job that carries PCX images. No JSON wrapper, no multipart.
Query parameters
| Name | Default | What it does |
|---|---|---|
station | first station | Which station to draw: F (front), B (back) or a number such as 2. |
barcode | code39 | Symbology used for ~FB barcode fields: code39, code128, ean13, ean8, upca or itf. See Barcodes. |
layout | 1 | Which label format to draw when the file carries more than one ~XA … ~XZ block. See Several labels in one file. |
batch | 1 | Which ~ZZ batch of data to fill the fields with, when the file repeats the same layout with different content. |
output | png | png returns the image. pdf returns a vector PDF the exact size of the label. json returns the image in base64 plus size, dpi and the warnings. |
Response
With output=png the body is the PNG. The size comes from the format: the label is drawn at the resolution declared in ~XD, so a 3 × 1 inch label at 300 dpi comes back as 900 × 300 pixels.
With output=pdf the body is a one page PDF, and the page is exactly the size of the label — a 4 × 2 inch label gives a 288 × 144 pt page. It is vector: text is still text, so it can be selected and searched and stays sharp at any zoom; frames and barcode bars are paths; the typeface is embedded and subsetted. Only ~I images stay as bitmaps, because that is what they are in the job. It is the format to send to a customer for approval, or to a prepress file.
curl -X POST "https://labelisk.com/v1/render?station=F&output=pdf" \
-H "Authorization: Bearer lk_xxx" \
--data-binary @label.pcl \
-o label.pdf
These headers come with every answer:
| Header | Example | Meaning |
|---|---|---|
X-Labelisk-Station | F | Station that was drawn. |
X-Labelisk-Stations | F,B | All stations in this format. |
X-Labelisk-Warnings | 2 | How many fields have warnings. |
X-Labelisk-Layout | 1/2 | Label format drawn, out of how many the file holds. |
X-Labelisk-Batch | 1/7 | Batch of data used, out of how many the file holds. |
X-Labelisk-Used-Today | 12 | Renders used today. |
X-Labelisk-Limit-Day | 200 | Daily allowance of your plan. |
X-Labelisk-Used-Month | 340 | Renders used this month. |
X-Labelisk-Limit-Month | 2000 | Monthly allowance of your plan. Without an API key you get X-Labelisk-Used-Week and X-Labelisk-Limit-Week instead, for the rolling 7 day window. |
Examples
# label as a PNG file
curl -X POST https://labelisk.com/v1/render \
-H "Authorization: Bearer lk_xxx" \
--data-binary @label.pcl \
-o label.png
# back of the label, with the warnings
curl -X POST "https://labelisk.com/v1/render?station=B&saida=json" \
-H "Authorization: Bearer lk_xxx" \
--data-binary @label.pcl
The JSON answer looks like this:
{
"station": "B",
"stations": ["F", "B"],
"layout": 1, "layouts": 2,
"batch": 1, "batches": 7,
"width": 900,
"height": 600,
"dpi": 300,
"warnings": [
{ "field": 7, "data": "ABC-123", "warnings": ["text is wider than ~AW"] }
],
"png": "iVBORw0KGgoAAAANSUhEUgAA…"
}
Stations
Several labels in one file
A print job is not always one label. A file can hold several ~XA … ~XZ blocks in a row — different layouts, each with its own size, stations and fields — and each of those can be followed by several ~ZZ batches, which print the same layout again with different data. A run of shoe tags in seven sizes is one layout and seven batches; a tag plus its separate care label is two layouts.
One request draws one label: layout picks the block, batch picks the data, and both default to the first. The headers X-Labelisk-Layout and X-Labelisk-Batch come back as 1/2 and 1/7, so a first call tells you how many there are and the rest is a loop.
curl -X POST "https://labelisk.com/v1/render?layout=1&batch=3&station=2" \
-H "Authorization: Bearer lk_xxx" \
--data-binary @run.pcl -o size-110.png
In the viewer the same thing appears as a list above the label for the batch, and one tab per layout and station.
A tag can carry more than one printed face. Fields marked ~FDF belong to the front, ~FDB to the back, and a number selects one of the extra stations. One request draws one station; ask for the others by changing station. The header X-Labelisk-Stations tells you which ones exist, so a first call is enough to discover them.
Warnings
Warnings do not stop the render: the label is drawn and the problems are reported alongside it.
- text is wider than ~AW — the text overflows the width the field declares.
- outside the label — part of the field falls off the tag.
- data has N characters; the field takes M — the printer would cut the text.
- no logo with that number — the
~FGfield points to a logo that is not in your account.
Barcodes
A barcode field (~FB) carries its own settings: ~BF picks the symbology, ~BH the bar height in thousandths of an inch, ~BW the module width in dots, and ~BL/~BP the font and point size of the human readable line — the same pair that ~AL/~AP are for text. Supported symbologies: Code 39, Code 128, EAN-13, EAN-8, UPC-A and ITF. Check digits are calculated when the data is one digit short, and a mismatch is reported as a warning instead of drawing wrong bars.
When the format leaves ~BF out, or gives a number that is not recognised, the symbology falls back to the barcode parameter — or to the selector above the label in the viewer.
~BF06 (EAN-13) is confirmed. It is the one barcode field we have seen in a real print job, and its check digit proves the reading. The other numbers follow the older Monarch MPCL numbering and are flagged in the viewer as deduced, not confirmed. If you have a real format with a barcode and a photo of the printed tag, send them over: one job per symbology is all it takes to settle the rest.Your logos and fonts
Upload BMP logos and TTF/OTF fonts on your profile. They are used automatically on every render made with your key, the same way the printer uses what is stored in its memory.
- Logos:
~FGfinds a logo by the number at the end of the file name, soLOGO00015.BMPanswers the data015. - Fonts:
~AL5uses the file namedFNT00005.TTF.
Without your own files, the render falls back to free lookalike fonts, and missing logos are drawn as a dashed box.
Plans and limits
| Plan | Per day | Longer window | Logos / fonts |
|---|---|---|---|
| No account | 20 | 200 per 7 days | — |
| Free | 200 | 2,000 | 30 / 10 |
| Pro · US$ 19/month | 5,000 | 20,000 | 1,000 / 200 |
Daily counters reset at midnight UTC. Account plans reset the longer counter on the 1st of each month; without an account it is a rolling 7 day window, because those counters are kept by IP address and deleted after 7 days. For volumes above the Pro plan, write to support for a dedicated plan.
Errors
Every error comes back as JSON with a single erro field describing what happened.
| Code | When |
|---|---|
400 | Empty body, or nothing that looks like a label format. |
401 | Invalid or revoked key. |
422 | The format was read but could not be drawn — for example a station that does not exist. |
429 | Daily or monthly allowance reached. |
503 | The renderer is restarting. Wait a few seconds and try again. |
JavaScript
One file, no dependencies, works in Node 18+ and in Deno and Bun.
import { Labelisk } from './labelisk.js';
const labelisk = new Labelisk({ key: process.env.LABELISK_KEY });
const png = await labelisk.render(format); // Uint8Array
const pdf = await labelisk.renderPdf(format); // vector PDF
await labelisk.renderToFile(format, 'label.png'); // writes the file
await labelisk.renderToFile(format, 'label.pdf'); // .pdf writes a vector PDF
const r = await labelisk.renderJson(format, { station: 'B' });
console.log(r.stations, r.warnings);
Python
Standard library only, Python 3.9+.
from labelisk import Labelisk
labelisk = Labelisk(key="lk_xxx")
png = labelisk.render(fmt) # bytes
pdf = labelisk.render_pdf(fmt) # vector PDF
labelisk.render_to_file(fmt, "label.png")
labelisk.render_to_file(fmt, "label.pdf") # .pdf writes a vector PDF
r = labelisk.render_json(fmt, station="B")
print(r["stations"], r["warnings"])
Both libraries consist of a single file with no dependencies, available in the sdk/ folder of the project.