Conversion API

Convert images to embroidery stitch files programmatically.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer your_api_key_here

Get your API key from the Studio dashboard.

Convert Image

POST/api/v1/convert

Upload an image and receive 5 machine-ready embroidery formats with Isacord thread matching.

Request

Content-Type: multipart/form-data

FieldTypeDescription
fileFilePNG, JPEG, or WebP. Max 10MB.
settingsJSON stringOptional. See settings table below.

Settings

FieldDefaultDescription
max_colors15Max thread colors (2-15)
target_width_mm90Output width in mm (25-300). Hat=60, chest=90, back=230
fill_density_mm0.35Row spacing. Draft=0.50, Standard=0.35, Premium=0.25
simplify_colorstrueQuantize image colors before vectorizing
color_precision6Vectorizer color sensitivity (2-12)

Example (cURL)

curl -X POST https://d3vur.app/api/v1/convert \
  -H "Authorization: Bearer your_api_key" \
  -F "[email protected]" \
  -F 'settings={"max_colors":8,"target_width_mm":60,"fill_density_mm":0.35}'

Example (Python)

import requests, json

resp = requests.post(
    "https://d3vur.app/api/v1/convert",
    headers={"Authorization": "Bearer your_api_key"},
    files={"file": open("logo.png", "rb")},
    data={"settings": json.dumps({
        "max_colors": 8,
        "target_width_mm": 60,
    })},
)

data = resp.json()
print(f"Stitches: {data['stitch_count']}")
print(f"Colors: {data['color_count']}")
for tc in data['thread_colors']:
    print(f"  Isacord {tc['isacord']} — {tc['name']}")
print(f"DST: {data['dst_url']}")
print(f"PES: {data['pes_url']}")
print(f"JEF: {data['jef_url']}")
print(f"EXP: {data['exp_url']}")
print(f"VP3: {data['vp3_url']}")

Response

{
  "job_id": "43c4e7a8-368d-4654-8b2a-8e3acc94a414",
  "status": "completed",
  "stitch_count": 3536,
  "color_count": 5,
  "estimated_minutes": 5.1,
  "output_width_mm": 60.0,
  "output_height_mm": 44.3,
  "thread_colors": [
    {"hex": "#0E3858", "name": "Royal Navy", "isacord": "3644"},
    {"hex": "#CC0000", "name": "Poinsettia", "isacord": "1902"},
    {"hex": "#FFDC00", "name": "Sunshine", "isacord": "0608"}
  ],
  "dst_url": "https://...supabase.co/.../design.dst",
  "pes_url": "https://...supabase.co/.../design.pes",
  "jef_url": "https://...supabase.co/.../design.jef",
  "exp_url": "https://...supabase.co/.../design.exp",
  "vp3_url": "https://...supabase.co/.../design.vp3",
  "preview_url": "https://...supabase.co/.../preview.png",
  "duration_ms": 1498
}

Vectorize Image

POST/api/vectorize

Convert a raster image to SVG vector graphics. Free, no authentication required.

Request

Content-Type: multipart/form-data

FieldTypeDescription
fileFilePNG, JPEG, or WebP. Max 10MB.
settingsJSON stringOptional. {"colorPrecision": 6, "filterSpeckle": 4, "cornerThreshold": 60, "mode": "color"}

Example (cURL)

curl -X POST https://d3vur.app/api/vectorize \
  -F "[email protected]" \
  -F 'settings={"colorPrecision":6,"mode":"color"}'

Response

{
  "job_id": "...",
  "status": "completed",
  "svg_url": "https://...supabase.co/.../output.svg",
  "svg_inline": "<svg ...>...</svg>",
  "colors_detected": 4,
  "paths_count": 23,
  "duration_ms": 850,
  "file_size_bytes": 12480
}

Batch Convert

POST/api/convert/batchStudio only

Upload up to 50 images at once. Each is converted to DST + PES embroidery files.

Request

curl -X POST https://d3vur.app/api/convert/batch \
  -H "Authorization: Bearer your_api_key" \
  -F "[email protected]" \
  -F "[email protected]" \
  -F "[email protected]"

Response

{
  "total": 3,
  "succeeded": 2,
  "failed": 1,
  "results": [
    {"filename": "logo1.png", "status": "completed", "dst_url": "...", "pes_url": "..."},
    {"filename": "logo2.png", "status": "completed", "dst_url": "...", "pes_url": "..."},
    {"filename": "logo3.png", "status": "failed", "error": "No embroiderable regions detected"}
  ]
}

Rate Limits

PlanRequests/DayPrice
Free10$0
Pro100$29/mo
StudioUnlimited$99/mo

Error Codes

StatusMeaning
400Invalid file type or missing file
401Missing or invalid API key
422Conversion failed (image too complex or unsupported)
429Rate limit exceeded