# x402 Agent Hub – Visual Card & Sparkline Renderer

> x402 Agent Hub – Visual Card & Sparkline Renderer is a paid API for AI agents from x402-agent-hub.x402-agent-hub.workers.dev, paid per call via x402, $0.025/call, status unknown (last checked 2026-11-14).

Renders deterministic OpenGraph banners, social KPI slides, and trading signal sparkline cards as SVG or PNG images

## Facts

- Endpoint: POST https://x402-agent-hub.x402-agent-hub.workers.dev/v1/render/card?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-agent-hub-visual-card-sparkline-renderer-102db73e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YR6pz8mUmOFNXhPjgPB6p

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 x402-agent-hub-visual-card-sparkline-renderer-102db73e -d '<json body>'
```

Example prompt: Generate a dark-themed OpenGraph banner (1200x630) for my product launch with the badge 'New Release', headline 'Ship Faster with AI', subtitle 'Built for developers', brand name 'Acme Corp', and accent color #38BDF8 — return it as a PNG.

## When to prefer this

Choose this endpoint when you need deterministic, pixel-exact, zero-typo image cards for social sharing, marketing, or trading dashboards without relying on an LLM image model. It is ideal for automated pipelines that must produce consistent branded visuals (OG banners, KPI slides, sparkline charts) at fixed dimensions with structured data inputs rather than freeform prompts. Prefer it over DALL-E or Stable Diffusion when the output must be reproducible, text-accurate, and data-driven rather than generative and probabilistic.

## Known failure modes

- Invalid or missing template enum value — returns 400 with validation error
- Malformed accentColor hex string — may default or return 400
- Empty sparkline array for trading_signal template — chart may render without data curve
- Unsupported format enum value — returns 400
- Payment not provided or x402 payment rejected — returns 402 Payment Required
- Cloudflare Worker timeout on complex SVG — returns 504

## How this service works

Deterministic visual card & sparkline renderer for coding and marketing agents. Produces crisp, zero-typo 1200x630 OpenGraph banners, 1080x1350 portrait social KPI slides, or trading signal sparkline cards as vector SVG (with data URI) or binary PNG.

## Output

When format is 'json': returns a JSON object with width, height, mimeType, and a base64-encoded data URI of the SVG. When format is 'svg': returns raw SVG markup as image/svg+xml. When format is 'png': returns a binary PNG image. All output is a fully rendered, zero-typo graphic at the exact dimensions of the chosen template (1200x630 for og_banner and trading_signal, 1080x1350 for social_kpi).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "badge": {
   "type": "string",
   "description": "Top pill badge label"
  },
  "theme": {
   "enum": [
    "dark",
    "light"
   ],
   "type": "string"
  },
  "title": {
   "type": "string",
   "description": "Primary headline text"
  },
  "format": {
   "enum": [
    "json",
    "svg",
    "png"
   ],
   "type": "string",
   "description": "json (returns SVG + data URI metadata), svg (raw image/svg+xml), or png (binary image/png)"
  },
  "subtitle": {
   "type": "string",
   "description": "Supporting subtitle line"
  },
  "template": {
   "enum": [
    "og_banner",
    "social_kpi",
    "trading_signal"
   ],
   "type": "string",
   "description": "Card layout preset (og_banner 1200x630, social_kpi 1080x1350, trading_signal 1200x630)"
  },
  "brandName": {
   "type": "string",
   "description": "Footer brand attribution"
  },
  "sparkline": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "Numeric series for deterministic area sparkline chart"
  },
  "accentColor": {
   "type": "string",
   "description": "6-digit hex accent color, e.g. #38BDF8"
  },
  "metricDelta": {
   "type": "string",
   "description": "Change/delta subtitle inside KPI card"
  },
  "metricLabel": {
   "type": "string",
   "description": "KPI box label"
  },
  "metricValue": {
   "type": "string",
   "description": "Primary KPI number/stat"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "width": 1200,
  "height": 630,
  "dataUri": "data:image/svg+xml;base64,...",
  "mimeType": "image/svg+xml"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-agent-hub-visual-card-sparkline-renderer-102db73e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-hub.x402-agent-hub.workers.dev](https://www.zero.xyz/host/x402-agent-hub.x402-agent-hub.workers.dev/llms.txt)
