Skip to main content
GET any of these after /api/v1/diagrams/:id/, with your key. The response is the file, with its Content-Type. Files are made on request: a picture takes a few seconds, a recording 20 to 60; the same request again is answered from cache. Downloads are always of the latest version. SVG and PDF are on paid plans: on the free plan they answer 403 with error.type plan_required, which a retry will not change; PNG and JPEG work on every plan. Every download made with your key also answers with X-Download-Url, a link to the same file that works without a key for 15 minutes, and X-Download-Expires-At, when it stops working. Hand it to a browser, a build step or a coding agent to fetch with a plain GET, for example curl -fsSL -o images/flow.png "$URL". It opens only that file of that diagram, with the same parameters, at that version: after a change to the diagram it answers 410 invalid_link, and once expired 401 invalid_link; download again for a new one.
Diagram of a download link's life: a download with your API key returns X-Download-Url, a link to only that diagram and file, with the same parameters and version, valid for 15 minutes (X-Download-Expires-At). A browser, build step or coding agent opens it without a key, for example with curl. After 15 minutes it answers 401 invalid_link; after a newer version (a change, edit or animation) it answers 410 invalid_link. Either way, download again with your key for a new link.

A download link opens one file without a key until it expires or the diagram changes; then download again with your key.

Parameters go in the query string, for example image.png?quality=print&width_in=3.25&device=phone: