Label Preview
Preview a thermal label via GET. Pass the same label object as a URL-encoded JSON string in query. Inside that JSON, text items use content and size (1-10), not text or fontSize. Prefer format=png for ChatGPT.
Credit cost: 3 credits per call
format?stringUse png so ChatGPT can display the image. svg is for download or infinite scale.
"svg""svg""png"query*stringFull label config as URL-encoded JSON. Must include width and elements. Text items use content and size (1-10), not text or fontSize.
fields?stringComma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).
is_async?booleanRun the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.
falsesoft_fail?booleanReturn HTTP 200 even when the request fails; the error is in the error field of the body.
falsewidth*numberLabel width. Required. Default unit is mm. Example: 40. Do not send query instead of width.
height?numberLabel height in the same unit. Example: 30. Omit for receipt / continuous mode.
unit?stringMeasurement unit for width and height. Default mm. Use mm unless you are working in printer dots.
"mm""mm""inch""dot"dpi?numberPrinter DPI. Default 203.
gap?numberGap between labels in mm. Ignored for receipts.
speed?numberPrint speed, 1-18.
density?numberPrint darkness, 0-15.
direction?numberPrint direction. 0 = normal, 1 = reversed.
101copies?numberNumber of copies. Minimum 1.
printer?stringPrinter profile id (tsc-te210, zebra-zd420, …).
elements*array<>Required array. Text items need type=text, content, and size (1-10 magnification). Do not use text, fontSize, or type=barcode. Positions x/y are in dots. Example item: {"type":"text","content":"Order: 1042","x":10,"y":10,"size":2}.
1 <= itemslanguage?stringPrinter language for preview. Default tsc. Example: tsc or zpl.
"tsc""tsc""zpl""epl""cpcl""dpl""sbpl""escpos""starprnt""ipl"Successful response
response?filebinarycurl -X GET 'https://api.chartquery.com/v1/label?query=string&width=0&elements=%5Bobject+Object%5D'"string"