--- name: Diagram Generator description: 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`: ```json { "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 diagram - `diagramType` (optional): Hint for diagram type — `flowchart`, `sequence`, `er`, `gantt`, `class`, `pie` ## Output The job returns a `DiagramBundle` with: - `svg`: Rendered SVG string - `mermaidSource`: Raw Mermaid source code