SVG to PNG renderer
svg_to_pngRender an SVG document to a PNG at a chosen width, height or scale and background; external files, network references and XML entities are never loaded. Cost: 1 credit per call. File input (file): base64 string, data: URI or {"url": "https://..."}. Output: a file (image/png) returned inline, at most 1 MiB. The rendered PNG
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | The SVG markup as text (up to 2 MB). Use `file` instead for a base64 / URL / uploaded .svg or .svgz | |
| file | No | Alternative to `svg`: an .svg or .svgz file as base64, data: URI or {"url": "https://..."} | |
| scale | No | Multiplier of the SVG's own size (default 1); not combinable with width / height | |
| width | No | Output width in px (height follows the aspect ratio unless given) | |
| height | No | Output height in px (width follows the aspect ratio unless given) | |
| background | No | transparent, #rrggbb or #rrggbbaa | transparent |