# PowerPoint generator API

> Build a PowerPoint .pptx from JSON or Markdown: titles, bullets, images, tables, native editable charts, speaker notes, themes and logo.

- Endpoint: `POST https://apibox.io.vn/v1/pptx-generate`
- Category: Files
- HTML docs: https://apibox.io.vn/docs/pptx-generate/ (Vietnamese: https://apibox.io.vn/vi/docs/pptx-generate/)
- Online tool: https://apibox.io.vn/tools/pptx-generate/
- Authentication: `Authorization: Bearer <API key>` or `X-API-Key: <API key>` (free key: https://apibox.io.vn/dashboard/#signup)

Send `slides` as a JSON array — each slide may have `title`, `subtitle`, `bullets` (strings or `{text, level}`), `text`, `image` / `images` (data URL or http(s) URL), `table` (`{header, rows}`), `chart` and `notes` — or `markdown` where `---` separates slides: the first heading is the title, lists become bullets, GFM tables become tables, images are placed, a ```chart block holds chart JSON and a `Notes:` line starts the speaker notes. `layout: "title"` or `"section"` gives a cover or a divider slide.

Charts are native PowerPoint charts you can edit (`type` bar, column, line, area, pie, doughnut, scatter, radar; `labels`, `series` [{name, values}], `stacked`, `show_values`). Text sits on the left and visuals on the right when a slide has both. Themes `light`, `dark`, `corporate` (title bar) and `green`, with your own `colors` (primary, accent, background, text, title), `font` (Arial by default, full Vietnamese support), `layout` 16x9, 16x10, 4x3 or wide, a `logo` on every slide and slide numbers.

Built with PptxGenJS (MIT) in memory; up to 200 slides and 60 images (20 fetched, 5 MB each). The result is a .pptx file, or JSON with base64 and a per-slide summary (`format=json`). Custom slide masters from your own .pptx are not supported yet.

## Parameters

| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| `slides` | body | array | no |  | Slide objects: title, subtitle, layout, bullets, text, image(s), table, chart, notes, background. |
| `markdown` | body | string | no |  | Markdown deck, slides separated by `---` (instead of `slides`). |
| `theme` | body | string | no | `light` | `light`, `dark`, `corporate` or `green`. |
| `colors` | body | object | no |  | Hex colours: primary, accent, background, text, title. |
| `font` | body | string | no | `Arial` | Font name. |
| `layout` | body | string | no | `16x9` | `16x9`, `16x10`, `4x3` or `wide`. |
| `logo` | body | string | no |  | Logo image (data URL or URL) on every slide. |
| `slide_numbers` | body | boolean | no | `true` | Show slide numbers. |
| `title` | body | string | no |  | Presentation title (file properties and name). |
| `format` | body | string | no | `pptx` | `pptx` (file) or `json` (summary + base64). |

## Example request

```bash
curl -X POST "https://apibox.io.vn/v1/pptx-generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slides":[{"layout":"title","title":"Báo cáo Q3/2026","subtitle":"Phòng Kinh doanh"},{"title":"Điểm chính","bullets":["Doanh thu +18%","Chi phí −5%"]},{"title":"Doanh thu","chart":{"type":"column","labels":["T7","T8","T9"],"series":[{"name":"2026","values":[140,160,178]}]}}],"theme":"corporate","format":"json"}'
```

## Example response

```json
{
  "filename": "Báo cáo Q3_2026.pptx",
  "theme": "corporate",
  "layout": "16x9",
  "slides": [
    {
      "index": 1,
      "title": "Báo cáo Q3/2026",
      "layout": "title",
      "parts": [
        "title"
      ]
    },
    {
      "index": 2,
      "title": "Điểm chính",
      "layout": "content",
      "parts": [
        "title",
        "text"
      ]
    },
    {
      "index": 3,
      "title": "Doanh thu",
      "layout": "content",
      "parts": [
        "title",
        "chart:column"
      ]
    }
  ],
  "charts": 1,
  "images": 0,
  "warnings": [],
  "pptx_base64": "UEsDBAoAAAAAALtTa10AAAAAAAAAAAAAAAAGAAAAX3JlbHMvUEsDBAoAAAAA…",
  "bytes": 88557
}
```

## Use cases

- Turn AI-written outlines into slide decks
- Send weekly sales decks with live charts from Sheets or a database
- Build lesson slides from a teacher’s Markdown notes
- Produce client reports with your brand colours and logo

## FAQ

### Are charts images?

No, they are real PowerPoint charts with their data embedded, so they can be edited in PowerPoint, Keynote or Google Slides.

### Which font is used for Vietnamese?

Arial by default (installed everywhere, full Vietnamese). Set font to any font name; it must exist on the computer that opens the file.

### Can I use my company template?

Not yet: choose a theme and pass colors, font and logo. Applying a master from an uploaded .pptx is planned.
