Quick Start
Get a chart rendered in under 2 minutes with cURL, Node.js, or Python.
1. Get an API Key
Sign up at Chart-Output, then create an API key from the API Keys page. Use pk_test_... for development.
2. Render Your First Chart
cURL
curl -X POST https://chart-output.com/api/v1/render \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "line",
"data": {
"labels": ["Jan", "Feb", "Mar"],
"datasets": [{"label": "Revenue", "data": [12000, 15000, 18000]}]
}
}' --output chart.pngNode.js
npm install @chart-output/node
import { ChartOutput } from '@chart-output/node';
import fs from 'fs';
const client = new ChartOutput({ apiKey: 'YOUR_API_KEY' });
const buffer = await client.render({
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar'],
datasets: [{ label: 'Revenue', data: [12000, 15000, 18000] }],
},
});
fs.writeFileSync('chart.png', buffer);Python
pip install chart-output
from chart_output import ChartOutput
client = ChartOutput(api_key="YOUR_API_KEY")
buf = client.render(
type="line",
data={
"labels": ["Jan", "Feb", "Mar"],
"datasets": [{"label": "Revenue", "data": [12000, 15000, 18000]}],
},
)
with open("chart.png", "wb") as f:
f.write(buf)3. Use a Template
Skip the spec and use a pre-built template like mrr-trend or funnel-conversion:
# Node.js
const buf = await client.renderTemplate('mrr-trend', {
data: [12000, 15000, 18000, 22000, 25000],
});
# Python
buf = client.render_template("mrr-trend", data=[12000, 15000, 18000, 22000, 25000])Next Steps
- API Reference – Full endpoint docs + OpenAPI spec
- Recipes – Copy-paste examples for common use cases
- Templates Gallery – All built-in templates