The chart API for AI agents

Charts your agent can ship without you checking them.

Send a small JSON spec and get back SVG, durable PNG and SVG URLs, alt text, and a quality review in one call. The same input always gives the same chart. The value axis always includes zero.

No signup for the playground · Free accounts get 1,000 renders a month once the email is confirmed (100 before that) · No card to start

Monthly recurring revenueMonthly recurring revenue. MRR peaks at 33,900 for Sep and bottoms at 18,400 for Apr. It increased 84.2% from first to last point.Monthly recurring revenueRevenue grew 84% over six months33.9K25.4K17K8.5K0AprMayJunJulAugSepMRR, Apr: 18,40018.4KMRR, May: 21,30021.3KMRR, Jun: 24,70024.7KMRR, Jul: 26,90026.9KMRR, Aug: 31,20031.2KMRR, Sep: 33,90033.9KMRR
Why agents need this

Letting the model write plotting code is the fragile part.

A model that emits matplotlib or Chart.js is writing a program you never reviewed, for data you cannot see, into a report that goes straight to someone else.

The output drifts

Generated plotting code is rewritten on every run, so the same question can produce a different-looking chart each time — and sometimes code that does not run at all.

Nothing writes the alt text

A chart image with no text description is unusable for screen readers and worthless in an email client that blocks images. Nobody in the loop writes that description.

Some charts are embarrassing

Nine-slice pies, a legend with twelve series, colours that vanish into the background, an axis that starts at 90 so a 2% change looks like a cliff. No one catches them before the customer does.

How it works

JSON in. Chart, alt text, and a QA report out.

One POST to /api/v1/charts with a Bearer key. Your agent can act on the answer without a human in the loop.

  1. Send a small spec

    Five chart types, at most 12 series and 100 points per series. A schema this small leaves a model little to get wrong, and an invalid spec comes back as HTTP 400 with the exact field path and what is wrong with it.

  2. Get the chart, the alt text, and the findings

    The response carries the SVG itself, durable PNG and SVG URLs, an alt-text summary of what the chart shows, and a list of structural QA findings — each with a severity and a suggested fix.

  3. Let the agent fix and re-render

    A finding like pie-too-many-slices names the problem and the remedy, so the agent can revise its own spec and call again before anyone sees the first attempt.

POST /api/v1/charts
curl -X POST "$CHARTRELAY_URL/api/v1/charts" \
  -H "Authorization: Bearer $CHARTRELAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "bar",
    "title": "Monthly recurring revenue",
    "series": [{
      "name": "MRR",
      "data": [
        { "label": "Aug", "value": 31200 },
        { "label": "Sep", "value": 33900 }
      ]
    }]
  }'

Authenticate with a Bearer API key from your dashboard. Unset fields fall back to the schema defaults (900 x 520, light theme, legend on).

201 Created
{
  "id": "V1StGXR8_Z5jdH",
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" ...>",
  "altText": "Monthly recurring revenue. MRR peaks at 33,900 for Sep and bottoms at 31,200 for Aug. It increased 8.7% from first to last point.",
  "warnings": [
    {
      "severity": "tip",
      "code": "healthy",
      "message": "No structural chart problems detected.",
      "suggestion": "Verify the source data and intended takeaway before publishing."
    }
  ],
  "urls": {
    "svg": ".../api/v1/charts/V1StGXR8_Z5jdH?format=svg",
    "png": ".../api/v1/charts/V1StGXR8_Z5jdH?format=png"
  },
  "usage": { "used": 41, "limit": 1000 }
}

Shape of a real response: id, svg, altText, warnings, urls and usage.

Every response

What comes back in every response.

Not a bare image endpoint. Everything an agent needs to publish the chart, or to decide not to.

Deterministic SVG

The chart is drawn by a plain function in the same process — no headless browser, no screenshot step. The same JSON produces the same SVG.

Durable PNG and SVG URLs

GET /api/v1/charts/{id}?format=svg|png needs no key, so the URL works in Slack, email, and a web page. It is served immutable and cached for a year.

Alt text

Each render returns a written summary: the title, the peak and the low with their labels, and, for time-ordered charts, the change from the first to the last point — or the largest shares for a pie.

Structural QA findings

Missing title, multiple series in a pie, too many slices, negative pie values, a dense chart, too many series, low-contrast colours, and labels the axis will shorten. Each one names a fix.

A value axis that includes zero

The scale is computed from zero and the data, never from the data alone, so an agent cannot produce the truncated axis that exaggerates a small change.

Your usage so far

Every render reports the count used this month against your plan limit, so an agent can back off before it hits the quota instead of after.

Built for agents

One HTTP call, or one MCP tool.

ChartRelay is an ordinary JSON API, so it works from any language or agent framework. The repository also ships an MCP server with a single tool, render_chart, which returns the same URLs, alt text and findings — plus an inline PNG preview so the model can see its own chart.

Set up the MCP server API reference

MCP client config
{
  "mcpServers": {
    "chartrelay": {
      "command": "node",
      "args": ["/absolute/path/to/chartrelay/mcp/index.js"],
      "env": {
        "CHARTRELAY_API_KEY": "cr_live_...",
        "CHARTRELAY_API_URL": "https://your-chartrelay-host"
      }
    }
  }
}

@chartrelay/mcp is not on npm yet, so today the server runs from the repository checkout against whichever ChartRelay host you point it at (see mcp/README.md). The one-line npx install lands when the package is published.

What the tool returns to the model

The same render as the REST API: durable PNG and SVG URLs, the alt text, and the quality review with a suggested fix per finding. The tool description tells the model to revise and call again when the review reports a problem, so a bad first attempt is corrected inside the conversation rather than in front of a customer.

Pricing

Start on the free tier. It is big enough to build against.

Agent builders test in loops, so the free tier is 1,000 renders a month — enough to wire up a real workflow before you decide anything.

See the full pricing page

Free — $0

1,000 renders a month once you confirm your email; 100 before that. No card. SVG, PNG, alt text and QA are all included, the same as on the paid plans.

Pro — $29/month

10,000 renders a month, for a product or automation with real traffic. Billed monthly, cancel whenever.

Scale — $99/month

100,000 renders a month, for high-volume reporting and agent fleets.

Questions

Straight answers before you sign up.

Try it in a browser tab

Give your agent a chart it can send unsupervised.

Open the playground and break a chart on purpose: add a tenth pie slice, drop the title, pick an unreadable colour, and watch what comes back.

The playground needs no signup. A free account gives 1,000 renders a month once your email is confirmed, with no card.