svgdiagram.ai outputs standalone vector SVG source and PNG images.
Vector SVG Downloads
Retrieve a standalone .svg vector file for embedding in web applications, presentations, or vector editors (Figma, Illustrator, Inkscape):
GET /rest/v1/generations/:id/download.svgFeatures
- Self-contained: Embeds geometric paths, badges, 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 diagram@2x.pngPNG 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"