Generate chart images from an API
How do I generate chart images from code without a browser?
Send the labels and values to POST /v1/charts with the chart type and a title. Platemark picks round axis ticks, formats the numbers (money, percentages, any locale), lays out the labels so they don't collide, and returns a PNG. Ask for response json and you get a link that stays up for a year, which is what you want for emails, PDFs, Slack messages and markdown.
There's no headless browser and no chart library to install. Charts render on the server in well under a second, so a nightly report job or an n8n workflow can make dozens without slowing down. Every reply also carries one sentence of alt text describing the data, ready for the image's alt attribute.
curl https://platemark.rowhousesoftware.com/v1/charts -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{
"type": "line", "title": "Weekly signups", "response": "json",
"labels": ["Wk 1", "Wk 2", "Wk 3", "Wk 4"],
"series": [{"name": "Organic", "values": [120, 135, 150, 148]}, {"name": "Paid", "values": [80, 95, 70, 110]}]
}'
Questions
Which chart types are there?
bar, horizontal_bar, stacked_bar, line, area, pie and donut, in light or dark, at landscape, square, portrait, story or link preview sizes.
Can I put a chart in an email?
Yes. Use the url from the JSON reply in an img tag. Chart links are kept for a year.
What does it cost?
1 credit per chart. 100 credits a month are free, with a small watermark.