80trust / 100
Pretty Charts
by Pocket Network in Documents & files
x402 APIPassing, checked 21 min ago
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.
POST https://agent.pocket.network/v1/pretty-charts
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 46 ms typical, 46 ms slowest 5%
- Last check
- 21 min ago
- Next check
- in 10 min
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent.pocket.network/v1/pretty-charts" \
-H "content-type: application/json" \
-d '{"chart":{"tooltip":false,"type":"bar","x":"a","y":"b"},"data":{"values":[{"a":"A","b":1}]}}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent.pocket.network%2Fv1%2Fpretty-charts
const res = await pay("https://agent.pocket.network/v1/pretty-charts", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"chart":{"tooltip":false,"type":"bar","x":"a","y":"b"},"data":{"values":[{"a":"A","b":1}]}}),
});
console.log(await res.json());Example input
{
"chart": {
"tooltip": false,
"type": "bar",
"x": "a",
"y": "b"
},
"data": {
"values": [
{
"a": "A",
"b": 1
}
]
}
}Example output
{
"data": {
"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
},
"portal": {
"provenance": "third-party-supplier",
"schemaCheck": "passed",
"serviceId": "pretty-charts"
}
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 21 min ago | Passed | 402 | 46 ms | $0.005 |
| 5 h ago | Passed | 402 | 54 ms | $0.005 |