Render SVG
render_svgProduce animated SVG graphics from JSON config, with AI managing all design elements and animations from patterns to filters.
Instructions
Render animated SVG from JSON config. AI controls all design parameters.
Workflow: render_svg > preview > critique > revise. Iterate at least 3 times before finalizing.
Element types: rect, circle, ellipse, line, polyline, polygon, path, image, text, textPath, group, use, radial-group, arc-group, grid-group, scatter-group, path-group, parametric
Pattern groups (use for repetitive designs): radial-group (circular), arc-group (arc), grid-group (matrix), scatter-group (random), path-group (along polyline). Each takes count + child element.
Parametric curves (fn field): rose, heart, lissajous, spiral, star, superformula, hypotrochoid, wave. Server computes coordinates.
defs: gradients (linear/radial, SMIL animated stops), filters (presets: glow, neon, blur, drop-shadow, glitch, chromatic-aberration, noise, outline, inner-shadow, emboss + 5 more), clipPaths, masks, patterns (tile fills).
Animations: CSS @keyframes via animations array. Set cssClass on element matching animation name. For transforms add transformBox="fill-box" transformOrigin="center". SMIL via smilAnimations on elements (animate, animateTransform, animateMotion).
Critical format rules:
Gradient type must be "linearGradient" or "radialGradient" (not "linear"/"radial"). Each needs id, stops (array with offset 0-1, color).
Filter type must be "preset" with a "preset" field: {"type":"preset","id":"myGlow","preset":"glow","stdDeviation":8,"color":"#ff00ff"}
Keyframe offset: use "from"/"to" or percentage number 0-100 (not "0%"/"100%").
Colors: hex only (#rrggbb or #rrggbbaa). No rgb(), no named colors.
Every element needs "type" field. circle needs r, rect needs width+height, path needs d.
Output: Pure SVG XML. No JavaScript. CSS @keyframes + SMIL only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| canvas | Yes | ||
| defs | No | ||
| elements | Yes | ||
| animations | No |