When to use this API
When you need a chart image — for an email, a Slack message, a PDF, or anywhere JavaScript charting libraries can't run. The entire chart is encoded in the URL; there's no POST body, no JSON request, no server-side session. This is a drop-in replacement for the deprecated Google Image Charts. The non-obvious value: because the chart IS the URL, you can bookmark it, version-control it, or generate it from a template string — and anyone who can open a link can see the chart. For interactive dashboards with zoom and tooltips, use a JavaScript charting library instead.
Plotting a line chart from data points
"Show me a trend of monthly revenue." A line chart (cht=lc) is the most direct way to turn a sequence of numbers into a visual trend. Data goes in chd=t:... using text encoding (decimal values, comma-separated), the title goes in chtt with + for spaces, and dimensions go in chs.
curl "https://image-charts.com/chart?cht=lc&chd=t:12,18,25,22,30,28,35&chs=600x300&chtt=Monthly+Revenue+2025&chts=333333,18&chco=4285F4&chf=bg,s,FFFFFFDD&chxt=x,y&chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul" | head -c 10000
HTTP 200 OK
Content-Type: image/png
Content-Length: ~22 KB
Cache-Control: public, max-age=691200
The response is a 600×300 PNG — a blue line connecting seven data points from 12 (January) to 35 (July), with month labels on the x-axis and "Monthly Revenue 2025" as the title. The t: prefix in chd selects text encoding, which accepts plain decimal numbers. The API also supports s: (simple encoding, maps A–a to 0–61) and e: (extended, maps to 0–4095) — holdovers from the Google Charts era designed for URL-length limits on large datasets. For most human-authored URLs, t: is the right choice because it's readable and debuggable. The | pipe character is the universal separator: it divides axis labels in chxl, data series in chd, and legend entries in chdl.
Your monthly revenue for 2025 trends upward from 12 in January to 35 in July, with a brief dip in April. Here's the chart: https://image-charts.com/chart?cht=lc&chd=t:12,18,25,22,30,28,35&chs=600x300&chtt=Monthly+Revenue+2025&chts=333333,18&chco=4285F4&chf=bg,s,FFFFFFDD&chxt=x,y&chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul
Creating a pie chart for proportional breakdowns
"What's the breakdown of our budget by department?" Pie charts use cht=p3 for a 3D look or cht=p for flat. Data values in chd=t: become slice sizes — the API normalizes them to percentages. Slice labels go in chl (pie-specific; other chart types use chxl for axis labels), and colors in chco map to slices in order.
curl "https://image-charts.com/chart?cht=p3&chd=t:42,28,18,12&chs=600x300&chl=Engineering|Marketing|Operations|Sales&chco=4285F4,EA4335,FBBC04,34A853&chtt=Budget+by+Department&chts=333333,18" | head -c 10000
HTTP 200 OK
Content-Type: image/png
Content-Length: ~15 KB
Cache-Control: public, max-age=691200
The response is a 3D pie chart with four slices: Engineering (42%), Marketing (28%), Operations (18%), and Sales (12%). The values 42,28,18,12 sum to 100, so each maps directly to its percentage — but the API computes the ratio regardless, so 420,280,180,120 would produce the identical chart. Each color in chco maps to the corresponding slice in order, and chl is the one parameter that only applies to pie charts; for all other chart types, labels go through chxl. The chts=333333,18 parameter sets the title to dark gray at 18px — a pair that appears in nearly every well-styled chart.
Your budget splits into Engineering 42%, Marketing 28%, Operations 18%, and Sales 12%. Here's the pie chart: https://image-charts.com/chart?cht=p3&chd=t:42,28,18,12&chs=600x300&chl=Engineering|Marketing|Operations|Sales&chco=4285F4,EA4335,FBBC04,34A853&chtt=Budget+by+Department&chts=333333,18
Building a grouped bar chart for side-by-side comparisons
"Compare last quarter's sales across five regions." Grouped bar charts (cht=bvg) place bars side by side for direct comparison. Multiple data series are separated by | in chd, and the legend labels in chdl map to the series in order.
curl "https://image-charts.com/chart?cht=bvg&chd=t:45,62,38,71,55|32,48,41,55,40&chs=600x300&chxt=x,y&chxl=0:|APAC|EMEA|LATAM|NAM|CIS&chdl=Q3+2025|Q4+2025&chco=4285F4,EA4335&chtt=Regional+Sales&chts=333333,18&chf=bg,s,FFFFFFDD" | head -c 10000
HTTP 200 OK
Content-Type: image/png
Content-Length: ~18 KB
Cache-Control: public, max-age=691200
The response is a grouped bar chart with five region groups, each showing two bars (Q3 in blue, Q4 in red). The | separator in chd splits the two series: everything before the pipe is series one, everything after is series two. The two colors in chco map one per series — all Q3 bars are blue, all Q4 bars are red. The chf=bg,s,FFFFFFDD sets a semi-transparent white background, which is useful when embedding charts on colored surfaces like Slack cards or email backgrounds.
Regional sales comparison: NAM leads at 71 (Q3) and 55 (Q4), followed by EMEA at 62 and 48. LATAM shows the strongest relative gain between quarters. Here's the chart: https://image-charts.com/chart?cht=bvg&chd=t:45,62,38,71,55|32,48,41,55,40&chs=600x300&chxt=x,y&chxl=0:|APAC|EMEA|LATAM|NAM|CIS&chdl=Q3+2025|Q4+2025&chco=4285F4,EA4335&chtt=Regional+Sales&chts=333333,18&chf=bg,s,FFFFFFDD
Pitfalls
- Parameter names are inherited from Google Charts (2007).
cht= chart type,chd= data,chs= size,chtt= title,chco= colors,chxl= axis labels. These abbreviations are not intuitive and are not documented on Image Charts' own site — they come from the Google Image Charts spec. There is no alternative naming. - The pipe
|is a reserved separator everywhere. It divides labels inchxl, series inchd, legend entries inchdl, and slice labels inchl. If your data contains a literal pipe, encode it as%7C. Spaces in parameter values use+. - The response is binary PNG, not JSON. You cannot parse the output for metadata or data extraction. The chart image IS the output. If you need structured data back from a chart, this is the wrong API.
- Free-tier images are capped at 999×999 pixels. Passing
chs=1200x800silently produces a 999-pixel-wide image. Theicacandichmparameters unlock larger dimensions on paid accounts.
One-line summary for the user
I can generate chart images — line, pie, bar, radar, scatter, and more — as URLs with all configuration in the query string and no authentication required.