{"openapi":"3.1.0","info":{"title":"x402 Dataviz API","version":"1.0.0","description":"Pay-per-call chart/dataviz generation for AI agents.","x-guidance":"Use POST /chart to render a bar, line, or area chart to SVG from structured data. Send { type: \"bar\"|\"line\"|\"area\", title?: string, theme?: \"light\"|\"dark\", data: [{ x: string, values: Record<string, number> }] }. Response is 200 image/svg+xml on success, 400 with { error, details } on invalid input. You are charged only when an SVG is actually returned — invalid input and render failures cost nothing.","x-payment-policy":"NEVER CHARGED FOR AN UNDELIVERABLE ANSWER. The x402 middleware cancels settlement for any response >= 400, so every error below moves $0.00 and emits no payment-response header."},"paths":{"/chart":{"post":{"operationId":"renderChart","summary":"Render a bar/line/area chart to SVG","tags":["Dataviz"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","data"],"properties":{"type":{"type":"string","enum":["bar","line","area"]},"title":{"type":"string"},"theme":{"type":"string","enum":["light","dark"]},"data":{"type":"array","items":{"type":"object","required":["x","values"],"properties":{"x":{"type":"string"},"values":{"type":"object","additionalProperties":{"type":"number"}}}}}}}}}},"responses":{"200":{"description":"Rendered SVG chart. The only response you are charged for.","content":{"image/svg+xml":{"schema":{"type":"string"}}}},"400":{"description":"NOT CHARGED. Invalid request — malformed JSON, unknown chart type, empty data array, or a non-finite series value. See `details` for the offending field. Do not retry unchanged."},"402":{"description":"Payment Required"},"405":{"description":"NOT CHARGED. Wrong HTTP verb for this resource; see the Allow header."},"500":{"description":"NOT CHARGED. Rendering failed, so no SVG was produced."}}}}}}