Bring your own data
Create a chart, load a CSV, and export it as a PNG.
Charts can run on your own data instead of a library statistic.
1. Create an empty chart
curl -X POST "https://api.kitegraph.com/v1/charts" \
-H "Authorization: Bearer kg_live_…" -H "Content-Type: application/json" \
-d '{ "kind": "line", "meta": { "title": "US electricity by source" } }'
→ { "id": "7ab3…", … }
2. Load a CSV
A header row plus one row per period. The first column is the period; each other column is a series. See Data shapes for each chart type's layout.
# data.csv
Year,Coal,Solar
2018,1149487,63825
2025,737151,295671
curl -X PUT "https://api.kitegraph.com/v1/charts/7ab3…/data" \
-H "Authorization: Bearer kg_live_…" \
-H "Content-Type: text/csv" \
--data-binary @data.csv
3. Export a PNG
curl "https://api.kitegraph.com/v1/charts/7ab3…/export/png" \
-H "Authorization: Bearer kg_live_…" -o chart.png
Export also serves svg, pdf, and csv. Rendering is synchronous; a busy renderer returns 503, so retry after a moment.