Diagrams

A diagram is the core object. It has an id, a title, native draw.io XML (xml), a cloud_provider, a diagram_type, and metadata. You create one by generating from a prompt, importing a draw.io file, or forking a gallery template. Every other write operation takes a diagram id.

The generate, review, fix loop

1

Generate

Turn a prompt into a diagram.
2

Review

Read the Well-Architected warnings and score returned on the diagram.
3

Fix or edit

Apply a fix for a specific warning, or edit freely with a prompt.
4

Export

Download native draw.io XML or SVG.

Credits

Reads are free. Generate, edit, fix, re-layout, and fork cost credits. Every billable response includes a usage block with credits charged and remaining. See Billing.

Sync vs async

Most operations return synchronously. Re-layout runs as an async job that you poll. See Async operations.

Output formats

Diagrams are returned as draw.io XML (editable at app.diagrams.net) and can be exported as SVG. See Export formats.

Idempotency

Send an Idempotency-Key header on billable create calls so a retried request never creates a duplicate. See Idempotency.