Image APIs
API reference › Charts

A bar, line, area, pie or donut chart from a list of numbers, as SVG or PNG; no template needed

POST/v1/charts

POST/v1/charts

A bar, line, area, pie or donut chart from a list of numbers, as SVG or PNG; no template needed

Numbers in, a chart at a hosted URL out. format svg (the default) is drawn in the worker with no browser: a few KB, sharp at any size, ready for a web page, a README or a slide. Use png, jpeg or webp for email and social cards, which do not show SVG. values and labels take an array or a comma-separated string. The same chart fits inside a template as a chart layer with these properties. The record is an image: fetch it again with get_image.

REQUEST BODY · APPLICATION/JSON · REQUIRED
{
  "kind": "bar",
  "values": [
    120,
    180,
    150,
    210,
    260,
    190,
    174
  ],
  "labels": "Mon,Tue,Wed,Thu,Fri,Sat,Sun",
  "show_values": true,
  "padding": 24
}
In the full reference
REQUEST
curl -X POST "https://api.imageapis.com/v1/charts" \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "bar",
  "values": [
    120,
    180,
    150,
    210,
    260,
    190,
    174
  ],
  "labels": "Mon,Tue,Wed,Thu,Fri,Sat,Sun",
  "show_values": true,
  "padding": 24
}'
RESPONSE
200With response=binary: the file itself, with X-Image-Id and X-Image-Url headers
201Created
{
  "id": "img_3vq8kd2mzr7xw4hbnc6t",
  "object": "image",
  "status": "completed",
  "url": "https://img.imageapis.com/i/img_3vq8kd2mzr7xw4hbnc6t.svg",
  "format": "svg",
  "width": 800,
  "height": 400,
  "template": "chart",
  "bytes": 2259,
  "units": 1,
  "created": "2026-10-10T18:04:11Z",
  "completed": "2026-10-10T18:04:12Z",
  "expires": "2026-11-09T18:04:11Z"
}
202Accepted: rendering in the background; the record has status pending and the webhook gets the finished one
{
  "id": "img_3vq8kd2mzr7xw4hbnc6t",
  "object": "image",
  "status": "completed",
  "url": "https://img.imageapis.com/i/img_3vq8kd2mzr7xw4hbnc6t.svg",
  "format": "svg",
  "width": 800,
  "height": 400,
  "template": "chart",
  "bytes": 2259,
  "units": 1,
  "created": "2026-10-10T18:04:11Z",
  "completed": "2026-10-10T18:04:12Z",
  "expires": "2026-11-09T18:04:11Z"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.