Image to SVG
Vectorize a raster image (PNG or JPEG) into a clean, editable SVG — pass the image by URL or base64, priced per conversion.
Provider contract
- Call path
- /routes/svgsmith/utilities/image-to-svg
- Method
- POST
- Selected provider
- svgsmithdefault
- Provider price
- $0.02
- Settlement
- Base USDC · x402 · 5% h402 fee
Quickstart
Both commands call the selected provider directly.
curl -X POST '/routes/svgsmith/utilities/image-to-svg' \
-H 'content-type: application/json' \
-d '{"imageUrl":"https://svgsmith.dev/icon.png","mode":"auto","detail":"normal","quality":0.9,"transparentBackground":false,"solidBackground":false,"flattenShading":false,"uniformOutline":false,"smooth":true}'h402 call 'utilities/image-to-svg' --provider 'svgsmith' --method POST --json '{"imageUrl":"https://svgsmith.dev/icon.png","mode":"auto","detail":"normal","quality":0.9,"transparentBackground":false,"solidBackground":false,"flattenShading":false,"uniformOutline":false,"smooth":true}'Parameters & live test
pays real USDCFill the request fields, quote the exact per-call total, then choose x402 or eligible bonus credit explicitly before sending. Only the selected provider's listed parameters are accepted.
imageUrlstringoptional *Public http(s) URL of the raster image (PNG or JPEG) to vectorize. Preferred input — fetched server-side behind an SSRF guard. Provide this or imageBase64.
imageBase64stringoptional *Base64-encoded image bytes (raw or a data: URI) — fallback when the image is not hosted at a public URL. Provide this or imageUrl.
modestringoptionaldefault autoTracing method. auto picks per image; binary = black/white; color = full color; pixel = preserve pixel art.
detailstringoptionaldefault normalOutput complexity. high keeps the most paths; clean and poster simplify toward fewer shapes.
qualitynumberoptional0–1default 0.9Fidelity target from 0 to 1; higher tracks the source more closely at the cost of more paths.
transparentBackgroundbooleanoptionaldefault falseDrop the background so the resulting SVG is transparent.
solidBackgroundbooleanoptionaldefault falseFlatten the background to a single solid fill (color set via background).
backgroundstringoptionalBackground color (CSS hex, e.g. "#ffffff") used when solidBackground is true.
flattenShadingbooleanoptionaldefault falseSimplify gradients and shading into flat fills.
uniformOutlinebooleanoptionaldefault falseRender even-width outlines instead of variable strokes.
smoothbooleanoptionaldefault trueSmooth traced curves; set false to keep sharper, more literal edges.
imageUrl, imageBase64.{
"imageUrl": "https://svgsmith.dev/icon.png",
"mode": "auto",
"detail": "normal",
"quality": 0.9,
"transparentBackground": false,
"solidBackground": false,
"flattenShading": false,
"uniformOutline": false,
"smooth": true
}{ "data": { "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 1536 1536\" style=\"width:100%;height:100%\" preserveAspectRatio=\"xMidYMid meet\"><g id=\"layer-01-0e0e10\" fill=\"#0e0e10\"><path d=\"M0 0L1536 0L1536 1536L0 1536Z\" /></g><g id=\"layer-02-fb652c\" fill=\"#fb652c\"><path d=\"M846.35 263.9L861 264C859.52 267.17 857.71 269.51 855.43 272.16C851.2 277.59 848 283.83 845 290L840 300L840.68 321.45C841 324 841 324 843 327L843.5 331.06C844 335 844 335 846 337L857.75 356.12C862.24 363.09 867.25 367.93 874.49 371.95L888.4 382.9C890 384 890 384 891 387L901.69 393.31C904.48 394.14 906.61 395.34 909 397L910.69 399.31C913.48 400.14 915.61 401.34 918 403L919.69 405.31C922.48 406.14 924.61 407.34 927 409L982.67 453.2C985.97 454.33 987.74 456.34 990.19 458.81L992.85 461.45C994.93 463.91 995.33 465 996 468L1000.75 471.62C1003.82 473.5 1005.09 475.98 1007 479L1010 482C1012.15 484.47 1013.8 486.5 1015 489.56C1016 492 1016 492 1018 494C1020.26 496.26 1020.93 498.01 1022 501L1038.5 537.81C1040.04 541.76 1040.79 545.72 1041.47 549.9C1042 552 1042 552 1044 554L1044.5 558.94C1044.72 562.62 1044.88 563.82 1047 567L1047.5 573.37C1047.78 579.52 1047.78 579.52 1048.99 582.2C1050.29 585.81 1050.37 589.24 1050.45 593.03L1050.33 649.48C1049.97 652.25 1049.07 654.43 1048 657L1047.44 663.62C1047.24 667.04 1047.08 669.75 1046 673L1044.08 704.68C1044.01 707.71 1044.35 710.06 1045 713L1048.95 728.08C1051.73 733.18 1055.52 734.88 1060.87 736.75L1064.49 738.04C1069.73 739.47 1073.27 739.58 1078 737L1089 734L1100 722L1106.56 698.51C1106.89 693.22 1106.89 693.22 1108 691L1108.24 671.55C1107.97 668.73 1107.07 666.61 1106 664L1112 659C1114 661 1114 661 1114.12 663.62L1127.15 684.71C1128 687 1128 687 1130 688L1143.87 714.62C1146.4 724.6 1146.4 724.6 1150 727L1159.5 758.87C1159.71 762.58 1159.87 763.81 1162 767L1163.06 773.56C1163.9 779.81 1163.9 779.81 1165 782L1165.62 790.86C1166 794 1166 794 1167 796.72C1168.41 801.35 1168.43 805.87 1168.56 810.69L1168.82 818.82C1169 821 1169 821 1170 824L1168.48 879.89C11… [truncated for committed sample]", "meta": { "mode": "color", "detail": "normal", "bytes": 108073, "similarity": 0.9827115313817206 } }, "h402": { "routeId": "utilities/image-to-svg", "provider": "svgsmith", "selectedCandidateId": "utilities/image-to-svg/svgsmith", "routing": "manual", "paidBy": "x402-exact" } }
Providers
Choose a provider for this task. The catalog recommends the current default from quality, reliability, and price; your selected provider stays pinned. Listed prices are provider prices; settlement adds a 5% h402 fee.
- Success
- 75%
- p50
- 32.54s
- Calls
- 8