POST https://label-api.gookit.co/api/v1/render
{
"template": {
"unit": "mm",
"width": 50,
"height": 30,
"type": "ROLL",
"elements": [
{
"type": "text", "field": "name",
"x": 3, "y": 3, "width": 44, "height": 7
},
{
"type": "barcode", "field": "barcode",
"x": 3, "y": 16, "width": 44, "height": 11
}
]
},
"data": {
"name": "Organic Oats",
"barcode": "GOOKIT-SKU-2048"
}
}
Print Labels API
Turn product data into print-ready barcode labels
Send a template and your product data. Get a production-ready PNG immediately, or render a full PDF batch with the same API. The fastest way to design a template is the visual Label Editor — build the layout there, then script it with the API. See Editor access for how sign-in works.
- ✓ REST and MCP
- ✓ PNG and PDF output
- ✓ Data-bound templates
One request, real output
From data to label without rebuilding your print stack
-
01
Describe the label
Use millimetres or inches and compose text, barcode, QR code, and image elements.
-
02
Bind your data
Map any element to your own field names, then reuse the template across products.
-
03
Render and inspect
Receive the PNG plus realized layout details for clipping, font size, and ink bounds.
Quickstart
Render a PNG in under five minutes
You need a Gookit developer key and Python 3 to decode the inline
image. The command writes the API response to
label.png.
-
1
Create a developer key
Sign in, open Settings → API Keys, and copy the key when it is shown.
-
2
Paste the command
Replace the placeholder value, then run the complete block in your terminal.
-
3
Open label.png
The response also includes realized layout data for programmatic inspection.
Printing on branded stock? Don't hand-type dimensions from a vendor
PDF — pull exact geometry for thousands of Avery, Dymo, and Zebra
models from GET /api/v1/template-presets, or
start from a paper preset in the Label Editor.
export GOOKIT_API_KEY="gkdev_your_key_here"
curl --fail-with-body --silent --show-error \
https://label-api.gookit.co/api/v1/render \
-H "Authorization: Bearer ${GOOKIT_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"template": {
"unit": "mm",
"width": 50,
"height": 30,
"type": "ROLL",
"elements": [
{
"type": "text",
"x": 3, "y": 3, "width": 44, "height": 7,
"field": "name", "fontSize": 12, "bold": true
},
{
"type": "text",
"x": 3, "y": 10, "width": 44, "height": 4,
"field": "sku", "fontSize": 8
},
{
"type": "barcode",
"x": 3, "y": 16, "width": 44, "height": 11,
"field": "barcode", "barcodeType": "code128",
"showBarcodeText": true
}
]
},
"data": {
"name": "Organic Oats",
"sku": "SKU-2048",
"barcode": "GOOKIT-SKU-2048"
}
}' | \
python3 -c 'import base64,json,pathlib,sys; image=json.load(sys.stdin)["image"]["dataUri"]; pathlib.Path("label.png").write_bytes(base64.b64decode(image.split(",",1)[1])); print("Saved label.png")'
First PDF
Print a PDF batch without building a template
Starter labels are built-in designs you can print right away. Send
a starter ID and one item per product; poll the job
for the PDF. Each item's data must include the
starter's fields.
| Starter | Size | Fields | |
|---|---|---|---|
product-label-2x1 |
2 × 1 in | name price sku |
Edit |
inventory-label-4x2 |
4 × 2 in | name location sku |
Edit |
price-tag-1.5x1 |
1.5 × 1 in | name price sku |
Edit |
Starters print one label per page and sku prints as a
Code 128 barcode. They never change once published. To change a
design, click Edit to save your own copy in the
Label Editor, then send its templateId instead of
starter.
export GOOKIT_API_KEY="gkdev_your_key_here"
JOB_ID=$(curl --fail-with-body --silent --show-error \
https://label-api.gookit.co/api/v1/print \
-H "Authorization: Bearer ${GOOKIT_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"starter": "product-label-2x1",
"items": [
{
"quantity": 24,
"data": { "name": "Trail Bottle", "sku": "TB-1042", "price": "$24.00" }
}
]
}' | \
python3 -c 'import json,sys; print(json.load(sys.stdin)["jobId"])')
for attempt in $(seq 30); do
JOB=$(curl --fail-with-body --silent --show-error \
"https://label-api.gookit.co/api/v1/print/${JOB_ID}" \
-H "Authorization: Bearer ${GOOKIT_API_KEY}")
case "$JOB" in *'"completed"'*|*'"failed"'*) break ;; esac
sleep 1
done
echo "$JOB"
case "$JOB" in
*'"completed"'*|*'"failed"'*) ;;
*) echo "Job ${JOB_ID} is still rendering. Run the polling loop again." ;;
esac
url is the PDF. The link is temporary
(about 24 hours), so download it to keep it.
Editor access
Two ways to open the Label Editor
Each entry path has its own key family. A gkapp_ key
does not authenticate as a gkdev_ key, and vice
versa.
-
01
Shopify merchants
In Shopify admin, open Settings → Open API and select Open API workspace. Launch links are one-use and expire after about 60 seconds. Each launch starts a 24-hour editor session that is not renewed; when it expires, relaunch from Shopify. API keys for this path use the
gkapp_prefix and are created on the same Open API settings page. -
02
Web developers
Sign in at /login with email and password, then open /editor directly. API keys for this path use the
gkdev_prefix and are created at Settings → API Keys in the developer portal.
Design it in the browser
Start from your exact label stock, not from numbers
The Label Editor creates templates from the
built-in paper catalog — thousands of Avery, Dymo, Zebra, and
other models (also available as JSON via
the public GET /api/v1/template-presets endpoint).
Pick a model, pick one of the designed layouts, and land on a
canvas with data-bound elements already previewing sample values
— then copy the working API request straight out of the editor.
Grid rows and columns support 1–100 labels each. SHEET spacing comes from the page size, margins, and grid; ROLL2Up derives the page from label sizes and gaps, with zero margins. The catalog retains original source values, including unresolved dimension issues; some presets need paper corrections before the API accepts them. If an older saved template needs repair, open it from the list to correct its paper settings and keep the same template ID. Printing it before repair returns 422.
-
01
Pick your paper
Search the catalog by brand, model, or size — or deep-link a preset:
/editor?preset=AVERY_63.5x38.1_L7160&layout=price-tag. -
02
Pick a layout
Twelve designed starting points — price tags, QR, barcode-only, address labels — seeded as data-bound elements, not static text.
-
03
Copy it as code
Preview the exact PNG the API renders, then export the request as curl or JavaScript. Saved templates are snapshots — later catalog updates never change them.
Built for humans and agents
Give your AI tools the contract, not a screenshot
The OpenAPI document is available as machine-readable JSON. AI agents can also connect through the authenticated MCP endpoint and use the same render service as the REST API.
/openapi.json
Human referenceBrowse every endpoint and schema →/reference/
https://label-api.gookit.co/api/v1/mcp