Vectorize image
vectorize_imageConverts PNG, JPEG, or WebP images into SVG filled paths for logos, icons, and flat artwork, with configurable flat colors and detail.
Instructions
Traces one PNG, JPEG or WebP image into an SVG of filled paths with up to colors flat colours. Best for logos, icons and flat artwork; a photo comes back as a stylised poster. The SVG keeps the image's width and height (capped at 4096). Costs 0.05 USDC per call (real money) on Base, paid from the buyer's wallet over x402 after the buyer's spending limits are checked. Input: PNG, JPEG, WEBP, up to 8 MB, at most 8000 px. Give exactly one of image_url or image_path. Output: image/svg+xml, as a download link (and a file with save_to).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| colors | No | How many flat colours to trace with. 2 is black and white. | |
| detail | No | smooth: fewer, simpler shapes. detailed: closer to the source, larger file. | balanced |
| save_to | No | Optional local file path to save the result to (image/svg+xml). | |
| image_url | No | A public https URL of the image. | |
| overwrite | No | Replace save_to if it exists. Default false. | |
| image_path | No | A local image file to send (read by this server, sent base64). | |
| allow_repeat | No | Buy again even if the same request was bought in the last 10 minutes. Default false: the earlier result is returned and nothing is charged. | |
| max_price_usdc | No | Optional: refuse if Bacon asks more than this, in USDC. |