Agentic Portal

Pretty Charts

documents
Serving

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.

Endpoint
POST https://agent.pocket.network/v1/pretty-charts/v1/chart
Price per call
$0.005 USD
Networks payable on
Base (eip155:8453), Tempo (eip155:4217)
Protocol
rest

Calling it

The first call returns 402 Payment Required with the terms. Sign for those terms and retry the same request with the payment attached.

Example request

A real, working call — the request the service card verifies against.

curl -X POST https://agent.pocket.network/v1/pretty-charts/v1/chart \
  -H 'content-type: application/json' \
  -d '{"data":{"values":[{"a":"A","b":1}]},"chart":{"type":"bar","x":"a","y":"b","tooltip":false}}'
Example response

The response this call returned, captured 2026-09-21 23:48:51 UTC.

{
  "portal": {
    "provenance": "third-party-supplier",
    "serviceId": "pretty-charts",
    "schemaCheck": "unchecked"
  },
  "data": {
    "service": "pretty-charts",
    "format": "svg",
    "content_type": "image/svg+xml",
    "width": 656,
    "height": 405,
    "rows": 1,
    "marks": 1,
    "tooltips": false,
    "render_ms": 42,
    "warnings": [],
    "html": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" class=\"marks\" width=\"656\" height=\"405\" viewBox=\"0 0 656 405\"><rect width=\"656\" height=\"405\" fill=\"white\"/><g fill=\"none\" stroke-miterlimit=\"4\" transform=\"translate(51,10)\"><g class=\"mark-group role-frame root\" role=\"graphics-object\" aria-roledescription=\"group mark container\"><g transform=\"translate(0,0)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0.5,0.5h600v360h-600Z\" stroke=\"#ddd\"/><g><g class=\"mark-group role-axis\" aria-hidden=\"true\"><g transform=\"translate(0.5,0.5)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0,0h0v0h0Z\" pointer-events=\"none\"/><g><g class=\"mark-rule role-axis-grid\" pointer-events=\"none\"><line transform=\"translate(0,360)\" x2=\"600\" y2=\"0\" stroke=\"#ddd\" stroke-width=…"
  }
}

Try it

Make one real paid call from your own wallet — about $0.005 on Base (eip155:8453). The wallet signs; nothing here holds a key. You'll see exactly what the service answers.

No browser wallet found. Install MetaMask, Rabby, or Coinbase Wallet to try a call here.

Supported methods

Methods the registry lists for this service. The portal forwards any call as sent; the supplier decides what it answers, and a delivered answer is settled.

Methods Pretty Charts accepts, and whether each reads or writes.
MethodEffect
GET /healthzread
GET /v1/capabilitiesread
GET /v1/openapi.jsonread
GET /v1/versionread
POST /v1/chartread

Schemas

Published by the service itself. The example above is generated from these.

Request schema
{
  "type": "object",
  "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": {
    "data": {
      "type": "object",
      "description": "Inline data; exactly one of csv, tsv, json or values.",
      "properties": {
        "csv": {
          "type": "string",
          "description": "CSV text with a header row. Numbers and ISO dates are parsed."
        },
        "tsv": {
          "type": "string",
          "description": "Tab-separated text with a header row."
        },
        "json": {
          "type": "string",
          "description": "A JSON array of row objects, as a string."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Row objects."
        }
      }
    },
    "spec": {
      "type": "object",
      "description": "A Vega-Lite v6 spec. Any `url` anywhere in it is refused."
    },
    "chart": {
      "type": "object",
      "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.",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "x": {},
        "y": {},
        "color": {},
        "title": {},
        "tooltip": {},
        "xRange": {
          "type": "array"
        },
        "yRange": {
          "type": "array"
        },
        "colors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        }
      }
    },
    "options": {
      "type": "object",
      "description": "Render options.",
      "properties": {
        "format": {
          "type": "string",
          "enum": [
            "svg",
            "html"
          ],
          "default": "svg"
        },
        "tooltips": {
          "type": "boolean",
          "default": true
        },
        "theme": {
          "type": "string",
          "description": "A vega-themes preset",
          "e.g. dark.": null
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "background": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      }
    }
  }
}
Response schema
{
  "type": "object",
  "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": [
    {
      "service": "pretty-charts",
      "format": "svg",
      "content_type": "image/svg+xml",
      "width": 480,
      "height": 300,
      "rows": 2,
      "marks": 2,
      "tooltips": true,
      "render_ms": 41,
      "warnings": [],
      "html": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"480\" height=\"300\" viewBox=\"0 0 480 300\">…</svg>"
    }
  ]
}