Generate a diagram
generate_diagramGenerate shareable architecture diagrams from natural language or source code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML) and receive a diagram ID for later edits.
Instructions
Generate a draw.io-style diagram with draft1.ai from a natural-language description or from source code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML). Returns a shareable URL plus a diagram_id for follow-up edits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Type of the input. Defaults to "auto" (the API detects the input type). | |
| prompt | Yes | What to diagram: a plain-English description (e.g. 'a web app with a load balancer, two app servers and a postgres db') or raw source code pasted verbatim. |