svgdiagram.ai outputs standalone vector SVG source and PNG images.
Vector SVG Downloads
Retrieve a standalone .svg vector file for embedding in web pages, documents, and anything that renders SVG in a browser:
GET /rest/v1/generations/:id/download.svgText stays editable, and the file embeds only the glyphs its text uses.
Design tools and slide apps (Figma, Illustrator, Inkscape, PowerPoint, Keynote, Google Slides) ignore embedded fonts and substitute their own, which shifts and rewraps text. For those, download the SVG with its text drawn as outlines:
GET /rest/v1/generations/:id/download.svg?text=outlinedIt looks the same everywhere, but its text is no longer editable.
Features
- Self-contained: Embeds geometric paths, badges, subset fonts, and inline styling.
- Infinite Scaling: Sharp at any screen resolution or print size.
- Clean Structure: Clean shape coordinates and typography without heavy shadows, glows, or blurs.
Raster PNG Downloads
To render high-resolution PNG images, use the PNG download endpoint:
GET /rest/v1/generations/:id/download.png?scale=1Resolution Scale Options
| Parameter | Resolution Scale | Output Use Case |
|---|---|---|
scale=1 |
1x Standard | Web previews, email embeds, standard displays. |
scale=2 |
2x Retina | High-DPI screens, documentation, presentations. |
scale=3 |
3x High-DPI | Print media, large format displays. |
# Download 2x Retina PNG
curl -s https://svgdiagram.ai/rest/v1/generations/YOUR_DIAGRAM_ID/download.png?scale=2 \
-H "Authorization: Bearer svg_sk_your_api_key" \
--output [email protected]PNG rendering is executed via Cloudflare Browser Run headless browser rendering for accurate font rendering and pixel perfection.
Export Options Catalog
Query GET /rest/v1/export-options to inspect available fonts, appearance grounds, and default layout padding limits supported by the renderer engine:
curl -s https://svgdiagram.ai/rest/v1/export-options \
-H "Authorization: Bearer svg_sk_your_api_key"