---
title: "Generate a chart (POST)"
method: POST
path: "/chart"
---

# Generate a chart (POST)

`POST /chart`

Generate a chart based on the provided configuration in the request body.

## Request body

- object
  - `chart` object — The chart configuration in Chart.js format (JSON or Javascript).
  - `width` integer — The width of the chart in pixels.
  - `height` integer — The height of the chart in pixels.
  - `format` string — The output format of the chart, 'png', 'jpg', 'svg', or 'webp'.
  - `backgroundColor` string — The background color of the chart.
  - `key` string — QuickChart API key

## Response `200`

A generated chart image.

---

[API](https://skmtc.dev/quickchart/apis/quickchart-api.md) · [All operations](https://skmtc.dev/quickchart/apis/quickchart-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/quickchart/quickchart-api/revisions/92d261378758/schema)
