Check the current contract and validator results before you build on this.
Use runstamp.operations.run("pptx.render", input) from @runstamp/sdk to turn supported JSON into an editable PowerPoint file. The same package also includes the CLI, MCP server, React exports, and bundled local-preview Document Jobs.
Requirements
- Node.js 18.14.1 or later
- An ESM project or
.mjsscript @runstamp/sdk@3.1.0or later
npm install @runstamp/sdk
Local execution does not require a Runstamp account or API key. The Managed API is a separate authenticated execution option for free-trial workspaces and active Platform and Enterprise workspaces.
Run the verified PPTX example
The operation reference publishes a qualified input fixture. Start with that fixture before adapting the schema to your own content:
import { writeFileSync } from "node:fs";
import { runstamp } from "@runstamp/sdk";
const input = await fetch(
"https://runstamp.com/demo-evidence/operation-evidence/pptx/pptx.render/input.json",
).then((response) => response.json());
const result = await runstamp.operations.run("pptx.render", input);
if (!result.ok) {
throw new Error(`${result.error.code}: ${result.error.message}`);
}
writeFileSync("presentation.pptx", result.value.bytes);
console.log(result.value.hash, result.losses, result.diagnostics);
Save the script as generate.mjs, then run node generate.mjs. The result
envelope includes output bytes, media type, byte length, hash, declared losses,
diagnostics, and a receipt.
Inspect the input contract
Read the live descriptor when your application needs the complete schema and limits:
import { runstamp } from "@runstamp/sdk";
const operation = runstamp.describe("pptx.render");
console.log(operation.inputSchema);
console.log(operation.optionsSchema);
The PPTX render operation reference contains the same schemas, declared errors, loss codes, and evidence links.
Return a PPTX from an API route
The same operation can sit behind an HTTP route. Validate authentication, request size, timeouts, and concurrency for the application around it.
import express from "express";
import { runstamp } from "@runstamp/sdk";
const app = express();
app.use(express.json({ limit: "2mb" }));
app.post("/api/presentations", async (req, res) => {
const result = await runstamp.operations.run("pptx.render", req.body);
if (!result.ok) {
return res.status(400).json({ error: result.error, diagnostics: result.diagnostics });
}
res.set({
"Content-Type": result.value.mediaType,
"Content-Disposition": 'attachment; filename="presentation.pptx"',
});
return res.send(Buffer.from(result.value.bytes));
});
app.listen(3000);
Check the resulting file
Schema validation and successful rendering prove that the operation contract completed; they do not replace visual review in the presentation applications your recipients use. Before shipping a recurring template:
- Open the PPTX in PowerPoint and a secondary viewer used by buyers.
- Check the longest real text, actual fonts, charts, tables, links, and notes.
- Confirm that intended objects remain editable.
- Inspect the result's losses and diagnostics.
- Keep the qualified fixture as a regression test when upgrading the SDK.
The SDK is the recommended entry point for PPTX and the other supported operation
families. @runstamp/pptx remains a supported compatibility package for direct
engine imports, including its ./lite subpath.
Keep the document workflow in your product.
Pick an operation, run it on a real file, then embed review and release where your customers work.