Home / API
Charts from your own systems
The same engine behind the site, available over HTTP. Included with Team plans and in private testing for Pro.
How it works
Post a prompt, a data payload, or both. You get back the chart specification as JSON plus the rendered file inline. The specification is the same shape the website uses, so anything you can make here you can make through the API.
Request
POST https://api.chartgpt.co/v1/charts
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"prompt": "Bar chart of revenue by quarter, in $ thousand",
"data": [
{ "label": "Q1", "value": 42 },
{ "label": "Q2", "value": 51 },
{ "label": "Q3", "value": 47 },
{ "label": "Q4", "value": 68 }
],
"format": "svg"
}
Response
{
"request_id": "req_8f1c2a",
"spec": {
"type": "bar",
"title": "Q4 was the strongest quarter of the year",
"subtitle": "Revenue by quarter, in $ thousand",
"labels": ["Q1", "Q2", "Q3", "Q4"],
"series": [{ "name": "Revenue", "data": [42, 51, 47, 68] }]
},
"file": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 780 400\">…</svg>"
}
Notes
- Send
datawhen you already have structured values — it is faster and cannot be misread. - Send only
promptwhen you want the type and framing chosen for you. formatacceptssvg,pngorjson.- The rendered chart comes back in the response body, not as a link to a file we keep. Nothing is stored on our side, so save the specification or the file if you want it again — there is no URL to come back to.
Limits
Team plans include 10,000 calls a month and 20 requests a second. Higher volumes are available — write to [email protected] with a rough number and we will quote.
Try it in the browser first.
The website uses the same engine. Get a feel for what the model does with your data before you write any code.