ChartKitBETA

ChartKit URL parameters

ChartKit draws a chart image from a single GET request. You add plain query parameters - no JSON body for this URL. Anything that can load a remote image (HTML `<img>`, Markdown, many email clients) can load the same address.

Use the chart URL generator for a live form; this page is the cheat sheet for hand-editing or for ChatGPT and Claude when you want query strings only.

Use cases

  • You write a static blog or docs site and want charts without bundling a chart library or running Node at build time for every edit.
  • You reuse one URL in a Markdown README, a newsletter’s HTML `<img>`, or a client report - anywhere remote images are allowed. The chart maker is the fastest way to tune the same parameters visually.
  • You teach an LLM to output `https://getchartkit.com/api/chart?…` so drafts include a real preview instead of a placeholder figure.

Parameters

ParameterRequiredDescription
typeYesbar, line, area, pie, donut, or horizontal-bar.
labelsYesComma-separated labels (categories or pie slices). Same count as each series after trimming.
s0, s1, …YesComma-separated numbers per series. At least s0 is required. Optional s1 adds a second series (bars/lines/area - not a second pie ring).
s0name, s1name, …NoLegend label for each series.
titleNoChart title. Use + or %20 for spaces in the query string.
wNoWidth in pixels (default 600).
hNoHeight in pixels (default 400).
legendNotrue or false (default true).
valueFormatNonumber (default), currency, percent, or compact (K/M/B-style ticks).
currencySymbolNoSymbol when valueFormat is currency. Default $. Encode non-ASCII symbols (e.g. €) in the URL.
formatNosvg (default), png, or jpg.

Add valueFormat=compact when you pass large raw numbers but want short axis labels. Add valueFormat=currency and currencySymbol (URL-encoded if needed) for money. Add format=png or jpg when your channel needs a bitmap instead of SVG.

Examples

1. Basic bar chart

https://getchartkit.com/api/chart?type=bar&labels=Jan,Feb,Mar&s0=100,200,300&s0name=Revenue&title=Monthly+Revenue

2. Line chart with two series

https://getchartkit.com/api/chart?type=line&labels=Q1,Q2,Q3,Q4&s0=12,18,22,28&s0name=2024&s1=10,15,19,24&s1name=2025&title=Growth&legend=true&format=svg

3. Pie chart

https://getchartkit.com/api/chart?type=pie&labels=North,South,East,West&s0=35,28,22,15&s0name=Share&title=Regions

How it works

  1. The server reads type, splits labels on commas, and parses each s0, s1, … into numbers.
  2. Lengths are aligned: if one series is shorter, the chart uses the overlap. Fix counts at the source when you need strict control.
  3. The response is an image (SVG or raster). Cache behavior follows normal HTTP rules; changing any parameter changes the picture.

Use with ChatGPT or Claude

Paste the parameter table above (or link to this page) and ask for a single line URL starting with `https://getchartkit.com/api/chart`. Tell the model not to return Chart.js JSON or fenced config blocks.

For a ready-made instruction block, open the AI chart generator or ChatGPT chart generator and copy the AI prompt from the tool.

FAQ

Is this chart API free to call?

You can use the public https://getchartkit.com/api/chart endpoint for normal testing. Automated or high-volume use may hit rate limits; check current terms and branding on output.

Can I embed the chart in HTML?

Yes. Set an `<img src="…">` to the full chart URL. No script is required on the page that displays it.

Can I use the chart in Markdown?

Yes. Use `!description` everywhere your Markdown renderer allows remote images.

Can ChatGPT generate ChartKit URLs?

Yes, if you give it this parameter list and the base URL. The AI chart generator page ships a copy-ready prompt.

Do I need JavaScript in the reader’s browser?

Not for an image embed: the URL returns SVG or a raster. A separate script embed exists for live DOM charts - see the main documentation.

More ChartKit tools