Getting Started

Chart-Output generates pixel-perfect PNG, JPEG, SVG, and WebP charts via a simple REST API. Use it for emails, PDFs, bots, and automated reports.

Authentication

All API requests require authentication via a Bearer token. You can use either:

  • API Key – Create one from the API Keys page in your dashboard. Format: pk_live_... or pk_test_...
  • Session JWT – When logged in via the dashboard, your session token is used automatically for same-origin requests.
Authorization: Bearer YOUR_API_KEY

Your First Render

Send a POST request to /api/v1/render with a chart specification:

curl -X POST https://your-domain.com/api/v1/render \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "line",
    "width": 800,
    "height": 400,
    "format": "png",
    "data": {
      "labels": ["Jan", "Feb", "Mar"],
      "datasets": [{
        "label": "Revenue",
        "data": [12000, 15000, 18000]
      }]
    }
  }' --output chart.png

The response is the raw image bytes. Use the X-Render-Time-Ms header to see render latency.

Next Steps