HTTP API and MCP for agents.
The same digitize engine the try page uses is available over HTTP and as a small MCP server. Create a job from an image, read metrics and quality, download machine files or the stitch preview, and list fabrics, garments and size presets — with an API key for your own quota.
On this page
Quick start (HTTP)
No key is required to try a few jobs; integrations should send an API key for a private hourly cap and monthly quota.
POST /v1/digitizewith multipart field file and query width_mm (and optional fabric, text, max_colors).- Try it from a terminal:
curl -F file=@logo.png "https://stitch.temsor.com/v1/digitize?width_mm=90" - The JSON response is the job: job_id, metrics, quality, threads and download paths.
GET /v1/digitize/{job_id}/{format}for dst, pes, jef, exp, vp3, pec, xxx, u01, tbf, tap, dsb, dsz or preview (PNG). Jobs live about 30 minutes.- A slow design:
POST /v1/jobs(same fields) orPOST /v1/digitize?async=1/ headerPrefer: respond-asyncanswers 202 with job_id, status_url, poll_after_s instead of waiting;GET /v1/jobs/{job_id}returns status (queued/running/done/failed) and, once done, the same body as the sync 200 under result (with the stitch simulation while the job lives). The job_id is the key to its result: anyone holding it can poll it, so keep it private. - Authorization:
Bearer <key>orX-API-Key: <key>.GET /v1/usageshows this month's quota. - Full schema:
/openapi.json· interactive docs:/docs· agent brief:/agents.md
MCP server (stdio and Streamable HTTP)
The stitch_mcp package is a Model Context Protocol server that calls this public API. It exposes tools: list_presets, digitize_logo, job_status, download_design, get_usage, get_pricing, health_check. Set STITCH_API_KEY (and optionally STITCH_SITE_URL) in the environment.
- stdio (Cursor / Claude Desktop):
python -m stitch_mcp - Streamable HTTP locally:
python -m stitch_mcp --http --port 8787(endpointhttp://127.0.0.1:8787/mcp) - Cursor mcp.json example: command python,
args ["-m", "stitch_mcp"], env STITCH_API_KEY andSTITCH_SITE_URL=https://stitch.temsor.com - Claude Desktop: add the same command under
mcpServers.temsor-stitch - Install: the mcp package ships with the Temsor Stitch requirements (
mcp>=1.30,<2).
What the tools cover
- list_presets — fabrics (woven, denim, knit, pique, performance, fleece, towel, cap, nylon, silk, leather), garment views, size chips (left chest 90, cap 55 tall, jacket back 250, patch 80, …), machine formats.
- digitize_logo — upload via local path or base64; returns the full job JSON plus absolute download URLs.
- job_status — probes whether the job's preview is still available (jobs expire).
- download_design — save PES/DST/… or preview to a path, or return base64.
- get_usage / get_pricing / health_check — quota, catalogue flags, liveness.
Embroidered patch (outline + PNG)
Show the design as a sewn-on patch: twill cut around it with a merrowed (overlock) border, or a die-cut patch that follows the logo with a satin heat-cut edge. Free, like the preview; the machine files are unchanged (the patch maker cuts the twill and sews the edge). The studio's As a patch picker draws the same outline on every garment and photo view.
GET /v1/digitize/{job_id}/patch?shape=auto|oval|circle|rect|shield|diecut— JSON: shape, edge (merrow or heat_cut_satin), border_mm, width_mm, height_mm, twill and border colours, and the cut outline in the simulation's 0.1 mm frame (overlays simulation.ops).GET /v1/digitize/{job_id}/patch.png?shape=shield&twill=1f2a44&border=f4f2ec— the finished patch as a transparent PNG (10 px/mm, soft drop shadow), ready to place on a product photo.- twill / border: hex RGB, optional; by default the twill is the stock colour (white, black, navy, khaki, red, royal) that stands out most from the threads and the border is the most-sewn thread that shows on it.
- auto picks an oval for round or oval designs and a rounded rectangle otherwise; every shape keeps the stitches at least 4 mm inside the border (2.5 mm for die-cut).
Embeddable stitch preview (shop pages)
Paste a free iframe or script on any Shopify, Etsy, WordPress or custom page. Visitors watch the live stitch-out with no account; machine-file downloads stay behind sign-in on the try page. Create a share from a digitized job (Share for approval), then use its embed URL.
- Iframe:
<iframe src="https://stitch.temsor.com/embed/<share_id>" width="420" height="480" style="border:0;border-radius:12px;max-width:100%" loading="lazy" title="Embroidery preview"></iframe> - Script mount:
<div data-temsor-embed="<share_id>" data-width="420"></div>then<script async src="https://stitch.temsor.com/js/embed.js"></script> - Optional query: ?lang=tr · ?g=tshirt|hoodie|cap|… · ?still=1 (no animation) · ?patch=auto|oval|circle|rect|shield|diecut (&twill=1f2a44) shows the design as a sewn-on patch.
- The embed page sends Content-Security-Policy frame-ancestors * (shops may iframe it) and never offers PES/DST download buttons.
- Full approval UI (Approve / Request a change) remains at
/a/<share_id>. Marketplace app listings are a later step.
API keys
Keys are issued for integrations (Business plans and partners). A wrong or revoked key is always 401 — never silently anonymous. Over the hourly or monthly limit returns 429 with Retry-After. Ask for a key from the account page when billing is on, or contact us via the site.
See your own logo stitched
Free preview and real needle path with no signup. Sign up free for 5 files in PES, DST, JEF, EXP or VP3.
Try it free