Pretty Charts
Renders a chart from inline data (CSV, TSV, JSON or row values) and returns it as static SVG, or a complete HTML document, inside a JSON object. POST /v1/chart with either a full Vega-Lite v6 spec or the shorthand form (type, x, y, color, ranges, colors, theme). Every data mark carries a native tooltip, so nothing is scripted. Pay per request in USDC; no account, no API key.
Request
- Base URL: https://agent.pocket.network
- URL: https://agent.pocket.network/v1/pretty-charts
- Auth: none required
Request body
Response
The upstream response, served after payment settles.
For POST /v1/chart, the rendered chart as JSON: service ("pretty-charts"), format (svg or html), content_type (image/svg+xml or text/html), width and height in pixels, rows (inline data rows received), marks (data marks drawn), tooltips, render_ms, warnings (Vega and Vega-Lite warnings, if any) and html — the SVG element, or a complete HTML document for format html; always the last field. Errors return { error: { code, message, details? } } with a code such as invalid_spec, too_many_rows or render_failed. The other routes (healthz, version, capabilities, openapi.json) return their own small JSON documents.
Changes
No recorded changes to this operation across all 1 revision of this API.