Skip to content

Overview

Developer documentation for svgdiagram.ai — the AI-powered vector diagram generation engine.

Welcome to the svgdiagram.ai developer documentation. The svgdiagram.ai REST API turns natural language prompts and structured data into vector SVG diagrams.

Create flowcharts, sequence diagrams, architecture overviews, mind maps, and timelines. The API can select a published design or generate a creative diagram, then return SVG output and offer PNG downloads.


Visual Request-to-Diagram Output

Send a prompt brief to POST /rest/v1/generations and receive publication-ready vector diagrams:

POST /rest/v1/generationsExample diagram preview
Example three-column diagram

Core Capabilities

Smart Design Selection

Choose design: "auto" to let the model select the best published design or render creative custom vector JSX.

Restrained Aesthetic System

Built-in light/dark appearance modes, curated palette roles, and font families (Inter (inter), Source Sans 3 (source-sans-3), Archivo (archivo), and Barlow Condensed (barlow-condensed)).

Free Instant Re-rendering

Change colors, fonts, or light/dark appearances on any generated diagram for free without consuming credits.

Vector SVG & Crisp PNG

Export standalone SVG files or crisp, browser-rendered PNG rasters up to 3x scale.


Quick Example Request

Send a request to POST /rest/v1/generations to create a diagram:

  curl -X POST https://svgdiagram.ai/rest/v1/generations \
  -H "Authorization: Bearer svg_sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Three-column overview of product features",
    "design": "auto",
    "appearance": "light",
    "fontId": "inter"
  }'

Example Response Payload

{
  "status": "ok",
  "item": {
    "id": "<generation-id>",
    "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\">...</svg>"
  }
}

Documentation Sections

Explore the documentation guides below to integrate diagram generation into your application:

Navigation

Type to search…

↑↓ navigate↵ selectEsc close