Docs · Render API

POST a spec, download a chart

For pipelines, reports and anything that wants an image instead of an embed: a small HTTP service that turns the same JSON spec into a PNG or an SVG.

Self-hosted · Contact us

Your server, your workflow

Contact us to discuss a licensed render server. Integrating rendering into a product for your customers requires an OEM license. The examples below address localhost:8787 on a licensed installation. Compare plans or contact us for setup.

Hosted chart rendering

Through your AI assistant

Use the AI connector to render SVG charts with fair-use limits. The standalone HTTP endpoint documented here is for licensed self-hosted installations; there is no public hosted HTTP endpoint.


Treemap images

Treemap supports both PNG and SVG. Send type: "treemap" with the nodes format: at most 6 groups and 36 positive-valued or missing items. The renderer loads the chart module before validation. Images show the whole hierarchy; opening a group is an interactive reader action. Repeated requests with the same spec and dimensions produce identical bytes.

Licensed installation

Contact support to discuss installation and setup. In the render service, headless Chromium stays warm, requests arrive as a queue and fonts ship with the image. The API contract below applies once your licensed service is running.

GET /healthz answers {"ok": true} once the service is up.


Ridgeline images

Ridgeline supports PNG and SVG with the groups format. Send raw observations for up to 12 groups and 2,000 readings, including nulls. The renderer loads the lazy module before validation. Bandwidth, height scale and median sorting match the live chart; repeated requests with the same inputs produce identical image bytes.

PNG

curl -X POST http://localhost:8787/render \
  -H "Content-Type: application/json" \
  -d '{
    "spec": {
      "type": "column",
      "theme": "editorial",
      "title": "Weekly signups",
      "data": {
        "labels": ["Mon", "Tue", "Wed", "Thu", "Fri"],
        "series": [{ "name": "Signups", "values": [12, 19, 14, 27, 22] }]
      }
    }
  }' \
  --output chart.png
# -> a 1920x1080 PNG (960x540 at 2x, the defaults)
Parameter Default Bounds
spec required the same spec the spec reference documents
width 960 64–4096
height 540 64–4096
scale 2 1–4 (device-pixel multiplier; final PNG is width×scale by height×scale)

SVG

Add "format": "svg" and the browser is skipped entirely — parsing, scene building and serialization are pure computation, so SVG renders are cheap and exact. scale is ignored (vectors have no pixels); font families are referenced by name, not embedded.

curl -X POST http://localhost:8787/render \
  -H "Content-Type: application/json" \
  -d '{ "format": "svg", "spec": { ...same spec... } }'
# -> a standalone <svg>, no browser involved

Limits, all of them

The service treats every request as untrusted and refuses oversized work before running the expensive parts:

Limit Value On breach
Request body 1 MiB 413
Total values across all series 10,000 400, structured error
Drawn dots (dotplot) 10,000 400, structured error
Final PNG area (width×scale × height×scale) 16,777,216 px 400, structured error

Errors

Invalid input returns 400 with the same {path, message, hint} list as everywhere else in the project; unknown routes 404; unexpected failures 500. Nothing about a bad spec is ever a crash:

{
  "errors": [{
    "path": "type",
    "message": "Unknown chart type \"pei\"",
    "hint": "Use one of: line, area, bar, column, stacked, donut, scatter, number, dotplot, lollipop, dumbbell, range, waterfall, bullet, slope, heatmap, waffle, matrix, table, treemap, sunburst, bump, streamgraph, ridgeline, sankey"
  }]
}

Self-hosted rendering requires Team or an OEM license. See the Meiku Charts License.