Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›ZPL Preview API

ZPL Preview API

One HTTP request turns ZPL into a label image. There is no printer in the loop, no driver to install and no account needed to try it — and when the renderer has to skip something, it says so in a response header instead of drawing a wrong label quietly.

The request

Send the ZPL as the raw request body. The path carries the print density and the label size, so the same code can be checked at the resolution the target printer actually runs at.

curl -X POST "https://labelixa.com/v1/printers/8dpmm/labels/4x6/0/" \
  -H "Content-Type: text/plain" \
  --data-binary $'^XA\n^FO50,50^A0N,40,40^FDLabelixa^FS\n^FO50,120^BY2^BCN,80,Y,N,N^FD1234567890^FS\n^XZ' \
  -o label.png -D -

What you get back

The body is the image. Everything the renderer noticed while drawing is in the headers, which is what makes the call usable from a script: a CI step can fail on a warning without parsing the picture.

Response headers

HeaderWhat it tells you
Content-Typeimage/png by default; send Accept: application/pdf for a PDF.
X-WarningsPresent only when the renderer skipped or could not fully draw something — an unknown command, a field outside the label.
X-Total-CountHow many labels the submitted code produces; an index selects one of them.
X-PlanThe plan the request was counted against — free for an anonymous call.
X-RateLimit-RemainingRenders left in the current window.

Quotas

An anonymous call is counted against the free plan and limited per IP. An API key moves the call onto the account's own quota.

PlanRequests per secondLabels per month
free35,000
starter525,000
pro10100,000
business20500,000
enterprise20by agreement

The other label languages

ZPL is not the only input. EPL, TSPL and CPCL have their own render and diagnostics endpoints, with the same idea: code in, image out, findings in a structured response.

LanguageEndpoint
ZPL/v1/printers/{dpmm}dpmm/labels/{width}x{height}/{index}/
EPL/v1/epl/render
TSPL/v1/tspl/render
CPCL/v1/cpcl/render

A preview is not a print guarantee

A renderer draws what the code says on a screen. A printer adds its own firmware, resident fonts, media and calibration. Use the preview to catch the mistakes that are in the code — a field off the label, a barcode that cannot encode its data, a command the firmware will ignore — and keep a test print for the ones that are in the hardware. No online renderer, this one included, can promise pixel identity with a physical label.

Where to go next

Open the browser preview → Read the API reference → Connect an AI assistant (MCP) →

Related pages

Frequently asked questions

Do I need an account or an API key?

No. Anonymous calls work and are rate-limited per IP. An API key is what moves a call onto an account's quota, raises the limits and lets usage be attributed.

Can I get a PDF instead of a PNG?

Yes — send Accept: application/pdf. The same request otherwise, the same path.

What happens when the ZPL contains something unsupported?

The label is still rendered and the response carries an X-Warnings header naming what was skipped. If you want the findings as JSON — with a code, a severity and a position — post the same code to the diagnostics endpoint instead.

Is a rendered preview the same as the printed label?

No, and no renderer can honestly claim that. The preview shows what the code draws; the printer adds firmware, fonts, media and calibration. It catches code mistakes, not hardware ones.