868 B
868 B
| name | description |
|---|---|
| Diagram Generator | Generate Mermaid diagrams as SVG via the Nexus content job API |
Diagram Generator
Generate diagrams from natural language descriptions. Supports flowcharts, sequence diagrams, ER diagrams, Gantt charts, and more using Mermaid syntax rendered to SVG.
Usage
Submit a content job via POST /api/companies/{companyId}/content-jobs:
{
"jobType": "diagram",
"input": {
"prompt": "A flowchart showing user login flow with success and failure paths",
"diagramType": "flowchart"
}
}
Fields:
prompt(required): Natural language description of the diagramdiagramType(optional): Hint for diagram type —flowchart,sequence,er,gantt,class,pie
Output
The job returns a DiagramBundle with:
svg: Rendered SVG stringmermaidSource: Raw Mermaid source code