Developer API

Programmatically generate beautiful charts with our RESTful API. Perfect for automation, dashboards, and integrations.

Simple & Fast

Generate charts with a single API call. No complex setup required.

RESTful Design

Standard HTTP methods and JSON responses. Works with any language.

Secure

API key authentication with rate limiting and usage analytics.

Quick Start

Generate a chart by sending a POST request with your data:


            curl -X POST https://api.chartpuppy.com/v1/charts \
              -H "Authorization: Bearer YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "template": "revenue-growth",
                "data": {
                  "labels": ["Jan", "Feb", "Mar", "Apr"],
                  "values": [4200, 5100, 4800, 6300]
                }
              }'
            

Endpoints

GET /v1/templates

List all available chart templates

POST /v1/charts

Generate a new chart from a template

GET /v1/charts/:id

Retrieve a generated chart by ID

DELETE /v1/charts/:id

Delete a generated chart

Render Tokens

GET /render/:token

Render a published chart as a single image. Supports `format=png|svg|jpg` and optional `variant=overview|detail|derived` for charts with saved multi-chart output.

GET /render/RENDER_TOKEN?format=png&variant=detail
GET /render/:token/bundle

Return JSON metadata for all available chart variants. This is the stable way to discover overview/detail/derived outputs without changing the existing single-image render contract.

{
                "chart_name": "Traffic Overview",
                "format": "png",
                "charts": [
                  {"kind": "overview", "title": "Overview", "url": "/render/RENDER_TOKEN?variant=overview&format=png"},
                  {"kind": "detail", "title": "Detail without outliers", "url": "/render/RENDER_TOKEN?variant=detail&format=png"}
                ]
              }
GET /embed/:token

Embed a published chart in an iframe. The default layout stays single-chart. Add `layout=stacked` to render multiple saved outputs in one vertical embed page, and `refresh=SECONDS` for periodic reloads.

<iframe
                src="https://chartpuppy.com/embed/RENDER_TOKEN?layout=stacked"
                width="800"
                height="900"
                frameborder="0"
              ></iframe>

Ready to integrate?

Sign up for a free account to get your API key and start generating charts.