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 your authored OPF presentation and returns the generated PowerPoint file directly. Follow the complete authenticated API recipe for authentication, error handling, and saving the response.
Example: Complete OPF Document
{
"$schema": "https://openpresentation.org/schema/opf/v1",
"name": "Automated Report",
"slides": [
{
"layout": "cover",
"title": "Monthly Report",
"subtitle": "March 2026",
"design": {
"titleAlignment": "center"
}
},
{
"layout": "metrics",
"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": {
"default": {
"source": "https://www.pptx.gallery",
"themes": {
"minimal": {
"name": "Minimal",
"description": "A clean, minimalistic theme with a focus on simplicity and readability. Ideal for professional, straightforward presentations.",
"colorScheme": "cool-horizon",
"fontScheme": "aptos",
"background": {
"type": "theme",
"slot": "dark2"
},
"dimensions": "widescreen"
}
},
"layouts": {
"cover": {
"name": "Cover",
"summary": "The opening slide: title, subtitle and an optional picture.",
"tags": [
"Openers and closers"
],
"design": {
"titleAlignment": "center",
"contentAlignment": "center"
},
"direction": "row",
"regions": [
{
"name": "title"
},
{
"name": "media",
"accepts": [
"image",
"video"
],
"role": "media",
"flow": "none",
"bleed": true
}
],
"description": "Open a presentation with its subject and a short introduction. Add a picture when it helps establish the context.",
"preview": {
"vectorSrc": "https://www.pptx.gallery/layout-previews/cover.svg"
}
},
"metrics": {
"name": "Metrics",
"summary": "One to six headline numbers, with an optional note.",
"tags": [
"Numbers"
],
"design": {
"contentAlignment": "center"
},
"direction": "column",
"regions": [
{
"name": "title"
},
{
"name": "metrics",
"accepts": [
"metric",
"group"
],
"role": "primary",
"flow": "grid",
"anchor": "middle"
},
{
"name": "note",
"size": "auto",
"accepts": [
"text",
"list"
],
"role": "supporting",
"flow": "none"
}
],
"description": "Highlight a small set of important numbers. Give each number a label and the context needed to interpret it.",
"preview": {
"vectorSrc": "https://www.pptx.gallery/layout-previews/metrics.svg"
}
}
},
"colorSchemes": {
"cool-horizon": {
"name": "Cool Horizon",
"summary": "Cool blue-green palette tuned for professional business decks.",
"description": "A balanced cool-toned scheme with deep navy, business blues, and teal accents. It works well across strategy, finance, and technical narratives.",
"accent1": "#2874A6",
"accent2": "#1B4F72",
"accent3": "#5499C7",
"accent4": "#7BDBB2",
"accent5": "#3AC67A",
"accent6": "#24A89E",
"dark1": "#000000",
"dark2": "#011842",
"light1": "#FFFFFF",
"light2": "#F0F0F0",
"hyperlink": "#0000EE",
"followedHyperlink": "#551A8B",
"tags": [
"professional",
"trustworthy",
"calm",
"technical",
"versatile"
]
}
},
"fontSchemes": {
"aptos": {
"name": "Aptos",
"major": "Aptos Display",
"minor": "Aptos",
"type": "sans-serif",
"app": "powerpoint",
"languageFamily": "latin",
"languages": [],
"textSample": "Modern clean design",
"description": "Aptos is a sans serif OPF font scheme for Latin presentations, using Aptos Display for headings with Aptos for body text."
}
}
}
}
}
Example: JavaScript / Node.js
type ReportData = {
month: string; teamName: string;
kpis: { value: string | number; name: string }[];
months: string[]; revenueByMonth: number[];
};
function buildDeck(data: ReportData) {
return {
name: `${data.month} Report`,
slides: [
{ title: `${data.month} Report`, subtitle: data.teamName },
{
title: "Key Metrics",
blocks: data.kpis.map(kpi => ({ metric: { value: kpi.value, label: kpi.name } })),
},
{
title: "Revenue Trend",
chart: {
type: "line-with-markers",
data: {
columns: ["Month", "Revenue"],
rows: data.months.map((month, index) => [month, data.revenueByMonth[index]]),
},
},
},
],
};
}
Example: Python
def build_deck(title, kpis):
return {
"name": title,
"slides": [
{"title": title},
{
"title": "Key Metrics",
"blocks": [
{"metric": {"value": k["value"], "label": k["name"]}}
for k in kpis
],
},
],
}
Pass the document returned by either builder to the complete authenticated API recipe; keep API credentials on your server.
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
- Deliver the saved PowerPoint file through your own application
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 planning your story arc
- Explore all layouts for slide building blocks
- Set up themes for consistent branding