No subs · powered by x402

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

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.

FieldValues
modeauto · binary · color · pixelHow to trace. auto-detects (binary = line art, color = illustrations).
detailhigh · normal · clean · posterDetail ↔ clean-flat dial. high keeps everything; poster is bold and flat.
solid_backgroundtrue · falseFlatten a busy/painted background into one clean solid color.
backgrounda color — e.g. white, #0E0E10Repaint the detected background to a specific color.
transparent_backgroundtrue · falseRemove the background entirely — transparent SVG, subject kept.
flatten_shadingtrue · falseSmooth gradients are traced faithfully by default; set this for a flat, collapsed-shading look instead.
uniform_outlinetrue · falseForce an even-width outline (for art that already has a dark outline).
smoothtrue · false (default true)Smooth contours into clean curves, or keep the rough hand-drawn look.
quality0 – 1 (default 0.9)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

POST /v1/convert · fields are multipart form data
$ 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.svg

Pay-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.

  1. 01
    POST /v1/convert

    Send the image

    Your agent POSTs the raster and the flags it wants. No headers, no key.

  2. 02
    402 Payment Required

    Get a price

    The server quotes the cost for this conversion and where to settle it.

  3. 03
    USDC on Base · retry

    Pay & receive

    Client pays in USDC and retries. The SVG comes back, verified.

x402 · the full flow
# 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 · FSL

Runs locally. The CLI and the vectorize agent skill, shipped together.

terminal
$ pip install svgsmith$ svgsmith convert cat.png \    --detail high --solid-background \    --report json$ svgsmith rasterize out.svg

Line-art mode needs potrace brew install potrace or apt install potrace.

API

hosted · pay-per-call

POST to api.svgsmith.dev/v1/convert with the same flags as params. Pay per call via x402.

http
$ 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 → SVG

Every 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.