{"slug":"agent-pocket-network-v1-pretty-charts-06edd3","title":"Renders a chart from inline data (CSV, TSV, JSON or row values) and returns it a","host":"agent.pocket.network","method":"POST","resource":"https://agent.pocket.network/v1/pretty-charts","category":"other","description":"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 tool","price_listed":0.005,"price_asked":0.005,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":1002,"reported_calls_30d":4,"reported_payers_30d":2,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"chart":{"tooltip":false,"type":"bar","x":"a","y":"b"},"data":{"values":[{"a":"A","b":1}]}},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"description":"Exactly one of `spec` or `chart` is required. `data` is required with `chart` and optional with `spec` (a spec may carry inline data.values). Remote data URLs are refused; every input lives in the body.","properties":{"chart":{"description":"Shorthand that compiles to a single-view Vega-Lite spec. `type` is one of bar, line, area, point, scatter, circle, square, tick, rect, heatmap, arc, pie, donut, boxplot, errorbar, errorband, rule, text, trail; channels (x, y, color, size, shape, theta, ...) take a column name or a field definition; plus xRange, yRange, colors, colorScheme, stack, title, width, height, tooltip.","properties":{"color":{},"colors":{"items":{"type":"string"},"type":"array"},"height":{"type":"number"},"title":{},"tooltip":{},"type":{"type":"string"},"width":{"type":"number"},"x":{},"xRange":{"type":"array"},"y":{},"yRange":{"type":"array"}},"required":["type"],"type":"object"},"data":{"description":"Inline data; exactly one of csv, tsv, json or values.","properties":{"csv":{"description":"CSV text with a header row. Numbers and ISO dates are parsed.","type":"string"},"json":{"description":"A JSON array of row objects, as a string.","type":"string"},"tsv":{"description":"Tab-separated text with a header row.","type":"string"},"values":{"description":"Row objects.","items":{"type":"object"},"type":"array"}},"type":"object"},"options":{"description":"Render options.","properties":{"background":{"type":"string"},"format":{"default":"svg","enum":["svg","html"],"type":"string"},"height":{"type":"number"},"theme":{"description":"A vega-themes preset","e.g. dark.":null,"type":"string"},"title":{"type":"string"},"tooltips":{"default":true,"type":"boolean"},"width":{"type":"number"}},"type":"object"},"spec":{"description":"A Vega-Lite v6 spec. Any `url` anywhere in it is refused.","type":"object"}},"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"data":{"description":"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.","examples":[{"content_type":"image/svg+xml","format":"svg","height":300,"html":"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"480\" height=\"300\" viewBox=\"0 0 480 300\">…</svg>","marks":2,"render_ms":41,"rows":2,"service":"pretty-charts","tooltips":true,"warnings":[],"width":480}],"type":"object"},"portal":{"properties":{"provenance":{"const":"third-party-supplier"},"schemaCheck":{"enum":["passed","undeclared","unchecked"]},"serviceId":{"const":"pretty-charts"}},"required":["provenance","serviceId","schemaCheck"],"type":"object"}},"required":["portal","data"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.005,"price_match":true,"latency_ms":1002,"error":null}],"description_full":"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.","last_updated":"2026-09-24T14:03:18.798Z","schemes":["exact"]}