# Chart Splat Chart Rendering API

> Chart Splat Chart Rendering API is a paid API for AI agents from api.chartsplat.com, paid per call via x402, $0.005/call, status healthy (last checked 2026-10-13, last successful call 2026-10-09).

Renders a Chart.js configuration object (type, data, options) into a PNG image, supporting bar, line, pie, doughnut, radar, polar area, and candlestick/OHLC chart types.

## Facts

- Endpoint: POST https://api.chartsplat.com/chart?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: healthy
- Last checked: 2026-10-13
- Last successful call: 2026-10-09
- Success rate: 50% of calls made through Zero
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chart-splat-chart-rendering-api-89451c15
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Iwa5RzOHjt2aCMS9whLbs

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability chart-splat-chart-rendering-api-89451c15 -d '<json body>'
```

Example prompt: Generate a bar chart PNG showing monthly sales figures — labels January through June, with values 12000, 15000, 9000, 18000, 21000, and 17000 — give it the title 'H1 Sales' and make it 800 by 400 pixels.

## When to prefer this

Choose this endpoint when you need to produce a chart image (PNG) from structured data within an agent workflow, report, or chat message — especially when you already have a Chart.js-compatible data structure or need candlestick/OHLC financial charts. Prefer it over generic image generation services because it accepts structured Chart.js configs directly and supports financial chart types like candlestick and OHLC natively.

## Known failure modes

- Invalid or unsupported chart type returns a 400 error
- Malformed datasets array (missing required fields) causes a rendering error
- OHLC/candlestick datasets missing x/o/h/l/c fields fail to render
- Payment not provided or insufficient USDC balance returns a 402 Payment Required
- Excessively large datasets or complex options may cause timeout or oversized response
- Missing required 'datasets' field in data object returns validation error

## How this service works

A Chart.js-compatible charting API: POST a standard Chart.js `{ type, data, options }` — the same object you would hand to `new Chart()` — and get back a rendered PNG. Supports bar, line, pie, doughnut, radar, polar area, and candlestick/OHLC charts with the full set of Chart.js options. Pay per chart with x402 (USDC on Base) or use a Chart Splat API key — ideal for charts in agent reports, dashboards, and chat messages.

## Output

A rendered PNG image of the specified chart, produced server-side from the supplied Chart.js type, data, and options. The agent receives binary PNG data suitable for embedding in reports, messages, or dashboards.

## Example request

```json
{
 "data": {
  "labels": [
   "January",
   "February",
   "March",
   "April",
   "May",
   "June"
  ],
  "datasets": [
   {
    "data": [
     12000,
     15000,
     9000,
     18000,
     21000,
     17000
    ],
    "label": "H1 Sales",
    "borderColor": "rgba(75, 192, 192, 1)",
    "borderWidth": 1,
    "backgroundColor": "rgba(75, 192, 192, 0.8)"
   }
  ]
 },
 "type": "bar",
 "options": {
  "title": {
   "text": "H1 Sales",
   "display": true
  },
  "width": 800,
  "height": 400,
  "responsive": false
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "datasets"
   ],
   "properties": {
    "labels": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "datasets": {
     "type": "array",
     "items": {
      "type": "object"
     },
     "description": "One or more Chart.js datasets."
    }
   },
   "description": "Chart.js `data` object: `labels` plus one or more `datasets` (each `{ label, data, ...styling }`)."
  },
  "type": {
   "enum": [
    "bar",
    "line",
    "pie",
    "doughnut",
    "radar",
    "polarArea",
    "candlestick",
    "ohlc"
   ],
   "type": "string",
   "description": "Chart.js chart type. `candlestick`/`ohlc` are financial charts whose datasets take OHLC points (`{ x, o, h, l, c }`)."
  },
  "options": {
   "type": "object",
   "description": "Optional Chart.js `options` (title, legend, scales, colors, width, height, …)."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chart-splat-chart-rendering-api-89451c15/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chartsplat.com](https://www.zero.xyz/host/api.chartsplat.com/llms.txt)
