On-demand image endpoint
GET /v1/diagrams/{id}/image — render any saved diagram to PNG or SVG, in light or dark theme, at any time.image_url from a generation
When a
POST /v1/diagrams/generate job reaches status: "succeeded", the resulting Generation carries an image_url rendered with the theme/format you requested.When to use which
Use the image endpoint when…
You already have a diagram
id and want its picture — for example to display an existing diagram, re-theme it (light ↔ dark), or switch format (PNG ↔ SVG). It does not call the AI model and does not count against your generation quota.Use image_url when…
You just generated a brand-new diagram and want the rendered image that matches the
theme/format you asked for, without a second round trip. It is only present once the generation has status: "succeeded".Get an image on demand
diagrams:read scope.
The UUID of the diagram to render.
Color theme of the rendered image. One of
light or dark.Image format. One of
png or svg.Request
Response
The rendered diagram image (or a link to it), in the requested
theme and format. The response carries the standard X-Request-Id and RateLimit-* headers.The image endpoint never calls the AI model and does not consume your monthly generation quota. It is still subject to the per-key burst limit (120 requests / 60s).
Errors
404 — unknown diagram
404 — unknown diagram
A diagram
id that doesn’t exist (or isn’t visible to your key) returns not_found_error / resource_not_found.400 — invalid theme or format
400 — invalid theme or format
An unsupported
theme or format value returns invalid_request_error / invalid_parameter, with param naming the offending query parameter.403 — missing scope
403 — missing scope
A key without the
diagrams:read scope returns permission_error / insufficient_scope.image_url from a generation
When you create a diagram from natural language with POST /v1/diagrams/generate, the job runs asynchronously. You poll GET /v1/generations/{id} until it finishes. On success, the Generation object includes both the saved diagram and an image_url rendered with the theme and format you requested at generation time.
Start the generation
POST /v1/diagrams/generate with your prompt (and optional theme, format, name, folder_id) returns 202 Accepted with status: "queued" and a Location header pointing at the generation.Poll until succeeded
GET /v1/generations/{id} until status is succeeded (or failed). Honor the Retry-After hint between polls.The rendered image for the generated diagram, in the
theme/format requested on the generate call. null until the job reaches status: "succeeded". It is a path relative to the API base (https://justflow.it) — prepend the base to fetch it, e.g. https://justflow.it{image_url}.Embedding the image
Because API keys are server-side only (no CORS, never exposed in a browser), don’t point an<img src> directly at the endpoint with a key attached. Instead, fetch the bytes on your server and serve or store them yourself.