ChartQuery

Diagram Render

Render a previously saved diagram by ID. Public — no API key required. Supports ?format= and ?query= overrides.

GET
/v1/diagram/render/{id}

Path Parameters

id*string

The diagram ID returned in the X-Diagram-Render-URL header when saving a diagram. Format: cq-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Query Parameters

format?string

Override output format.

Default"svg"
Value in"svg" | "png" | "jpeg" | "pdf"
query?string

Override the diagram source code (URL-encoded).

share?boolean

Set share=true to persist the config and receive JSON instead of an image: { id, render_url, view_url, embed_url, expires_in }. Free plan: 3-day expiry with watermark. Paid plan: 6-month expiry, no branding.

Default"false"
Value in"false" | "true"

Response Body

application/json

application/json

curl -X GET "https://api.chartquery.com/v1/diagram/render/string"
Empty
{
  "error": "Bad Request"
}
{
  "error": "Internal Error"
}