Bildwerk
svg sanitize
Parses the SVG with a strict, namespace-aware XML parser (saxes; DOCTYPE entities are refused, so no XXE or entity expansion) and rebuilds it from an allowlist of SVG elements and attributes, re-serialising with escaping so the result is safe both as a file and inline in HTML. Removed: script/handler elements, all on* attributes, foreignObject, non-SVG namespaces, href values other than local #fragments (links only with allow_links, raster data: images only with allow_data_images), url().
POST https://bild.halowerk.com/v1/svg-sanitizeInputs
| Field | Type | Required | Description |
|---|---|---|---|
| svg | string | No | SVG markup. |
| svg_url | string | No | Public URL of the SVG (at most 5 MB). |
| allow_links | boolean | No | Keep http(s), mailto and relative hyperlinks on <a>. |
| allow_data_images | boolean | No | Keep <image> with base64 PNG/JPEG/GIF/WebP/AVIF data URIs. |
| optimize | boolean | No | Also drop metadata, editor data, empty groups and whitespace. |
| precision | integer | No | Round numbers in geometry attributes to this many decimals. |
Show full input schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"svg": {
"type": "string",
"minLength": 10,
"maxLength": 5000000,
"description": "SVG markup."
},
"svg_url": {
"type": "string",
"format": "uri",
"maxLength": 2048,
"description": "Public URL of the SVG (at most 5 MB)."
},
"allow_links": {
"type": "boolean",
"default": false,
"description": "Keep http(s), mailto and relative hyperlinks on <a>."
},
"allow_data_images": {
"type": "boolean",
"default": true,
"description": "Keep <image> with base64 PNG/JPEG/GIF/WebP/AVIF data URIs."
},
"optimize": {
"type": "boolean",
"default": true,
"description": "Also drop metadata, editor data, empty groups and whitespace."
},
"precision": {
"type": "integer",
"minimum": 0,
"maximum": 6,
"description": "Round numbers in geometry attributes to this many decimals."
}
}
}Published input example
{
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" onload=\"alert(1)\" viewBox=\"0 0 10 10\"><script>alert(2)</script><rect width=\"10\" height=\"10\" fill=\"red\"/></svg>"
}Result & documentation
Machine-readable documentation of this hub
Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.
More endpoints in this hub
- Bildwerk0.01 USDC
address plate blur
POSThttps://bild.halowerk.com/v1/address-plate-blurThe photo is read with Tesseract 5.3.4 (German + English, word boxes) at two scales and in sparse-text and block mode; small bright plaques with 1–5 dark characters (typical house-number signs) are additionally cut out and read one by one,
- Bildwerk0.003 USDC
ai disclosure metadata
POSThttps://bild.halowerk.com/v1/ai-disclosure-metadataChecks JPEG, PNG and WebP files for AI disclosure metadata: XMP DigitalSourceType and the IPTC Photo Metadata 2025.1 AI fields, C2PA/JUMBF stores (signatures are not validated), PNG text chunks and EXIF Software/UserComment, and returns a s
- Bildwerk0.008 USDC
animation to video
POSThttps://bild.halowerk.com/v1/animation-to-videoReads frame count, size, loop count and total duration from the file structure, then encodes with ffmpeg 6.1 in a child process under prlimit (no shell, empty environment, only the file protocol): GIF and APNG are demuxed natively, animated