v1

latestOpenAPI 3.1.02026-07-2418848.0 KB

Eraser DSL → Diagram

post/api/render/elements

Request body

backgroundboolean

Select transparent (false) or solid (true) background. Defaults to false.

theme'light' | 'dark'

Select "light" or "dark" theme. Defaults to "light".

imageQuality1 | 2 | 3

Image quality/resolution multiplier. Use 1 (low), 2 (medium), or 3 (high). Defaults to 2.

scale1 | 2 | 3

Deprecated. Use imageQuality instead.

returnImageAsFileboolean

When true, returns the image as a file stream instead of a URL.

returnFileboolean

Deprecated. Use returnImageAsFile instead.

titlestring

Title for the created Eraser file. Only applies when fileOptions.create is true. If not provided, title is derived from the diagram code.

Response

The result of the diagram generation

imageUrlstring

URL of the generated diagram as a PNG image

createEraserFileUrlstring

URL to create an Eraser file to edit the generated diagram. Not returned when fileOptions.create is true.

fileUrlstring

URL to the created Eraser file. Only returned when fileOptions.create is true.