SVG Me
Developer API · Available now

The SVG Me image-to-SVG API

Send a PNG, JPG or WebP from your own code and get back a clean SVG (or PDF, EPS or DXF) with a few flat colors, smooth curves and no stray specks. It runs the same engine and settings as the web app, at 1 credit per image: 10¢ each with the 200-credit pack.

Create an API key

Get started

  1. Create an API key on your account page (sign in and verify your email first). The key is shown once, so store it as a secret.
  2. Send it as Authorization: Bearer <key> with each request.
  3. Each successfully converted image uses 1 credit from your account. Failed conversions, re-exports to another file type and converting the exact same result again are free.
  4. Every converted image is also saved to My SVGs, unlocked, so you can recolor or download it again from the app.

New to it? The step-by-step guide walks through a first request, polling a job, converting a whole folder with synchronous Python or Node.js, and giving your agent a conversion skill. Comparing it with free libraries? See converting images to SVG in Python or Node.js.

Convert an image (sync)

POST /api/v1/convert waits for the conversion (usually a few seconds) and answers with the file. The response headers include X-Conversion-Id, X-Credits-Charged and X-Credits-Remaining.

curl https://svgme.app/api/v1/convert \
  -H "Authorization: Bearer $SVGME_API_KEY" \
  -F [email protected] \
  -F colors=4 \
  -o logo.svg

Every option in the app is available as a form field:

curl https://svgme.app/api/v1/convert \
  -H "Authorization: Bearer $SVGME_API_KEY" \
  -F [email protected] \
  -F remove_background=auto \
  -F gradients=on \
  -F format=layers \
  -F file_type=pdf \
  -o photo.pdf

Prefer JSON? Send image_base64 and an options object, and ask for Accept: application/json to get { id, content, content_type, palette, stats, credits_remaining } back.

curl https://svgme.app/api/v1/convert \
  -H "Authorization: Bearer $SVGME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"image_base64": "'"$(base64 < logo.png)"'", "filename": "logo.png",
       "options": {"colors": 4, "recolor": {"#ffffff": null}}}'

Queue an image (async)

POST /api/v1/jobs takes the same input and answers 202 straight away, so it suits short HTTP timeouts and large batches. Poll GET /api/v1/jobs/:id (it sends Retry-After while the job runs), then fetch GET /api/v1/jobs/:id/result.

# 1. Submit: answers 202 right away
curl https://svgme.app/api/v1/jobs \
  -H "Authorization: Bearer $SVGME_API_KEY" \
  -F [email protected] -F colors=3
# {"id":"8c1e…","status":"running","poll_url":"https://svgme.app/api/v1/jobs/8c1e…", …}

# 2. Poll until status is "succeeded" or "failed"
curl https://svgme.app/api/v1/jobs/8c1e… -H "Authorization: Bearer $SVGME_API_KEY"

# 3. Download the file (add ?file_type=dxf or ?format=outline to re-export free)
curl https://svgme.app/api/v1/jobs/8c1e…/result -H "Authorization: Bearer $SVGME_API_KEY" -o logo.svg

To get a result you already paid for in another format, call POST /api/v1/conversions/:id/export with { "format": "sticker", "file_type": "pdf" }. It’s free, like switching formats in the app.

Options

All optional. Without any, the API picks the image type, colors, background and gradients automatically, the way the app’s defaults do. Send them as form fields, as an options JSON field, or in the JSON body.

OptionValuesWhat it does
colors2–12How many colors to trace with. Leave it out for automatic.
palette#rrggbb,…Exact colors to use, comma separated or a JSON list. Overrides colors.
color_modeauto, unlimited, two, customUsually implied by colors or palette.
profileauto, logo-low … photo-highThe image type and detail level. auto detects it, as the app does.
flattenauto, white, black, preserve, #rrggbbWhat to do with transparency: keep it, or fill it with a color.
remove_backgroundfalse, true, autoRemove a solid background before tracing. auto only removes a single-color border.
background_tolerance0–100 (20)How close a color must be to the background to be removed.
gradientsauto, on, offMerge banded ramps into smooth gradient fills.
shadingauto, off, remove, restoreTrace flat paint without shadows, optionally adding a soft shading layer back.
smoothingtrue, falseSmooth jagged outlines.
fittingtrue, falseFit Bézier curves (fewer nodes).
resizerecommended, noneShrink very large images to 1.6 megapixels first, as the app does.
recolor{"#from": "#to" | null}Swap colors in the result; null removes a color.
formatstandard, layers, outline, stickerLayers by color, cut outlines, or a sticker with a white border and cut line.
sticker_borderthin, medium, wideThe sticker border width.
file_typesvg, pdf, eps, dxfThe file you get back.

AI assistants and agents (MCP)

The same conversions are available as tools on a remote MCP server at https://svgme.app/mcp, for Claude, ChatGPT, Cursor and other assistants. Chat apps connect by signing in; other clients can send an API key as the bearer token. Each conversion costs the same 1 credit. Connect your assistant.

claude mcp add --transport http svgme https://svgme.app/mcp

Agents with a shell can use the API through the SVG Me agent skill instead, with your API key. In Claude Code, install it as a plugin:

/plugin marketplace add vchiapaikeo/svgme-tools
/plugin install svgme@svgme

Errors and limits

Errors are JSON: { "code": "…", "message": "…" }. Each key can make 60 requests a minute (see the RateLimit header), each account can run 2 sync conversions at once and have 20 jobs waiting or running, and images can be up to 20 MB.

CodeStatusMeaning
invalid_api_key401Missing, mistyped or revoked key.
payment_required402Out of credits. Buy more on your account page.
invalid_option400An option has a bad value; the message names it.
missing_image / invalid_image400No image, or one that can’t be read.
image_too_large413Over 20 MB.
conversion_failed422The engine couldn’t convert this image. No credit is used.
rate_limited / too_many_jobs429Slow down; wait for Retry-After seconds.
queue_full / engine_unavailable503 / 502Temporary. Retry with backoff.

Questions

How good is the output?

It is the same engine as the web app, which beat VTracer and Potrace on accuracy in our tests. Converting and previewing in the web app is free, so you can check your own images first.

How much does it cost?

1 credit per converted image, from the same balance as the app. Credits never expire. Buy them on your account page: 200 for $20 (10¢ an image), 20 for $4 or 6 for $2. No subscription.

Should I use sync or async?

Sync is simplest for one image at a time. Use async when your platform cuts requests off after a few seconds, or to submit many images and collect them later.