---
title: Generate Pie Chart API
slug: generate-pie-chart
url: https://apyhub.com/apyhub/service/generate-pie-chart
provider: ApyHub
categories: [Smart Generation]
auth: api_key
---

# Generate Pie Chart API

Generate pie chart images from labeled values, optional colors, and chart styling. Returns a pre-signed URL or binary image for dashboards and reports.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/generate/charts/pie/url` | What it does Generates a pie chart and returns a pre-signed URL for the rendered chart image. The r… | 60 |
| POST | `/generate/charts/pie/file` | What it does Generates a pie chart image from the chart configuration in the request body and retur… | 60 |

## About

## What it does
Pie Chart Generator turns your labeled values into a pie chart image. Send a title, a data array, and optional styling options, and get back a pre-signed URL for the rendered chart or a binary image download.

Each data item can include a label, value, and optional hex color. The request also supports a light or dark theme, plus chart options for width, height, title styling, and canvas color. Use the deprecated pies alias only if you need to match an older integration; data is the primary field.

Use Pie Chart Generator when you need a shareable visual for product mix, budget allocation, survey results, or any other part-to-whole breakdown. It is a good fit for dashboards, reports, admin panels, and automated content pipelines where the chart needs to be generated from API data instead of drawn in the browser.

The response is simple to work with: one endpoint returns a URL in data, and the other returns the image as binary output. That keeps the integration lightweight whether you want to store the image, embed it, or hand it off to another service.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/generate-pie-chart
