Trace images to SVG from an AI agent.
AI agents and scripts can use the same tracing engine as this website in two ways that work today: the public trace API (POST https://api.pic2svg.com/api/v1/trace) and a remote MCP server at https://pic2svg.com/api/mcp with one tool, trace_image_to_svg. Neither needs an account or anything installed. A local MCP server and command-line tool (the pic2svg-mcp package) are coming soon; they are not on npm yet.
Add https://pic2svg.com/api/mcp to your MCP client as a remote (HTTP) server — the configuration is below — and ask the agent to trace an image. The agent sends the image as base64 and gets back the SVG text with the trace mode, canvas, path count and size. Scripts can call the trace API directly with one HTTP request. Tracing is free within a daily allowance, and only SVG is produced; PDF, EPS, AI and DXF are downloads on the website's plans.
Trace preset:Balanced▼
Applies to images you add next — each one traces as it lands.
The SVG download is free — no account needed.
Transparent areas become white shapes, and larger images are scaled down to about 0.6 megapixels before tracing.
Your image is uploaded to pic2svg's own server to be traced. What we keep, and for how long
Other formats, plans and licences
PDF, EPS, AI (EPS-based) and DXF come with a paid plan, and every new account gets 7 days of Pro free. The free plan and Starter carry a personal-use licence; commercial use needs Pro, and resale needs Advanced — see the licence row on the pricing page.
How do you set it up?
Three steps. Nothing to sign up for.
- Step 1
Add the remote server to your MCP client
Paste the configuration below into your client's MCP settings (for example its mcpServers file), or add https://pic2svg.com/api/mcp as an HTTP server in its settings. Any client that supports remote MCP servers over HTTP works. Clients that only launch local (stdio) servers need the pic2svg-mcp package, which is not on npm yet.
- Step 2
Ask the agent to trace a file
For example: "Trace ~/Desktop/logo.png to SVG with the compact preset." The agent reads the file, calls trace_image_to_svg with its base64 contents and optionally a file name and a preset (sharp, balanced or compact), and gets the SVG text back.
- Step 3
Save and check the SVG
The tool returns the SVG as text; ask the agent to save it, for example as <name>.pic2svg.svg so an existing <name>.svg is not overwritten. Check it in a browser or a vector editor before using it.
Configuration and commands
MCP client configuration (remote server)
json
{
"mcpServers": {
"pic2svg": {
"type": "http",
"url": "https://pic2svg.com/api/mcp"
}
}
}Field names for a remote server differ between clients; what matters is the URL, https://pic2svg.com/api/mcp, over HTTP. The local pic2svg-mcp server and command-line tool are coming soon and are not on npm yet, so there is no install command to run.
The API directly
sh
curl -s https://api.pic2svg.com/api/v1/trace \
-H 'content-type: application/json' \
-d "{\"fileName\":\"logo.png\",\"preset\":\"balanced\",\"imageBase64\":\"$(base64 < logo.png | tr -d '\n')\"}"imageBase64 may be raw base64 or a data URL. The response is JSON: svgText, mode, canvas { w, h, paths } and sizeKB.
What are the limits?
The trace API has its own daily allowance, counted per UTC day and separate from the free converter on this website, so agents never use up what visitors share. The current figures are in every response's X-RateLimit-Limit and X-RateLimit-Remaining headers.
| Limit | Value | When it is reached |
|---|---|---|
| Traces per client per day | 50 by default | HTTP 429 with a message and a Retry-After header until midnight UTC; the tool returns the message |
| Traces per day for all API callers together | 500 by default | HTTP 429, as above |
| Request size | About 45 MB | HTTP 413; the file is not traced |
| Trace resolution | About 600,000 pixels | Larger images are scaled down before tracing, never refused for size alone |
What happens to your image?
It is uploaded to pic2svg
The file goes to pic2svg's own server (api.pic2svg.com), where the engine traces it. It is not sent to any third-party AI service or vectorizer. Temporary trace files are deleted when the trace finishes; the Privacy Policy has the details. Tell your agent not to send files that must stay on your machine.
It is sent as it is
The website's converter scales an image in the browser and re-encodes it before uploading it, as a lossless PNG for flat artwork or a JPEG for photos; the API and the MCP server trace the bytes the agent sends, so a photo can trace a little differently than it does on the website.
What the trace does and does not do
Transparency becomes a white background shape, lettering becomes outlined shapes, and only SVG is produced. The guides on this site describe how traces behave in detail.
MCP server and API questions
- Is it free?
- Yes, within the daily allowance: 50 traces per client by default, with no account. The remote MCP server calls the same API and shares its allowance. It produces SVG only; the other formats are downloads on the website's plans.
- Does it use up the website's free converter?
- No. The API keeps its own daily count, separate from the pool the website's anonymous visitors share.
- Which MCP clients does it work with?
- Any client that supports remote MCP servers over HTTP: the server at https://pic2svg.com/api/mcp answers initialize, tools/list and tools/call. A local (stdio) server for clients that cannot connect to a remote one is coming soon as the pic2svg-mcp package; it is not on npm yet.
- Can I install pic2svg-mcp with npm?
- Not yet. The package is not published on npm, so an npx or npm install command for it would fail. Use the remote MCP server or the trace API above until it is.
- Can I get PDF, EPS, AI or DXF through the API?
- No. Those exports are part of the paid plans on the website, which work in the browser. The API returns the traced SVG.