Pay-per-call SVG converter.
No subscription. Pay for a single hosted conversion, tune advanced vectorization flags when you need control, or install the agent path and convert locally for free.
Pay per conversion
No subscription or API key. Pay only for the conversions you run.
Control the trace
Tune mode, detail, background, outline, and flattening for each image.
Free with the agent
Install the open-source agent path and run local conversions for free.
Advanced / customize
$0.02 per conversion · Base USDC
Flexible by design
You describe it. The agent tunes it.
The real edge isn't one fixed conversion — it's that a person can ask for anything in plain language and the agent maps it to the right settings. Keep the texture, cut out the subject, match it exactly — same engine, shaped to each request.


“Vectorize it but keep every gritty brushstroke.”
agent ▸ --detail high


“Just the character — drop the background and the little flowers.”
agent ▸ isolate subject · transparent background


“Match it exactly — clean flat color, no fuss.”
agent ▸ --detail high · faithful palette
Every conversion self-verifies — re-rasterized and scored against the original.
For agents
Plain language in. The right flags out.
One call, a handful of optional parameters. The agent maps what the user wants onto these fields and POSTs them to /v1/convert — every field below is a multipart form field.
| Field | Values | What it does |
|---|---|---|
mode | auto · binary · color · pixelHow to trace. auto-detects (binary = line art, color = illustrations). | How to trace. auto-detects (binary = line art, color = illustrations). |
detail | high · normal · clean · posterDetail ↔ clean-flat dial. high keeps everything; poster is bold and flat. | Detail ↔ clean-flat dial. high keeps everything; poster is bold and flat. |
solid_background | true · falseFlatten a busy/painted background into one clean solid color. | Flatten a busy/painted background into one clean solid color. |
background | a color — e.g. white, #0E0E10Repaint the detected background to a specific color. | Repaint the detected background to a specific color. |
transparent_background | true · falseRemove the background entirely — transparent SVG, subject kept. | Remove the background entirely — transparent SVG, subject kept. |
flatten_shading | true · falseSmooth gradients are traced faithfully by default; set this for a flat, collapsed-shading look instead. | Smooth gradients are traced faithfully by default; set this for a flat, collapsed-shading look instead. |
uniform_outline | true · falseForce an even-width outline (for art that already has a dark outline). | Force an even-width outline (for art that already has a dark outline). |
smooth | true · false (default true)Smooth contours into clean curves, or keep the rough hand-drawn look. | Smooth contours into clean curves, or keep the rough hand-drawn look. |
quality | 0 – 1 (default 0.9)Target fidelity (SSIM); drives the verify/refine loop. | Target fidelity (SSIM); drives the verify/refine loop. |
The agent maps language → fields
“Make this logo crisp and clean.”
→ mode=binary quality=0.95
“Vectorize my cat, but keep every bit of fur detail.”
→ detail=high
“Cut the character out — I want a transparent background.”
→ transparent_background=true
“Put the dog on a clean white background.”
→ background=white
“This glossy anime art looks scratchy — clean it up.”
→ flatten_shading=true
“Give me a flat, poster-style version.”
→ detail=poster
$ curl -X POST https://api.svgsmith.dev/v1/convert \ -F file=@cat.png \ -F detail=high \ -F transparent_background=true \ -H "X-PAYMENT: <base64 x402 payload>" \ -o cat.svgPay-per-call
Call it. Get a price. Pay on-chain. Done.
The hosted API speaks x402 — HTTP 402 settled with USDC on Base. No account. No key. No subscription. Your agent pays for exactly what it converts.
- 01
POST /v1/convertSend the image
Your agent POSTs the raster and the flags it wants. No headers, no key.
- 02
402 Payment RequiredGet a price
The server quotes the cost for this conversion and where to settle it.
- 03
USDC on Base · retryPay & receive
Client pays in USDC and retries. The SVG comes back, verified.
# 1. request a conversion — no auth$ curl -X POST https://api.svgsmith.dev/v1/convert \ -F file=@cat.png -F detail=high< HTTP/1.1 402 Payment Required< Payment-Required: exact · network=base · asset=USDC · amount=0.02 · payTo=0x… # 2. pay & retry with the settlement header$ curl -X POST https://api.svgsmith.dev/v1/convert \ -F file=@cat.png -F detail=high \ -H "X-PAYMENT: <base64 x402 payment payload>"< HTTP/1.1 200 OK< Content-Type: image/svg+xml# → verified SVG (score 0.98)Illustrative. The server returns the spec x402 payment-required response header (scheme, network, asset, payTo, amount) and accepts a standard X-PAYMENT payload; the default convert price is 0.02 USDC.
Install / Use
Two ways in. Same engine.
CLI
free · FSLRuns locally. The CLI and the vectorize agent skill, shipped together.
$ pip install svgsmith$ svgsmith convert cat.png \ --detail high --solid-background \ --report json$ svgsmith rasterize out.svgLine-art mode needs potrace — brew install potrace or apt install potrace.
API
hosted · pay-per-callPOST to api.svgsmith.dev/v1/convert with the same flags as params. Pay per call via x402.
$ curl -X POST https://api.svgsmith.dev/v1/convert \ -F file=@cat.png \ -F detail=high \ -F solid_background=true# 402 → pay USDC on Base → retry → SVGEvery flag from the CLI maps 1:1 to a form field. Same engine, same self-verification, no install.
FAQ
Questions about the CLI and API.
Does svgsmith need an API key?
No. The hosted API uses x402 pay-per-call, so there is no account, API key, or subscription to set up.
How does pay-per-call work?
A conversion request receives a 402 payment requirement. Settle 0.02 USDC on Base, retry with the payment payload, and receive the SVG.
Can an AI agent call svgsmith autonomously?
Yes. An x402-capable agent can request a conversion, settle the payment, retry, and receive the verified SVG through the HTTP API.
Is there a free local option?
Yes. Install the CLI with pip and run conversions locally. The hosted API and CLI use the same engine.
What conversion flags can I tune?
Set mode, detail, background handling, shading flattening, outline behavior, smoothing, and quality as multipart form fields or CLI flags.