

Chart Generator
Function
Available ActionsEach successful request consumes credits as outlined below.
generate_chart2cr
Details
Generate modern, professional charts and graphs from data. Supports multiple chart types including bar, line, pie, scatter, doughnut, radar, and more. Features five preset themes for different use cases: Corporate (professional blues and grays), Modern Dark (presentation-ready with vibrant accents), Minimal (publication-quality with subtle colors), Colorful (marketing-friendly with distinct hues), and Academic (colorblind-accessible). Charts can be exported in multiple formats including PNG, SVG, PDF, and WebP. The tool handles custom styling, responsive sizing, gradient fills, data labels, and complex configurations. Perfect for creating data visualizations for reports, presentations, dashboards, social media, and documentation. Returns chart images as signed URLs with configurable expiration or as base64-encoded data for immediate embedding.
Use Cases
Create business dashboards with professional charts, Generate marketing reports with colorful visualizations, Build presentation slides with modern dark-themed graphs, Produce academic papers with publication-quality figures, Design social media infographics with custom styling, Automate report generation with data-driven charts, Create real-time monitoring dashboards, Generate email campaign analytics visualizations, Build data analysis notebooks with embedded charts, Produce financial reports with professional formatting
Connect Your Agent In 5 Min
Watch the setup guide for your platform
Or Install Locally
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to https://api.agentpmt.com/mcp. All tool execution happens in the cloud and the server cannot edit any files on your computer.
npm install -g @agentpmt/mcp-routeragentpmt-setupActions(1)
generate_chart2cr13 params(2 required)Generate a modern, professional chart image from structured data. Supports 9 chart types (bar, line, pie, doughnut, scatter, bubble, radar, polarArea, horizontalBar), 5 preset themes plus custom styling, and 4 export formats (PNG, SVG, PDF, WebP). Returns chart as a cloud-stored file URL or base64-encoded data.
generate_chart2cr13 params(2 required)Generate a modern, professional chart image from structured data. Supports 9 chart types (bar, line, pie, doughnut, scatter, bubble, radar, polarArea, horizontalBar), 5 preset themes plus custom styling, and 4 export formats (PNG, SVG, PDF, WebP). Returns chart as a cloud-stored file URL or base64-encoded data.
chart_typerequiredstringType of chart to generate
Values:
barlinepiedoughnutscatterbubbleradarpolarAreahorizontalBar
datarequiredobjectChart.js compatible data object. Must contain 'labels' (array of strings) and/or 'datasets' (array of dataset objects). Each dataset has 'label' (string), 'data' (array of numbers or point objects), and optional color overrides.
Properties:
labels(array)- Array of label strings for chart categories/x-axisdatasets*(array)- Array of dataset objects, each with label, data, and optional stylingthemestringPreset theme: 'corporate' (professional blues/grays), 'modern_dark' (dark background, vibrant accents), 'minimal' (black/white/gray), 'colorful' (vibrant marketing colors), 'academic' (colorblind-accessible), 'custom' (no preset, use custom_options)
Values:
corporatemodern_darkminimalcolorfulacademiccustom
Default:
corporatewidthintegerChart width in pixels (100-2000)
Default:
600Range: 100 - 2000
heightintegerChart height in pixels (100-2000)
Default:
400Range: 100 - 2000
titlestringChart title text displayed on the chart
background_colorstringBackground color. Accepts named colors ('white', 'transparent'), HEX ('#FFFFFF'), RGB ('rgb(255,255,255)'), or HSL
Default:
whiteoutput_formatstringOutput format for the chart image: 'png' (raster), 'svg' (vector), 'pdf' (document), 'webp' (compressed)
Values:
pngsvgpdfwebp
Default:
pngdevice_pixel_ratiointegerDevice pixel ratio: 1 for normal displays, 2 for retina/high-DPI
Values:
12
Default:
1custom_optionsobjectCustom Chart.js options object to override theme defaults. Supports any Chart.js 3.x/4.x option (plugins, scales, etc.)
return_base64booleanIf true, returns base64-encoded image data instead of a file URL. Useful for embedding in emails or immediate display
Default:
falsestore_filebooleanIf true, stores the chart in cloud storage and returns a signed download URL
Default:
trueexpiration_daysintegerNumber of days until the stored file expires (1-7)
Default:
7Range: 1 - 7
curl -X POST "https://api.agentpmt.com/products/purchase" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ********" \
-d '{
"product_id": "69836138abdf9c195542120a",
"parameters": {
"action": "generate_chart",
"chart_type": "bar",
"data": {},
"theme": "corporate",
"width": 600,
"height": 400,
"background_color": "white",
"output_format": "png",
"device_pixel_ratio": 1,
"return_base64": false,
"store_file": true,
"expiration_days": 7
}
}'import requests
import json
url = "https://api.agentpmt.com/products/purchase"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
}
data = {
"product_id": "69836138abdf9c195542120a",
"parameters": {
"action": "generate_chart",
"chart_type": "bar",
"data": {},
"theme": "corporate",
"width": 600,
"height": 400,
"background_color": "white",
"output_format": "png",
"device_pixel_ratio": 1,
"return_base64": false,
"store_file": true,
"expiration_days": 7
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "69836138abdf9c195542120a",
parameters: {
"action": "generate_chart",
"chart_type": "bar",
"data": {},
"theme": "corporate",
"width": 600,
"height": 400,
"background_color": "white",
"output_format": "png",
"device_pixel_ratio": 1,
"return_base64": false,
"store_file": true,
"expiration_days": 7
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));const axios = require('axios');
const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "69836138abdf9c195542120a",
parameters: {
"action": "generate_chart",
"chart_type": "bar",
"data": {},
"theme": "corporate",
"width": 600,
"height": 400,
"background_color": "white",
"output_format": "png",
"device_pixel_ratio": 1,
"return_base64": false,
"store_file": true,
"expiration_days": 7
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.message);
});Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
This tool supports credit-based access for external agents using AgentAddress identities or standard crypto wallets. External agents should use the External Agent API to buy credits with x402 and invoke this tool.
1. Buy Credits
Purchase credits via x402 payment (500 credit minimum, 100 credits = $1).
# Request payment requirements (returns 402 + PAYMENT-REQUIRED header)
curl -i -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'
# Sign the EIP-3009 authorization, then retry with signature header
curl -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64-json>" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'2. Create a Session Nonce (nonce used in signed balance/invoke)
curl -s -X POST "https://www.agentpmt.com/api/external/auth/session" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET" }'3. Invoke This Tool
Sign the message with your wallet (EIP-191 personal-sign), then POST to the invoke endpoint.
# Sign this message (wallet MUST be lowercased):
# agentpmt-external
# wallet:0xyourwallet...
# session:<session_nonce>
# request:<request_id>
# method:POST
# path:/external/tools/chart-generator/actions/<actionSlug>/invoke
# payload:<sha256(canonical_json(parameters))>
curl -s -X POST "https://www.agentpmt.com/api/external/tools/chart-generator/actions/<actionSlug>/invoke" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xYOUR_WALLET",
"session_nonce": "<session_nonce>",
"request_id": "invoke-uuid",
"signature": "0x<signature>",
"parameters": {
"your_param": "value"
}
}'Usage Instructions
Usage guidance provided directly by the developer for this product.
Chart Generator - Tool Instructions
Overview
Generate modern, professional charts and graphs from data. Supports 9 chart types (bar, line, pie, doughnut, scatter, bubble, radar, polar area, horizontal bar), 5 preset themes plus custom styling, and 4 export formats (PNG, SVG, PDF, WebP). Charts can be returned as cloud-stored file URLs or base64-encoded data for immediate embedding. Powered by QuickChart API (Chart.js compatible).
Actions
generate_chart
Generate a chart image from structured data with theme and format options.
Required Parameters:
chart_type(string): Type of chart. One of:"bar","line","pie","doughnut","scatter","bubble","radar","polarArea","horizontalBar"data(object): Chart.js compatible data object. Must containlabels(array of strings) and/ordatasets(array of dataset objects). Each dataset haslabel(string),data(array of numbers or point objects), and optional color overrides (backgroundColor,borderColor,borderWidth).
Optional Parameters:
theme(string, default:"corporate"): Preset theme. One of:"corporate"- Professional blues/grays, white background, top legend. Best for business reports."modern_dark"- Dark background (#1E1E1E) with vibrant accent colors, bottom legend. Best for presentations."minimal"- Black/white/gray tones, very subtle grid. Best for publications."colorful"- Vibrant pink/blue/yellow/teal/purple/orange. Best for marketing and social media."academic"- Colorblind-accessible palette (blue, orange, green, purple, brown, gray), black grid. Best for scientific publications."custom"- No preset applied; usecustom_optionsto style from scratch.
width(integer, default: 600, range: 100-2000): Chart width in pixels.height(integer, default: 400, range: 100-2000): Chart height in pixels.title(string): Chart title text displayed on the chart.background_color(string, default:"white"): Background color. Accepts named colors ("white","transparent"), HEX ("#FFFFFF"), RGB ("rgb(255,255,255)"), or HSL.output_format(string, default:"png"): Output format. One of:"png"(raster),"svg"(vector, scalable),"pdf"(document),"webp"(compressed).device_pixel_ratio(integer, default: 1):1for normal displays,2for retina/high-DPI displays.custom_options(object): Custom Chart.js options object to override theme defaults. Supports any Chart.js 3.x/4.x option (plugins, scales, etc.).return_base64(boolean, default: false): If true, returns base64-encoded image data instead of a file URL. Useful for embedding in emails or immediate display.store_file(boolean, default: true): If true, stores the chart in cloud storage and returns a signed download URL.expiration_days(integer, default: 7, range: 1-7): Number of days until the stored file expires and is automatically deleted.
Example - Simple Bar Chart:
{
"action": "generate_chart",
"chart_type": "bar",
"data": {
"labels": ["Q1", "Q2", "Q3", "Q4"],
"datasets": [{"label": "Revenue", "data": [45000, 52000, 48000, 61000]}]
},
"title": "Quarterly Revenue 2025",
"theme": "corporate",
"width": 800,
"height": 500
}
Example - Multi-Dataset Line Chart (Dark Theme, Retina):
{
"action": "generate_chart",
"chart_type": "line",
"data": {
"labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
"datasets": [
{"label": "Product A", "data": [12, 19, 15, 22, 28, 25]},
{"label": "Product B", "data": [8, 14, 18, 16, 20, 24]}
]
},
"title": "Product Sales Comparison",
"theme": "modern_dark",
"width": 1000,
"height": 600,
"output_format": "png",
"device_pixel_ratio": 2
}
Example - Pie Chart (Colorful):
{
"action": "generate_chart",
"chart_type": "pie",
"data": {
"labels": ["Desktop", "Mobile", "Tablet"],
"datasets": [{"data": [55, 35, 10]}]
},
"title": "Traffic by Device",
"theme": "colorful"
}
Example - Scatter Plot (Academic, SVG):
{
"action": "generate_chart",
"chart_type": "scatter",
"data": {
"datasets": [{
"label": "Sample Data",
"data": [{"x": 10, "y": 20}, {"x": 15, "y": 25}, {"x": 20, "y": 22}, {"x": 25, "y": 30}]
}]
},
"title": "Correlation Analysis",
"theme": "academic",
"width": 700,
"height": 500,
"output_format": "svg"
}
Example - Custom Styled Chart:
{
"action": "generate_chart",
"chart_type": "bar",
"data": {
"labels": ["Mon", "Tue", "Wed", "Thu", "Fri"],
"datasets": [{"label": "Tasks Completed", "data": [5, 8, 12, 7, 10]}]
},
"title": "Weekly Productivity",
"theme": "custom",
"background_color": "#F5F5F5",
"custom_options": {
"plugins": {"legend": {"display": false}},
"scales": {"y": {"beginAtZero": true, "grid": {"color": "rgba(0, 0, 0, 0.1)"}}}
}
}
Example - Base64 Return (No File Storage):
{
"action": "generate_chart",
"chart_type": "line",
"data": {
"labels": ["1", "2", "3", "4", "5"],
"datasets": [{"label": "Values", "data": [10, 20, 15, 25, 30]}]
},
"theme": "minimal",
"return_base64": true,
"store_file": false
}
Example - PDF Export with Custom Expiration:
{
"action": "generate_chart",
"chart_type": "bar",
"data": {
"labels": ["Category A", "Category B", "Category C"],
"datasets": [{"label": "Results", "data": [65, 85, 75]}]
},
"title": "Survey Results",
"theme": "corporate",
"output_format": "pdf",
"width": 800,
"height": 600,
"expiration_days": 3
}
Response fields:
chart_type: Chart type usedtheme: Theme appliedformat: Output formatwidth,height: Dimensionssize_bytes: File size in bytes- When
return_base64is true:base64_data(string),content_type(MIME type) - When
store_fileis true:file_id(string),signed_url(temporary download URL),expiration_date(ISO date)
Data Format
Standard chart types (bar, line, pie, doughnut, radar, polarArea, horizontalBar):
{
"labels": ["Label 1", "Label 2", "Label 3"],
"datasets": [{
"label": "Dataset Name",
"data": [10, 20, 30],
"backgroundColor": "optional color override",
"borderColor": "optional border color",
"borderWidth": 1
}]
}
Scatter and bubble charts use point objects instead of simple values:
{
"datasets": [{
"label": "Points",
"data": [{"x": 10, "y": 20}, {"x": 15, "y": 25}]
}]
}
Multiple datasets are supported. Theme colors are auto-assigned to datasets that do not specify their own colors.
Workflows
- Business Dashboard Chart - Use
generate_chartwiththeme: "corporate", a bar or line chart, andstore_file: trueto get a signed URL for embedding in reports. - Email-Embedded Chart - Use
generate_chartwithreturn_base64: trueandstore_file: falseto get base64 data for inline embedding in emails. - Scientific Publication Figure - Use
generate_chartwiththeme: "academic",output_format: "svg"for scalable vector output suitable for print. - Marketing Infographic - Use
generate_chartwiththeme: "colorful", pie or doughnut chart, anddevice_pixel_ratio: 2for high-resolution social media images. - Dark Mode Presentation Slide - Use
generate_chartwiththeme: "modern_dark", large dimensions (1920x1080), anddevice_pixel_ratio: 2. - Custom Branded Chart - Use
theme: "custom"withcustom_optionsto apply your own colors, fonts, grid styles, and legend placement.
Notes
- Maximum chart dimensions are 2000x2000 pixels.
- Stored files expire after 1-7 days (configurable via
expiration_days). - The
dataobject must contain at least adatasetsarray. Thelabelsarray is required for most chart types but not for scatter/bubble charts. - When using
theme: "custom", no preset styling is applied. Combine withcustom_optionsfor full control. custom_optionsmerges on top of theme defaults, so you can start with a theme and override specific options.- The
device_pixel_ratio: 2option doubles the rendered resolution (useful for retina displays) but also increases file size. - If both
return_base64: trueandstore_file: trueare set, you get both the base64 data and a stored file URL. - Validation:
chart_typeanddataare required forgenerate_chart. Missing either returns a 400 error. - Recommended sizes: social media 800x600, reports 1000x600, presentations 1920x1080.














