Skip to main content
POST
SVG Optimizer

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ioSvgInput
string

SVG Code

ioPreset
enum<string>

Preset

Available options:
light,
moderate,
aggressive,
custom
ioRemoveComments
boolean

Remove comments

ioRemoveMetadata
boolean

Remove editor metadata, title & desc

ioMinifyPaths
boolean

Minify path data (reduce coordinate precision)

ioRemoveDefaults
boolean

Remove default/redundant attribute values

ioRemoveHidden
boolean

Remove hidden/invisible elements

ioCollapseGroups
boolean

Collapse unnecessary groups

ioStylesToAttributes
boolean

Convert inline styles to presentation attributes

ioRemoveUnusedIds
boolean

Remove unreferenced IDs

ioRoundCoordinates
boolean

Round coordinates

ioRemoveEmptyContainers
boolean

Remove empty containers

ioPrecision
number

Coordinate Precision

Required range: 0 <= x <= 5

Response

Tool output

tool
string
required
tool_version
string
required

Output-contract version for this tool. Currently "1" for all tools.

outputs
object
required
credits_used
integer
required

Credits this call consumed, after any settlement refund. 0 when metering is disabled.

request_id
string
credits_remaining
integer | null

Credits left in the current monthly allowance, or null when metering is disabled.