All API tools
Formatters & Minifiers
SVG Optimizer API
GET
/v1/svg-optimizer Free tier1 credit / callAuthentication
Send your API key as a bearer token. Create one free in the dashboard.
Authorization: Bearer $TOOLSXPO_KEYParameters
Passed as query-string parameters. Example values shown.
| Name | Example |
|---|---|
| svg | <svg viewBox="0 0 10 10"><circle cx="5" cy="5" r="4"/></svg> |
| removeXmlDecl | true |
| removeMeta | true |
| removeComments | true |
| minify | false |
Example request
curl "https://api.toolsxpo.com/v1/svg-optimizer?svg=%3Csvg%20viewBox%3D%220%200%2010%2010%22%3E%3Ccircle%20cx%3D%225%22%20cy%3D%225%22%20r%3D%224%22%2F%3E%3C%2Fsvg%3E&removeXmlDecl=true&removeMeta=true&removeComments=true&minify=false" \
-H "Authorization: Bearer $TOOLSXPO_KEY"Response
A standard JSON envelope: { ok, data, meta }. The result is in data (text); meta.credits reports what the call cost.