Fig. 00 — Chart Render API

Plot data
into images.
On demand.

Send a JSON config to one endpoint, get back a crisp chart image. No headless browser, no client library, no build step — just a URL you can drop into an <img>, an email, a PDF, or a bot.

12+chart types
3PNG · JPEG · WebP
~30mscached response
x: 0,0 ↘ rendered server-side
GET /api/v1/chart
Example line chart rendered by chart.hanif.app showing weekly traffic
200 OK · image/png · watermarked

Fig. 01 — The whole flow

Three moves from numbers to a picture.

01 / CONFIG

Describe it

A small JSON object — type, data, options. Identical to Chart.js, so there's nothing new to learn.

02 / REQUEST

Send it

POST the JSON, or pass it as a query on GET. No API key required to start.

03 / IMAGE

Embed it

Receive a watermarked image — sized, themed and ready for any surface that renders a picture.

Fig. 02 — Why it's built this way

[ AUTO-THEME ]

Beautiful by default, exact when you need it

Pass raw numbers and the renderer auto-assigns a balanced palette, smart legends and clean typography. Want pixel control? Every Chart.js option still passes straight through.

[ FORMATS ]

PNG, JPEG & WebP

Up to 4× device-pixel-ratio for retina-crisp output, transparent backgrounds included.

[ SPEED ]

Cached & rate-aware

Identical requests return from an in-memory LRU cache in milliseconds. Concurrency-guarded so the service stays responsive under load.

[ EMBED ]

Just a URL

The GET endpoint is an image. Drop it in an <img src>, a Markdown file, an email template — anywhere a picture goes.

[ SAFE ]

Hardened input

Pixel-area caps, dataset limits and prototype-pollution guards keep one bad request from spoiling the rest.

Fig. 03 — Specimen catalog

Every type, rendered live by this very API.

Open full gallery

Fig. 04 — One request

Copy, paste,
ship.

No SDK to install. The request is a single HTTP call you can make from any language, any runtime, any cron job.

Full reference
curl
# POST a config, save the image
curl -X POST https://chart.hanif.app/api/v1/chart \
  -H "Content-Type: application/json" \
  -o chart.png \
  -d '{
    "type": "bar",
    "data": {
      "labels": ["Jan", "Feb", "Mar"],
      "datasets": [{ "data": [12, 19, 8] }]
    }
  }'

Fig. 05 — Where it goes

[ EMAIL ]

Transactional email

Inline charts in receipts and reports — email clients can't run JS, but they render images fine.

[ PDF ]

PDF & print

Generate report graphics on the server and pipe them straight into your PDF pipeline.

[ BOTS ]

Slack & Discord bots

Post a chart to a channel by handing a URL to the platform's image unfurler.

[ DASH ]

Static dashboards

Snapshot metrics into images for status pages and read-only embeds.

[ DOCS ]

Markdown & READMEs

GitHub renders images, not scripts. A chart URL is all you need.

[ OG ]

Social cards

This very page's preview image is a chart rendered by the API.

Start plotting in under a minute.

Open the playground, paste your numbers, and copy the URL. Free to start — pick a plan when you scale.

Open playground See pricing