Sources › Apps › Alight Motion Presets › Image to XML

Alight Motion Presets Image to XML API
Convert an image (jpg, jpeg, png, webp, bmp or svg, max 10 MB) into an Alight Motion XML project: the picture is traced into colored vector shapes you can import into Alight Motion. Returns the XML text plus a download link. Transparency is kept; SVG parts that cannot be converted (text, embedded images, filters, masks) are listed in `unsupported`.
Request
https://api.zapi.ink/v1/application:alight-motion/image-to-xmlSend your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 6 hours.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| url | string | query | Yes | Direct link to the image (jpg, jpeg, png, webp, bmp or svg, max 10 MB) Example: https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/320px-PNG_transparency_demonstration_1.png |
| colors | number | query | No | Raster only: number of colors to trace (2-32, default 12). More colors = more detail and more shapes Example: 12 |
| detail | number | query | No | Raster only: tracing resolution, longest side in px (64-400, default 200) Example: 200 |
| maxShapes | number | query | No | Max shapes in the XML (1-3000, default 800). The smallest regions are dropped first Example: 800 |
Code examples
curl -X GET "https://api.zapi.ink/v1/application:alight-motion/image-to-xml?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F4%2F47%2FPNG_transparency_demonstration_1.png%2F320px-PNG_transparency_demonstration_1.png&colors=12&detail=200&maxShapes=800" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/application:alight-motion/image-to-xml?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F4%2F47%2FPNG_transparency_demonstration_1.png%2F320px-PNG_transparency_demonstration_1.png&colors=12&detail=200&maxShapes=800", { method: "GET", headers: { "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" }, }); const data = await res.json(); console.log(data);
import requests res = requests.get( "https://api.zapi.ink/v1/application:alight-motion/image-to-xml", params={"url":"https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/320px-PNG_transparency_demonstration_1.png","colors":"12","detail":"200","maxShapes":"800"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Frequently asked questions
How do I call the Alight Motion Presets Image to XML API?
Send a GET request to https://api.zapi.ink/v1/application:alight-motion/image-to-xml?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F4%2F47%2FPNG_transparency_demonstration_1.png%2F320px-PNG_transparency_demonstration_1.png with your Zapi key in the x-api-key header. Parameters — required: url; optional: colors, detail, maxShapes. The response is JSON in the { project, data, timestamp } envelope.
What does the Alight Motion Presets Image to XML API return?
Convert an image (jpg, jpeg, png, webp, bmp or svg, max 10 MB) into an Alight Motion XML project: the picture is traced into colored vector shapes you can import into Alight Motion.
Is the Alight Motion Presets Image to XML API free?
Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.
Can an AI assistant call the Alight Motion Presets Image to XML API?
Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "alight-motion" and endpoint "image-to-xml".
What other Alight Motion Presets API endpoints are there?
It has 3 endpoints. Besides Image to XML: Preset detail, Search presets.