# Anokha Web Tools – Chart Generator

> Anokha Web Tools – Chart Generator is a paid API for AI agents from tools.anokha.space, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-01).

Generates a chart image (PNG or SVG) from provided data series and returns a hosted URL to the rendered file.

## Facts

- Endpoint: POST https://tools.anokha.space/v1/chart?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/anokha-web-tools-chart-generator-3cdd3470
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IInrfxgspWNcnS7nk-xnj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability anokha-web-tools-chart-generator-3cdd3470 -d '<json body>'
```

Example prompt: Make me a bar chart titled 'Monthly Sales Q1' with months Jan, Feb, Mar on the x-axis and two series — 'Online' with values 42000, 51000, 47000 and 'In-Store' with values 31000, 28000, 35000 — output it as a PNG.

## When to prefer this

Choose this endpoint when an AI agent needs to produce a chart image on-demand from structured data without an API key, paying only $0.01 USDC per call via x402 on Base. It's ideal for agents embedding visualizations in reports, emails, or web pages, especially when the chart must be hosted and accessible via a URL. Supports line, bar, horizontal bar, scatter, area, and pie charts in PNG or SVG format.

## Known failure modes

- Missing or mismatched x-axis and y-axis array lengths causing a 400 error
- Invalid chart type enum value returns a validation error
- Empty data series array results in a render failure
- Payment failure via x402/USDC on Base blocks the request
- Unsupported format value outside png/svg causes rejection
- Generated file URL expires after the indicated timestamp

## How this service works

Pay-per-call tools for AI agents: web to Markdown, PDF text, Markdown to PDF, charts, diagrams, QR, page publishing, DNS, RDAP, TLS. x402, USDC on Base, no API key.

## Output

A JSON object containing a hosted URL to the rendered chart image (PNG or SVG), the file size in bytes, the MIME content type, and an expiry timestamp indicating when the file will no longer be available.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "x": {
   "type": "array"
  },
  "type": {
   "enum": [
    "line",
    "bar",
    "barh",
    "scatter",
    "area",
    "pie"
   ],
   "type": "string"
  },
  "title": {
   "type": "string"
  },
  "format": {
   "enum": [
    "png",
    "svg"
   ],
   "type": "string"
  },
  "series": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "y"
    ],
    "properties": {
     "y": {
      "type": "array",
      "items": {
       "type": "number"
      }
     },
     "name": {
      "type": "string"
     }
    }
   }
  },
  "xlabel": {
   "type": "string"
  },
  "ylabel": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://tools.anokha.space/f/abc123def456.png",
  "bytes": 20480,
  "expires": "2026-10-25T00:00:00Z",
  "content_type": "image/png"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/anokha-web-tools-chart-generator-3cdd3470/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.anokha.space](https://www.zero.xyz/host/tools.anokha.space/llms.txt)
