Build charts into
any product.
REST API, MCP server, and typed SDKs for generating presentation-quality charts programmatically — from AI agents, pipelines, or SaaS products.
import { Charta } from '@charta/sdk'
const charta = new Charta({ apiKey: process.env.CHARTA_API_KEY })
const chart = await charta.generate({
type: 'waterfall',
data: [
{ label: 'Q4 ARR', value: 4200, isTotal: true },
{ label: 'New Biz', value: 980 },
{ label: 'Expansion', value: 540 },
{ label: 'Churn', value: -310 },
{ label: 'Q1 ARR', value: 5410, isTotal: true },
],
})
// chart.svg → SVG string, embed anywhere
// chart.png → PNG base64
// chart.chartId → insert into Google Slidesnpm install @charta/sdk·pip install charta·npx @charta/mcpNative tool for AI agents.
npx @charta/mcp — no install, no auth setup. Add one config block and your AI agent can generate charts as a first-class tool.
Works with Claude Desktop, Cursor, Windsurf, Cline, Continue, and any MCP-compatible client. The agent picks the right chart type, handles the data, and returns SVG.
generate_chartGenerate a chart — SVG string + chartIdlist_chart_typesAll supported types with data shapesget_chart_schemaJSON schema for a specific chart typesave_chartWrite chart to disk as SVG or PNGdescribe_chartRecommend the best chart type for given data{
"mcpServers": {
"charta": {
"command": "npx",
"args": ["-y", "@charta/mcp"]
}
}
}Same config for Cursor (.cursor/mcp.json) and Windsurf (~/.codeium/windsurf/mcp_config.json)
curl -X POST https://api.getcharta.ai/v1/charts/generate \
-H "X-Charta-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "waterfall",
"data": [
{ "label": "Q4 ARR", "value": 4200, "isTotal": true },
{ "label": "New Biz", "value": 980 },
{ "label": "Expansion", "value": 540 },
{ "label": "Churn", "value": -310 },
{ "label": "Q1 ARR", "value": 5410, "isTotal": true }
],
"output": "svg"
}'{
"svg": "<svg viewBox=\"0 0 400 220\" ...>...</svg>",
"chartId": "chart_k9x2m",
"type": "waterfall"
}One request. One chart.
POST your data. Get back SVG or PNG. No sessions, no SDKs required — works from any language, any pipeline.
https://api.getcharta.ai/v1X-Charta-Key: YOUR_API_KEYsvg · png · slides_urlFree: 5/day · Plus: 20/day · Business: unlimitedTyped for your stack.
Full type coverage for all chart types and options. Autocomplete tells you exactly what data each chart expects.
npm install @charta/sdkpip install chartanpx @charta/mcpfrom charta import Charta
client = Charta(api_key=os.environ["CHARTA_API_KEY"])
chart = client.generate(
type="waterfall",
data=[
{"label": "Q4 ARR", "value": 4200, "is_total": True},
{"label": "New Biz", "value": 980},
{"label": "Expansion", "value": 540},
{"label": "Churn", "value": -310},
{"label": "Q1 ARR", "value": 5410, "is_total": True},
],
)
chart.save("arr_bridge.png")
chart.insert_to_slides(slides_id=DECK_ID, slide_index=3)Supported chart types
12 types. All return valid SVG at configurable dimensions.
| type |
|---|
waterfall |
bar |
grouped-bar |
stacked-bar |
line |
area |
pie / donut |
scatter |
gantt |
mekko |
radar |
heatmap |
Start building today.
Free tier included — 5 AI credits/day, all chart types, no credit card required. Upgrade when you need more.