---
title: "Chart Generator"
method: POST
path: "/v1/chartgenerator"
tags: ["Data Generation"]
---

# Chart Generator

`POST /v1/chartgenerator`

## Request

- Base URL: `https://api.apiverve.com`
- URL: `https://api.apiverve.com/v1/chartgenerator`
- Auth: API key in header `x-api-key`

Generate a chart with minimal configuration. Just provide type, labels, and datasets with name/values. Colors are auto-assigned.

## Request body

- object
  - `type` string: Chart type
  - `labels` string, required: Array of labels for the x-axis or chart segments
  - `datasets` string, required: Array of datasets with 'name' and 'values'
  - `title` string: Optional title displayed on the chart
  - `width` integer: Image width in pixels
  - `height` integer: Image height in pixels
  - `format` string: Output format

## Response `200`

Successful Response

- object
  - `status` string: status
  - `error` string: error
  - `data` object: data

## Other responses

- `401`: Your request was not authorized, or your API Key was invalid
- `404`: Requested resource was not found
- `500`: A server error has occurred, try again later

---

[API](https://skmtc.dev/apiverve/apis/apiverve-api.md) · [All operations](https://skmtc.dev/apiverve/apis/apiverve-api/llms.txt) · [OpenAPI document](https://skmtc.dev/apiverve/apis/apiverve-api/revisions/4b9a77598eb4?raw)
