Conversion API
Convert diagram images programmatically
Authentication
Create a key under Settings → API Keys, then send it with every request:
x-api-key: <your key>Conversions are billed to the key owner's credit balance (one credit per conversion, all formats included). Failed conversions are refunded automatically.
Create a conversion
Send raw image bytes (PNG, JPEG, or WebP):
curl -X POST https://layerback.com/api/v1/convert \
-H "x-api-key: $LAYERBACK_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary @diagram.png{ "job_id": "5c048e6f-ec4d-43ad-9eee-0697414d5cef" }Returns 402 when the balance is empty, 413 over 20 MB, 415 for
unsupported bytes, and 429 when the hourly rate limit is hit.
Poll job status
curl https://layerback.com/api/v1/jobs/$JOB_ID \
-H "x-api-key: $LAYERBACK_KEY"{
"job_id": "5c048e6f-…",
"status": "succeeded",
"total_seconds": 46.9,
"formats": ["vsdx", "pptx", "drawio", "ir", "preview"]
}status moves through queued → running → succeeded or failed.
Poll every few seconds; conversions typically finish in 30–60 seconds.
Download artifacts
curl -L "https://layerback.com/api/v1/jobs/$JOB_ID/download?format=vsdx" \
-H "x-api-key: $LAYERBACK_KEY" -o diagram.vsdxformat accepts vsdx, pptx, drawio, ir (the structured diagram
JSON), or preview (PNG). Downloads are free and repeatable.
Limits
- Images up to 20 MB, formats PNG / JPEG / WebP
- Rate limit: 20 conversions per hour per account (contact us for more)
- Artifacts are retained for at least 72 hours — download promptly or re-convert when needed
LayerBack Docs