Conversions

Synchronous conversion endpoints. Request body is raw payload (PDF binary, ZPL text, or EPL text/binary), not JSON.

Contents: PDF to ZPL · ZPL to PDF · EPL to ZPL · EPL to PDF · ZPL to EPL · DPL to ZPL · DPL to PDF · ZPL to DPL · IPL to ZPL · IPL to PDF · ZPL to IPL · TSPL to ZPL · TSPL to PDF · ZPL to TSPL · SBPL to ZPL · SBPL to PDF · ZPL to SBPL · Common Parameters · Estimate Cost


POST /v1/convert/pdf-to-zpl

Idempotent: yes (requires Idempotency-Key header)
Content-Type: application/pdf
Max body size: 5 MB

Query Parameters

Parameter Type Default Description
dpi int 203 203 or 300
max_kb int - Max KB per page
fit string contain contain, cover, stretch
width float - Label width
height float - Label height
unit string mm mm or in

Pricing (per page)

PDF→ZPL uses flat cost-based pricing: the same token cost regardless of output quality (maxKB).
You choose the quality you need without worrying about token budget.

DPI Tokens
203 3
300 4

Note: maxKB still affects output size budget. The allow_degrade parameter controls whether the system reduces quality to fit the budget.

Response

{
  "request_id": "sync:pdf2zpl:abc123",
  "pages": [
    {
      "index": 0,
      "zpl_base64": "XlpB..."
    }
  ],
  "tokens_charged": 2,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:pdf_to_zpl none convertPDFToZPL

The calling key must carry convert:pdf_to_zpl once deny-by-default mode is active. With legacy wildcard scopes (pre-transition) the request is allowed. A locked key (no scope grants) returns 403 INSUFFICIENT_SCOPE. See Authentication for the full model.

Self-service key issuance: POST /v1/apikeys.

Example

curl -X POST "https://api.zplflow.io/v1/convert/pdf-to-zpl?dpi=203&max_kb=64" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: application/pdf" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary @label.pdf
import requests

with open("label.pdf", "rb") as f:
    resp = requests.post(
        "https://api.zplflow.io/v1/convert/pdf-to-zpl?dpi=203&max_kb=64",
        headers={
            "Authorization": "Bearer lb_xxxx",
            "Content-Type": "application/pdf",
            "Idempotency-Key": "pdf-conv-001",
        },
        data=f
    )
data = resp.json()
for page in data["pages"]:
    print(f"Page {page['index']}: {page['zpl_base64'][:40]}...")
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "os"
)

func main() {
    pdf, _ := os.ReadFile("label.pdf")
    req, _ := http.NewRequest("POST",
        "https://api.zplflow.io/v1/convert/pdf-to-zpl?dpi=203&max_kb=64",
        io.NopCloser(bytes.NewReader(pdf)))
    req.Header.Set("Authorization", "Bearer lb_xxxx")
    req.Header.Set("Content-Type", "application/pdf")
    req.Header.Set("Idempotency-Key", "pdf-conv-001")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    var data struct {
        Pages []struct {
            Index     int    `json:"index"`
            ZPLBase64 string `json:"zpl_base64"`
        } `json:"pages"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    for _, p := range data.Pages {
        fmt.Printf("Page %d: %s...\n", p.Index, p.ZPLBase64[:40])
    }
}
<?php
$pdf = file_get_contents("label.pdf");
$ch = curl_init("https://api.zplflow.io/v1/convert/pdf-to-zpl?dpi=203&max_kb=64");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $pdf);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer lb_xxxx",
    "Content-Type: application/pdf",
    "Idempotency-Key: pdf-conv-001"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
foreach ($data['pages'] as $page) {
    echo "Page {$page['index']}: " . substr($page['zpl_base64'], 0, 40) . "...\n";
}

AS400 / SQL Native (IBM i)


SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/pdf-to-zpl?dpi=203&max_kb=64',
    SYSTOOLS.IFS_READ('/tmp/label.pdf'),
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"application/pdf","Idempotency-Key":"pdf-conv-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)


dcl-s response varchar(65000);
dcl-s rc int(10);

rc = http_put_raw(
    'https://api.zplflow.io/v1/convert/pdf-to-zpl?dpi=203&max_kb=64'
    : '/tmp/label.pdf'
    : 'application/pdf'
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Idempotency-Key: pdf-conv-001'
    : 30000);

POST /v1/convert/zpl-to-pdf

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain
Max body size: 512 KB
Cost: 1 token (fixed)

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Dot density: 6dpmm, 8dpmm, 12dpmm, 24dpmm
width float 101.6 Label width in unit
height float 152.4 Label height in unit
unit string mm mm or in
index int - Extract specific label

Response

{
  "request_id": "sync:zpl2pdf:abc123",
  "pages": [
    {
      "index": 0,
      "pdf_base64": "JVBERi0..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:zpl_to_pdf none convertZPLToPDF

The calling key must carry convert:zpl_to_pdf once deny-by-default mode is active. With legacy wildcard scopes (pre-transition) the request is allowed. A locked key (no scope grants) returns 403 INSUFFICIENT_SCOPE. See Authentication for the full model.

Example

curl -X POST "https://api.zplflow.io/v1/convert/zpl-to-pdf" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '^XA^FO50,50^A0N,30,30^FDHello World^FS^XZ'
import base64
import requests

zpl = "^XA^FO50,50^A0N,30,30^FDHello World^FS^XZ"
resp = requests.post(
    "https://api.zplflow.io/v1/convert/zpl-to-pdf",
    headers={
        "Authorization": "Bearer lb_xxxx",
        "Content-Type": "text/plain",
        "Idempotency-Key": "zpl-conv-001",
    },
    data=zpl
)
data = resp.json()
pdf = base64.b64decode(data["pages"][0]["pdf_base64"])
with open("output.pdf", "wb") as f:
    f.write(pdf)
package main

import (
    "encoding/base64"
    "encoding/json"
    "io"
    "net/http"
    "os"
    "strings"
)

func main() {
    zpl := "^XA^FO50,50^A0N,30,30^FDHello World^FS^XZ"
    req, _ := http.NewRequest("POST",
        "https://api.zplflow.io/v1/convert/zpl-to-pdf",
        strings.NewReader(zpl))
    req.Header.Set("Authorization", "Bearer lb_xxxx")
    req.Header.Set("Content-Type", "text/plain")
    req.Header.Set("Idempotency-Key", "zpl-conv-001")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    var data struct {
        Pages []struct {
            PDFBase64 string `json:"pdf_base64"`
        } `json:"pages"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    pdf, _ := base64.StdEncoding.DecodeString(data.Pages[0].PDFBase64)
    os.WriteFile("output.pdf", pdf, 0644)
}
<?php
$zpl = '^XA^FO50,50^A0N,30,30^FDHello World^FS^XZ';
$ch = curl_init("https://api.zplflow.io/v1/convert/zpl-to-pdf");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $zpl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer lb_xxxx",
    "Content-Type: text/plain",
    "Idempotency-Key: zpl-conv-001"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
file_put_contents('output.pdf', base64_decode($data['pages'][0]['pdf_base64']));

AS400 / SQL Native (IBM i)


SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/zpl-to-pdf',
    '^XA^FO50,50^A0N,30,30^FDHello World^FS^XZ',
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"text/plain","Idempotency-Key":"zpl-conv-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)


dcl-s zpl varchar(200);
dcl-s response varchar(32000);
dcl-s rc int(10);

zpl = '^XA^FO50,50^A0N,30,30^FDHello World^FS^XZ';

rc = http_req('POST'
    : 'https://api.zplflow.io/v1/convert/zpl-to-pdf'
    : *null
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Content-Type: text/plain'
    : 'Idempotency-Key: zpl-conv-001'
    : 30000
    : %trim(zpl));

POST /v1/convert/epl-to-zpl

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 1 token (fixed per label)

Convert an EPL2 (Eltron Programming Language) label stream into standard ZPL II format. The transpiler converts text, barcodes, geometry, and direct graphic buffers into vector ZPL II instructions. Vintage codepages (such as CP850 accents) are translated and encoded with ^CI28 UTF-8 character maps.

Response

{
  "request_id": "sync:epl2zpl:abc123",
  "pages": [
    {
      "index": 0,
      "zpl_base64": "XlhBCg=="
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:epl_to_zpl none convertEPLToZPL

The calling key must carry convert:epl_to_zpl once deny-by-default mode is active.

Example

curl -X POST "https://api.zplflow.io/v1/convert/epl-to-zpl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary $'N\nq812\nQ1218,24\nA50,100,0,2,1,1,N,"SHIPPING LABEL"\nB50,200,0,1,2,5,80,B,"TRACK123"\nP1\n'
import base64
import requests

epl = 'N\nq812\nQ1218,24\nA50,100,0,2,1,1,N,"SHIPPING LABEL"\nB50,200,0,1,2,5,80,B,"TRACK123"\nP1\n'
resp = requests.post(
    "https://api.zplflow.io/v1/convert/epl-to-zpl",
    headers={
        "Authorization": "Bearer lb_xxxx",
        "Content-Type": "text/plain",
        "Idempotency-Key": "epl-conv-001",
    },
    data=epl.encode("latin-1")
)
data = resp.json()
zpl = base64.b64decode(data["pages"][0]["zpl_base64"]).decode("utf-8")
print(zpl)
package main

import (
    "bytes"
    "encoding/base64"
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    epl := []byte("N\nq812\nQ1218,24\nA50,100,0,2,1,1,N,\"SHIPPING LABEL\"\nP1\n")
    req, _ := http.NewRequest("POST", "https://api.zplflow.io/v1/convert/epl-to-zpl", bytes.NewReader(epl))
    req.Header.Set("Authorization", "Bearer lb_xxxx")
    req.Header.Set("Content-Type", "text/plain")
    req.Header.Set("Idempotency-Key", "epl-conv-001")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    var data struct {
        Pages []struct {
            Index     int    `json:"index"`
            ZPLBase64 string `json:"zpl_base64"`
        } `json:"pages"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    zpl, _ := base64.StdEncoding.DecodeString(data.Pages[0].ZPLBase64)
    fmt.Println(string(zpl))
}
<?php
$epl = "N\nq812\nQ1218,24\nA50,100,0,2,1,1,N,\"SHIPPING LABEL\"\nP1\n";
$ch = curl_init("https://api.zplflow.io/v1/convert/epl-to-zpl");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $epl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer lb_xxxx",
    "Content-Type: text/plain",
    "Idempotency-Key: epl-conv-001"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
echo base64_decode($data['pages'][0]['zpl_base64']);

AS400 / SQL Native (IBM i)

SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/epl-to-zpl',
    'N' || CHR(10) || 'q812' || CHR(10) || 'A50,100,0,2,1,1,N,"SHIPPING LABEL"' || CHR(10) || 'P1' || CHR(10),
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"text/plain","Idempotency-Key":"epl-conv-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)

dcl-s epl varchar(200);
dcl-s response varchar(32000);
dcl-s rc int(10);

epl = 'N' + x'25' + 'q812' + x'25' + 'A50,100,0,2,1,1,N,"SHIPPING LABEL"' + x'25' + 'P1' + x'25';

rc = http_req('POST'
    : 'https://api.zplflow.io/v1/convert/epl-to-zpl'
    : *null
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Content-Type: text/plain'
    : 'Idempotency-Key: epl-conv-001'
    : 30000
    : %trim(epl));

POST /v1/convert/epl-to-pdf

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 1 token (fixed per label)

Convert an EPL2 label stream into PDF documents via the internal high-speed ZPL pipeline.

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Dot density: 6dpmm, 8dpmm, 12dpmm, 24dpmm
width float 101.6 Label width in unit
height float 152.4 Label height in unit
unit string mm mm or in
index int - Extract specific label

Response

{
  "request_id": "sync:epl2pdf:abc123",
  "pages": [
    {
      "index": 0,
      "pdf_base64": "JVBERi0..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:epl_to_pdf none convertEPLToPDF

The calling key must carry convert:epl_to_pdf once deny-by-default mode is active.

Example

curl -X POST "https://api.zplflow.io/v1/convert/epl-to-pdf" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary @label.epl
import base64
import requests

with open("label.epl", "rb") as f:
    resp = requests.post(
        "https://api.zplflow.io/v1/convert/epl-to-pdf",
        headers={
            "Authorization": "Bearer lb_xxxx",
            "Content-Type": "text/plain",
            "Idempotency-Key": "epl2pdf-001",
        },
        data=f
    )
data = resp.json()
pdf = base64.b64decode(data["pages"][0]["pdf_base64"])
with open("output.pdf", "wb") as out:
    out.write(pdf)
package main

import (
    "bytes"
    "encoding/base64"
    "encoding/json"
    "net/http"
    "os"
)

func main() {
    epl, _ := os.ReadFile("label.epl")
    req, _ := http.NewRequest("POST", "https://api.zplflow.io/v1/convert/epl-to-pdf", bytes.NewReader(epl))
    req.Header.Set("Authorization", "Bearer lb_xxxx")
    req.Header.Set("Content-Type", "text/plain")
    req.Header.Set("Idempotency-Key", "epl2pdf-001")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    var data struct {
        Pages []struct {
            Index     int    `json:"index"`
            PDFBase64 string `json:"pdf_base64"`
        } `json:"pages"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    pdf, _ := base64.StdEncoding.DecodeString(data.Pages[0].PDFBase64)
    os.WriteFile("output.pdf", pdf, 0644)
}
<?php
$epl = file_get_contents("label.epl");
$ch = curl_init("https://api.zplflow.io/v1/convert/epl-to-pdf");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $epl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer lb_xxxx",
    "Content-Type: text/plain",
    "Idempotency-Key: epl2pdf-001"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
file_put_contents("output.pdf", base64_decode($data['pages'][0]['pdf_base64']));

AS400 / SQL Native (IBM i)

SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/epl-to-pdf',
    SYSTOOLS.IFS_READ('/tmp/label.epl'),
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"text/plain","Idempotency-Key":"epl2pdf-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)

dcl-s response varchar(65000);
dcl-s rc int(10);

rc = http_put_raw(
    'https://api.zplflow.io/v1/convert/epl-to-pdf'
    : '/tmp/label.epl'
    : 'text/plain'
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Idempotency-Key: epl2pdf-001'
    : 30000);

POST /v1/convert/zpl-to-epl

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 4 tokens (1 base + 3 heavy rasterization surcharge)

Convert a modern ZPL II label stream into legacy EPL2 printer commands. The engine renders the label canvas at 203 DPI (8 dpmm) and packages the graphic into an EPL2 GW (Graphics Write) binary bit-packed stream.

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Target density: 8dpmm (203 DPI)
width float 101.6 Label width in mm
height float 152.4 Label height in mm

Response

{
  "request_id": "sync:zpl2epl:abc123",
  "pages": [
    {
      "index": 0,
      "epl_base64": "TgpR..."
    }
  ],
  "tokens_charged": 4,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:zpl_to_epl none convertZPLToEPL

The calling key must carry convert:zpl_to_epl once deny-by-default mode is active.

Example

curl -X POST "https://api.zplflow.io/v1/convert/zpl-to-epl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '^XA^FO50,50^A0N,30,30^FDTo Legacy EPL Printer^FS^XZ'
import base64
import requests

zpl = "^XA^FO50,50^A0N,30,30^FDTo Legacy EPL Printer^FS^XZ"
resp = requests.post(
    "https://api.zplflow.io/v1/convert/zpl-to-epl",
    headers={
        "Authorization": "Bearer lb_xxxx",
        "Content-Type": "text/plain",
        "Idempotency-Key": "zpl2epl-001",
    },
    data=zpl
)
data = resp.json()
epl = base64.b64decode(data["pages"][0]["epl_base64"])
with open("label.epl", "wb") as f:
    f.write(epl)
package main

import (
    "bytes"
    "encoding/base64"
    "encoding/json"
    "net/http"
    "os"
)

func main() {
    zpl := []byte("^XA^FO50,50^A0N,30,30^FDTo Legacy EPL Printer^FS^XZ")
    req, _ := http.NewRequest("POST", "https://api.zplflow.io/v1/convert/zpl-to-epl", bytes.NewReader(zpl))
    req.Header.Set("Authorization", "Bearer lb_xxxx")
    req.Header.Set("Content-Type", "text/plain")
    req.Header.Set("Idempotency-Key", "zpl2epl-001")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    var data struct {
        Pages []struct {
            Index     int    `json:"index"`
            EPLBase64 string `json:"epl_base64"`
        } `json:"pages"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    epl, _ := base64.StdEncoding.DecodeString(data.Pages[0].EPLBase64)
    os.WriteFile("label.epl", epl, 0644)
}
<?php
$zpl = "^XA^FO50,50^A0N,30,30^FDTo Legacy EPL Printer^FS^XZ";
$ch = curl_init("https://api.zplflow.io/v1/convert/zpl-to-epl");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $zpl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer lb_xxxx",
    "Content-Type: text/plain",
    "Idempotency-Key: zpl2epl-001"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
file_put_contents("label.epl", base64_decode($data['pages'][0]['epl_base64']));

AS400 / SQL Native (IBM i)

SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/zpl-to-epl',
    '^XA^FO50,50^A0N,30,30^FDTo Legacy EPL Printer^FS^XZ',
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"text/plain","Idempotency-Key":"zpl2epl-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)

dcl-s zpl varchar(200);
dcl-s response varchar(65000);
dcl-s rc int(10);

zpl = '^XA^FO50,50^A0N,30,30^FDTo Legacy EPL Printer^FS^XZ';

rc = http_req('POST'
    : 'https://api.zplflow.io/v1/convert/zpl-to-epl'
    : *null
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Content-Type: text/plain'
    : 'Idempotency-Key: zpl2epl-001'
    : 30000
    : %trim(zpl));

POST /v1/convert/dpl-to-zpl

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 1 token (fixed per label)

Convert a Datamax DPL (Datamax Programming Language) label stream into standard ZPL II format. The transpiler converts text (with full font metrics and baseline alignment), 1D barcodes (Code 128, Code 39, EAN/UPC, Interleaved 2 of 5), 2D barcodes (QR Code), boxes/lines, and direct graphic buffers into vector ZPL II instructions. Vintage codepages (such as CP850 accents) are translated and encoded with ^CI28 UTF-8 character maps. Both raw control bytes (\x02 STX, \x01 SOH) and human-readable tokens (<STX>, <SOH>) are supported.

Response

{
  "request_id": "sync:dpl2zpl:abc123",
  "pages": [
    {
      "index": 0,
      "zpl_base64": "XlpB..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:dpl_to_zpl none convertDPLToZPL

The calling key must carry convert:dpl_to_zpl once deny-by-default mode is active.

Example

curl -X POST "https://api.zplflow.io/v1/convert/dpl-to-zpl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary $'<STX>L\n121100001000050Datamax Shipping\n1E0000000500050A12345678\nE\n'
import base64
import requests

dpl = "<STX>L\n121100001000050Datamax Shipping\n1E0000000500050A12345678\nE\n"
resp = requests.post(
    "https://api.zplflow.io/v1/convert/dpl-to-zpl",
    headers={
        "Authorization": "Bearer lb_xxxx",
        "Content-Type": "text/plain",
        "Idempotency-Key": "dpl-conv-001",
    },
    data=dpl
)
data = resp.json()
zpl = base64.b64decode(data["pages"][0]["zpl_base64"]).decode("utf-8")
print(zpl)
package main

import (
    "bytes"
    "encoding/base64"
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    dpl := []byte("<STX>L\n121100001000050Datamax Shipping\n1E0000000500050A12345678\nE\n")
    req, _ := http.NewRequest("POST", "https://api.zplflow.io/v1/convert/dpl-to-zpl", bytes.NewReader(dpl))
    req.Header.Set("Authorization", "Bearer lb_xxxx")
    req.Header.Set("Content-Type", "text/plain")
    req.Header.Set("Idempotency-Key", "dpl-conv-001")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    var data struct {
        Pages []struct {
            Index     int    `json:"index"`
            ZPLBase64 string `json:"zpl_base64"`
        } `json:"pages"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    zpl, _ := base64.StdEncoding.DecodeString(data.Pages[0].ZPLBase64)
    fmt.Println(string(zpl))
}
<?php
$dpl = "<STX>L\n121100001000050Datamax Shipping\n1E0000000500050A12345678\nE\n";
$ch = curl_init("https://api.zplflow.io/v1/convert/dpl-to-zpl");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $dpl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer lb_xxxx",
    "Content-Type: text/plain",
    "Idempotency-Key: dpl-conv-001"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
echo base64_decode($data['pages'][0]['zpl_base64']);

AS400 / SQL Native (IBM i)

SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/dpl-to-zpl',
    CHR(2) || 'L' || CHR(10) || '121100001000050Datamax Shipping' || CHR(10) || 'E' || CHR(10),
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"text/plain","Idempotency-Key":"dpl-conv-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)

dcl-s dpl varchar(200);
dcl-s response varchar(32000);
dcl-s rc int(10);

dpl = x'02' + 'L' + x'0A' + '121100001000050Datamax Shipping' + x'0A' + 'E' + x'0A';

rc = http_req('POST'
    : 'https://api.zplflow.io/v1/convert/dpl-to-zpl'
    : *null
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Content-Type: text/plain'
    : 'Idempotency-Key: dpl-conv-001'
    : 30000
    : %trim(dpl));

POST /v1/convert/dpl-to-pdf

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 1 token (fixed per label)

Convert a Datamax DPL label stream directly into PDF documents via the internal high-speed ZPL pipeline.

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Dot density: 6dpmm, 8dpmm, 12dpmm, 24dpmm
width float 101.6 Label width in unit
height float 152.4 Label height in unit
unit string mm mm or in
index int - Extract specific label

Response

{
  "request_id": "sync:dpl2pdf:abc123",
  "pages": [
    {
      "index": 0,
      "pdf_base64": "JVBERi0..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:dpl_to_pdf none convertDPLToPDF

The calling key must carry convert:dpl_to_pdf once deny-by-default mode is active.

Example

curl -X POST "https://api.zplflow.io/v1/convert/dpl-to-pdf" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary $'<STX>L\n121100001000050Datamax Shipping\nE\n'

AS400 / SQL Native (IBM i)

SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/dpl-to-pdf',
    SYSTOOLS.IFS_READ('/tmp/label.dpl'),
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"text/plain","Idempotency-Key":"dpl-conv-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)

dcl-s response varchar(65000);
dcl-s rc int(10);

rc = http_put_raw(
    'https://api.zplflow.io/v1/convert/dpl-to-pdf'
    : '/tmp/label.dpl'
    : 'text/plain'
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Idempotency-Key: dpl-conv-001'
    : 30000);

POST /v1/convert/zpl-to-dpl

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 4 tokens (1 base + 3 heavy rasterization surcharge)

Convert a modern ZPL II label stream into legacy Datamax DPL printer commands. The engine renders the label canvas at 203 DPI (8 dpmm) and packages the graphic into a Datamax <STX>IDH... format with <STX>L and 1Y... 1-bit monochrome raster stream.

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Target density: 8dpmm (203 DPI)
width float 101.6 Label width in mm
height float 152.4 Label height in mm

Response

{
  "request_id": "sync:zpl2dpl:abc123",
  "pages": [
    {
      "index": 0,
      "dpl_base64": "AlN..."
    }
  ],
  "tokens_charged": 4,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:zpl_to_dpl none convertZPLToDPL

The calling key must carry convert:zpl_to_dpl once deny-by-default mode is active.

Example

curl -X POST "https://api.zplflow.io/v1/convert/zpl-to-dpl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '^XA^FO50,50^A0N,30,30^FDTo Legacy Datamax Printer^FS^XZ'
import base64
import requests

zpl = "^XA^FO50,50^A0N,30,30^FDTo Legacy Datamax Printer^FS^XZ"
resp = requests.post(
    "https://api.zplflow.io/v1/convert/zpl-to-dpl",
    headers={
        "Authorization": "Bearer lb_xxxx",
        "Content-Type": "text/plain",
        "Idempotency-Key": "zpl2dpl-001",
    },
    data=zpl
)
data = resp.json()
dpl = base64.b64decode(data["pages"][0]["dpl_base64"])
with open("label.dpl", "wb") as f:
    f.write(dpl)
package main

import (
    "bytes"
    "encoding/base64"
    "encoding/json"
    "net/http"
    "os"
)

func main() {
    zpl := []byte("^XA^FO50,50^A0N,30,30^FDTo Legacy Datamax Printer^FS^XZ")
    req, _ := http.NewRequest("POST", "https://api.zplflow.io/v1/convert/zpl-to-dpl", bytes.NewReader(zpl))
    req.Header.Set("Authorization", "Bearer lb_xxxx")
    req.Header.Set("Content-Type", "text/plain")
    req.Header.Set("Idempotency-Key", "zpl2dpl-001")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    var data struct {
        Pages []struct {
            Index     int    `json:"index"`
            DPLBase64 string `json:"dpl_base64"`
        } `json:"pages"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    dpl, _ := base64.StdEncoding.DecodeString(data.Pages[0].DPLBase64)
    os.WriteFile("label.dpl", dpl, 0644)
}
<?php
$zpl = "^XA^FO50,50^A0N,30,30^FDTo Legacy Datamax Printer^FS^XZ";
$ch = curl_init("https://api.zplflow.io/v1/convert/zpl-to-dpl");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $zpl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer lb_xxxx",
    "Content-Type: text/plain",
    "Idempotency-Key: zpl2dpl-001"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
file_put_contents('label.dpl', base64_decode($data['pages'][0]['dpl_base64']));

AS400 / SQL Native (IBM i)

SELECT SYSTOOLS.HTTPPOSTCLOB(
    'https://api.zplflow.io/v1/convert/zpl-to-dpl',
    '^XA^FO50,50^A0N,30,30^FDTo Legacy Datamax Printer^FS^XZ',
    '{"Authorization":"Bearer lb_xxxx","Content-Type":"text/plain","Idempotency-Key":"zpl2dpl-001"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)

dcl-s zpl varchar(200);
dcl-s response varchar(65000);
dcl-s rc int(10);

zpl = '^XA^FO50,50^A0N,30,30^FDTo Legacy Datamax Printer^FS^XZ';

rc = http_req('POST'
    : 'https://api.zplflow.io/v1/convert/zpl-to-dpl'
    : *null
    : %trim(response)
    : 'Authorization: Bearer lb_xxxx'
    : 'Content-Type: text/plain'
    : 'Idempotency-Key: zpl2dpl-001'
    : 30000
    : %trim(zpl));

POST /v1/convert/ipl-to-zpl

Convert Intermec Printer Language (IPL) stream into Zebra ZPL-II.

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 1 token (fixed)

Required API key scopes

Scope ID Tenant feature MCP tool
convert:ipl_to_zpl none convertIPLToZPL

The calling key must carry convert:ipl_to_zpl once deny-by-default mode is active.

Response

{
  "request_id": "sync:ipl2zpl:abc123",
  "pages": [
    {
      "index": 0,
      "zpl_base64": "XlpB..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Example

curl -X POST "https://api.zplflow.io/v1/convert/ipl-to-zpl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '<STX><ESC>C<ETX><STX><ESC>P<ETX><STX>E1;F1;<ETX><STX>H0;o10,10;f0;c0;d3,TEST;<ETX><STX>R;<ETX>'

POST /v1/convert/ipl-to-pdf

Convert Intermec Printer Language (IPL) payload directly to PDF (via ZPL intermediate vector pipeline).

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Dot density: 8dpmm (203 DPI) or 12dpmm (300 DPI)

Pricing (per request)

DPMM DPI Tokens
8dpmm 203 DPI 1
12dpmm 300 DPI 2

Required API key scopes

Scope ID Tenant feature MCP tool
convert:ipl_to_pdf none convertIPLToPDF

Response

{
  "request_id": "sync:ipl2pdf:abc123",
  "pages": [
    {
      "index": 0,
      "pdf_base64": "JVBERi0..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Example

curl -X POST "https://api.zplflow.io/v1/convert/ipl-to-pdf?dpmm=8dpmm" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '<STX><ESC>C<ETX><STX><ESC>P<ETX><STX>E1;F1;<ETX><STX>H0;o10,10;f0;c0;d3,TEST;<ETX><STX>R;<ETX>'

POST /v1/convert/zpl-to-ipl

Convert Zebra ZPL-II labels into an Intermec IPL graphic stream for legacy Intermec printers.

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 512 KB
Cost: 4 tokens (fixed)

Required API key scopes

Scope ID Tenant feature MCP tool
convert:zpl_to_ipl none convertZPLToIPL

Response

{
  "request_id": "sync:zpl2ipl:abc123",
  "pages": [
    {
      "index": 0,
      "ipl_base64": "PFNUWD4..."
    }
  ],
  "tokens_charged": 4,
  "over_budget_tokens": 0
}

Example

curl -X POST "https://api.zplflow.io/v1/convert/zpl-to-ipl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '^XA^FO50,50^A0N,30,30^FDHello World^FS^XZ'

POST /v1/convert/tspl-to-zpl

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain
Max body size: 512 KB
Cost: 1 token (fixed)

Converts TSPL / TSPL2 thermal printer commands to standard ZPL II in-memory vector format with sub-5ms latency. Automatically injects ^CI28 UTF-8 encoding when non-ASCII characters are detected.

Response

{
  "request_id": "sync:tspl2zpl:abc123",
  "pages": [
    {
      "index": 0,
      "zpl_base64": "XlpB..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:tspl_to_zpl none convertTSPLToZPL

The calling key must carry convert:tspl_to_zpl once deny-by-default mode is active.

Example

curl -X POST "https://api.zplflow.io/v1/convert/tspl-to-zpl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary $'SIZE 100 mm, 150 mm\nCLS\nTEXT 50,50,"3",0,1,1,"Hello TSPL"\nPRINT 1,1\n'

POST /v1/convert/tspl-to-pdf

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain
Max body size: 512 KB
Cost: 1 token (fixed)

Converts TSPL / TSPL2 directly to PDF via the high-speed pure-Go rendering pipeline.

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Dot density: 6dpmm, 8dpmm, 12dpmm, 24dpmm
width float 101.6 Label width in unit
height float 152.4 Label height in unit
unit string mm mm or in
index int - Extract specific label

Response

{
  "request_id": "sync:tspl2pdf:abc123",
  "pages": [
    {
      "index": 0,
      "pdf_base64": "JVBERi0..."
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:tspl_to_pdf none convertTSPLToPDF

POST /v1/convert/zpl-to-tspl

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain
Max body size: 512 KB
Cost: 4 tokens (1 base + 3 heavy rasterizer)

Converts ZPL II labels to TSPL / TSPL2 via high-fidelity 1-bit monochrome rasterization (BITMAP x,y,width_bytes,height_dots,0,<data>). Guarantees 100% visual fidelity for complex ZPL elements (such as ^FB text formatting, reversed blocks, and custom printer fonts).

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Dot density: 8dpmm (203 DPI) or 12dpmm (300 DPI)
width float 101.6 Label width in millimeters
height float 152.4 Label height in millimeters

Response

{
  "request_id": "sync:zpl2tspl:abc123",
  "pages": [
    {
      "index": 0,
      "tspl_base64": "U0laRSA..."
    }
  ],
  "tokens_charged": 4,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:zpl_to_tspl none convertZPLToTSPL

Example

curl -X POST "https://api.zplflow.io/v1/convert/zpl-to-tspl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '^XA^FO50,50^A0N,30,30^FDHello TSPL^FS^XZ'

POST /v1/convert/sbpl-to-zpl

Convert SATO SBPL (SATO Barcode Printer Language) commands directly into clean, vector ZPL II text.

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 5 MB

Pricing

Flat 1 token per conversion request.

Response

{
  "request_id": "sync:sbpl2zpl:abc123",
  "pages": [
    {
      "index": 0,
      "zpl_base64": "XlhBXkZPMTAwLDEwMFhUTUVTU0FHRV5GU15YWg=="
    }
  ],
  "tokens_charged": 1,
  "over_budget_tokens": 0
}

Required API key scopes

Scope ID Tenant feature MCP tool
convert:sbpl_to_zpl none convertSBPLToZPL

Example

curl -X POST "https://api.zplflow.io/v1/convert/sbpl-to-zpl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary $'\x1bA\x1bV0100\x1bH0100\x1bXUTEST LABEL\x1bQ1\x1bZ'

POST /v1/convert/sbpl-to-pdf

Transpiles SATO SBPL into ZPL and renders it directly into a high-fidelity PDF document in pure Go (no CGO, sub-50ms latency).

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 5 MB

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Print density: 8dpmm (203 DPI) or 12dpmm (300 DPI)
width float - Optional explicit label width
height float - Optional explicit label height
index int - Zero-based index to render specific label page

Pricing

Flat 1 token per conversion request.

Required API key scopes

Scope ID Tenant feature MCP tool
convert:sbpl_to_pdf none convertSBPLToPDF

Example

curl -X POST "https://api.zplflow.io/v1/convert/sbpl-to-pdf?dpmm=8dpmm" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary $'\x1bA\x1bV0100\x1bH0100\x1bXUTEST\x1bQ1\x1bZ'

POST /v1/convert/zpl-to-sbpl

High-fidelity monochrome rasterization of Zebra ZPL II into native SATO SBPL graphics commands (<ESC>GH / <ESC>GM). Guarantees 100% visual parity for complex Zebra layouts when printing on SATO thermal printers.

Idempotent: yes (requires Idempotency-Key header)
Content-Type: text/plain or application/octet-stream
Max body size: 5 MB

Query Parameters

Parameter Type Default Description
dpmm string 8dpmm Print density: 8dpmm (203 DPI) or 12dpmm (300 DPI)
width float - Label width in millimeters
height float - Label height in millimeters

Pricing

4 tokens per conversion (1 base token + 3 heavy rasterization surcharge).

Required API key scopes

Scope ID Tenant feature MCP tool
convert:zpl_to_sbpl none convertZPLToSBPL

Example

curl -X POST "https://api.zplflow.io/v1/convert/zpl-to-sbpl" \
  -H "Authorization: Bearer lb_xxxx" \
  -H "Content-Type: text/plain" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data-binary '^XA^FO50,50^A0N,30,30^FDHello SATO^FS^XZ'

Common Parameters

These params are used by both sync conversions and async jobs:

Field Type Used by Description
dpi int pdf_to_zpl 203 or 300
max_kb int pdf_to_zpl Max KB per page
fit string pdf_to_zpl contain, cover, stretch
allow_degrade bool pdf_to_zpl Allow quality degradation when budget is low. Reduces DPI or KB threshold to fit within available tokens.
compat_mode bool pdf_to_zpl Enable legacy ZPL compatibility mode for older printer models. May produce larger output.
width float pdf_to_zpl, zpl_to_pdf, epl_to_zpl, epl_to_pdf, zpl_to_epl, tspl_to_pdf, zpl_to_tspl, sbpl_to_pdf, zpl_to_sbpl Width in unit or mm
height float pdf_to_zpl, zpl_to_pdf, epl_to_zpl, epl_to_pdf, zpl_to_epl, tspl_to_pdf, zpl_to_tspl, sbpl_to_pdf, zpl_to_sbpl Height in unit or mm
unit string pdf_to_zpl, zpl_to_pdf, epl_to_zpl, epl_to_pdf, zpl_to_epl, tspl_to_pdf mm or in
dpmm string zpl_to_pdf, epl_to_zpl, epl_to_pdf, zpl_to_epl, ipl_to_pdf, tspl_to_pdf, zpl_to_tspl, sbpl_to_pdf, zpl_to_sbpl Dot density: 6dpmm, 8dpmm, 12dpmm, 24dpmm
index int zpl_to_pdf, epl_to_zpl, epl_to_pdf, zpl_to_epl, tspl_to_pdf, sbpl_to_pdf Label index to extract
pipeline_id string pipeline_run Saved pipeline ID

POST /v1/estimate — Pre-Calculate Cost

Estimate token cost without executing the operation or spending tokens.

Idempotent: no (no token charge)
Content-Type: application/json

Required API key scopes

Scope ID Tenant feature MCP tool
convert:estimate none estimateCost

The calling key must carry convert:estimate once deny-by-default mode is active. With legacy wildcard scopes (pre-transition) the request is allowed. A locked key (no scope grants) returns 403 INSUFFICIENT_SCOPE. Note that convert:estimate does not imply the corresponding conversion scope — to actually run the conversion the key also needs the target operation scope (such as convert:pdf_to_zpl, convert:zpl_to_pdf, convert:epl_to_zpl, convert:epl_to_pdf, convert:zpl_to_epl, convert:dpl_to_zpl, convert:dpl_to_pdf, convert:zpl_to_dpl, convert:ipl_to_zpl, convert:ipl_to_pdf, convert:zpl_to_ipl, convert:tspl_to_zpl, convert:tspl_to_pdf, convert:zpl_to_tspl, convert:sbpl_to_zpl, convert:sbpl_to_pdf, or convert:zpl_to_sbpl).

Request

{
  "operation": "pdf_to_zpl",
  "params": {
    "dpi": 203,
    "max_kb": 64
  },
  "document_count": 3
}
Field Type Description
operation string pdf_to_zpl, zpl_to_pdf, epl_to_zpl, epl_to_pdf, zpl_to_epl, dpl_to_zpl, dpl_to_pdf, zpl_to_dpl, ipl_to_zpl, ipl_to_pdf, zpl_to_ipl, tspl_to_zpl, tspl_to_pdf, zpl_to_tspl, sbpl_to_zpl, sbpl_to_pdf, zpl_to_sbpl, pipeline_run
params object Same params as the target endpoint
document_count int Number of pages/documents

Response

{
  "operation": "pdf_to_zpl",
  "tokens_per_unit": 2,
  "units": 3,
  "total_tokens": 6
}

Scopes in Error Responses

When a calling API key misses the scope required by an endpoint on this page, the response body is:

{
  "error_code": "INSUFFICIENT_SCOPE",
  "message": "API key is missing required scope 'convert:pdf_to_zpl'",
  "required_scope": "convert:pdf_to_zpl",
  "request_id": "f7c8e0a1-2b34-4c5d-9e8f-0123456789ab",
  "documentation_url": "https://docs.zplflow.io/docs/authentication#api-key-scopes-v11"
}

required_scope matches one of the scope IDs in the per-endpoint tables above. Fix by editing the key (revoke + re-issue) or by leaving it on the legacy wildcard path while deny-by-default mode is not yet active. Full state matrix: Authentication → API Key Scopes.


Next Steps