Overview
Manual PowerPoint creation is a time sink. Teams spend hours every week formatting slides that could be generated programmatically. The pptx.dev API lets you automate the entire process — feed in data, get back a polished .pptx file.
Why Automate?
| Manual process | Automated alternative |
|---|---|
| 6+ hours building a QBR deck | 2 seconds via API call |
| Inconsistent formatting across team | Same color scheme and fonts every time |
| Copy-paste errors from data sources | Data piped directly from your systems |
| One-off slides that can't be reused | Templates that generate on demand |
The Basics
The pptx.dev API accepts a JSON body with your presentation structure and returns a download URL for the generated file:
POST https://api.pptx.dev/v1/presentations
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Example: curl
curl -X POST https://api.pptx.dev/v1/presentations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"$schema": "https://openpresentation.org/schema/opf/v1",
"name": "Automated Report",
"slides": [
{
"layout": "title-center",
"title": "Monthly Report",
"subtitle": "March 2026",
"design": {
"titleAlignment": "center"
}
},
{
"layout": "number-3x-title-center",
"title": "Key Metrics",
"blocks": [
{
"metric": {
"value": "$2.4M",
"label": "Revenue"
}
},
{
"metric": {
"value": "1,200",
"label": "New Users"
}
},
{
"metric": {
"value": "96%",
"label": "Uptime"
}
}
],
"design": {
"titleAlignment": "center",
"contentAlignment": "center"
}
}
],
"design": {
"theme": "minimal"
},
"catalogs": {
"layouts": {
"records": [
{
"$schema": "https://openpresentation.org/schema/opf-layout/v1",
"id": "title-center",
"name": "Title Center",
"placeholders": [
{
"type": "title"
},
{
"type": "subtitle"
}
]
},
{
"$schema": "https://openpresentation.org/schema/opf-layout/v1",
"id": "number-3x-title-center",
"name": "Number 3x Title Center",
"placeholders": [
{
"type": "title"
},
{
"type": "metric"
},
{
"type": "metric"
},
{
"type": "metric"
}
],
"composition": {
"mode": "row"
}
}
]
}
}
}'
Example: JavaScript / Node.js
async function generateDeck(data: ReportData) {
const response = await fetch("https://api.pptx.dev/v1/presentations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PPTX_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
title: `${data.month} Report`,
theme: "minimal",
slides: [
{
layout: "title-center",
content: {
heading: `${data.month} Report`,
subheading: data.teamName,
},
},
{
layout: "number-3x-title-center",
content: {
heading: "Key Metrics",
items: data.kpis.map((kpi) => ({
value: kpi.value,
label: kpi.name,
})),
},
},
{
layout: "chart-1x-title-center",
content: {
heading: "Revenue Trend",
chart: {
type: "LINE_WITH_MARKERS",
categories: data.months,
series: [{ name: "Revenue", values: data.revenueByMonth }],
},
},
},
],
}),
});
const { downloadUrl } = await response.json();
return downloadUrl;
}
Example: Python
import requests
import os
def generate_deck(title, kpis):
response = requests.post(
"https://api.pptx.dev/v1/presentations",
headers={
"Authorization": f"Bearer {os.environ['PPTX_API_KEY']}",
"Content-Type": "application/json",
},
json={
"title": title,
"theme": "minimal",
"slides": [
{
"layout": "title-center",
"content": {"heading": title},
},
{
"layout": "number-3x-title-center",
"content": {
"heading": "Key Metrics",
"items": [
{"value": k["value"], "label": k["name"]}
for k in kpis[:3]
],
},
},
],
},
)
return response.json()["downloadUrl"]
Common Automation Patterns
Scheduled Reports
Generate weekly or monthly decks automatically:
- Fetch data from your analytics API
- Build the slide JSON from the data
- Call the pptx.dev API
- Email or Slack the download link to stakeholders
CRM-Triggered Decks
Generate a personalized sales deck when a deal reaches a certain stage:
- CRM webhook fires on stage change
- Your server pulls deal data and customer info
- Generates a branded deck with the
persuasive-salesnarrative - Attaches the file to the deal record
Self-Service Dashboards
Let users generate their own decks from a web interface:
- User selects metrics and time range
- Your frontend calls your backend
- Backend assembles the slide JSON and calls the pptx.dev API
- User downloads the file immediately
Next Steps
- Learn about narrative structures for automatic story arcs
- Explore all layouts for slide building blocks
- Set up themes for consistent branding