# RelayStation Chart Generator

> RelayStation Chart Generator is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Renders bar, line, or pie charts from JSON data and returns a report-ready PNG image in a single API call.

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/generate/chart
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-chart-generator-c722cd79
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_M79M2z-JLsedXtZx-578l

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 relaystation-chart-generator-c722cd79 -d '<json body>'
```

Example prompt: Can you generate a bar chart PNG from this JSON sales data — categories on the X axis and revenue on the Y axis, with the title 'Q1 Sales by Region'?

## When to prefer this

Choose this endpoint when you need to programmatically generate a chart image (PNG) from structured JSON data in a single call — ideal for automated report generation, dashboard snapshots, or embedding charts in documents without a full charting library. Prefer it over client-side charting libraries when the chart needs to be a static image artifact produced server-side by an agent.

## Known failure modes

- Invalid or malformed JSON data returns a 400 error
- Unsupported chart type (not bar/line/pie) returns a validation error
- Malformed axis or series structure causes rendering failure
- Network timeout on large or complex datasets
- x402 payment failure if wallet balance is insufficient

## How this service works

$0.0002/call. Render bar, line, or pie charts to PNG from JSON data — report-ready images in one call. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

A PNG image binary of the rendered chart (bar, line, or pie), suitable for embedding in reports, dashboards, or documents. The image is returned directly in the response at $0.0002 per call (minimum 1¢ x402 charge).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "label",
         "value"
        ],
        "properties": {
         "label": {
          "type": "string",
          "maxLength": 120
         },
         "value": {
          "type": "number"
         }
        }
       },
       "maxItems": 50,
       "minItems": 1
      },
      "type": {
       "enum": [
        "bar",
        "line",
        "pie"
       ],
       "type": "string"
      },
      "color": {
       "type": "string",
       "maxLength": 32
      },
      "title": {
       "type": "string",
       "maxLength": 200
      },
      "width": {
       "type": "integer",
       "maximum": 2000,
       "minimum": 200
      },
      "height": {
       "type": "integer",
       "maximum": 2000,
       "minimum": 150
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-chart-generator-c722cd79/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
