Create PowerPoint deck (.pptx)
POST /api/pptx-createTurn slide outlines into a real PowerPoint deck (.pptx, 16:9) in one call. Send POST /api/pptx-create with the required field slides and pay $0.003 per call over x402 or MPP (there is no free tier). It returns a JSON object with pptxBase64, bytes, contentType, filename and slides.
Send "slides": each with a "title", "bullets" (strings, or {"text","level"} for indent levels 0 to 4), an optional "table" ({"header","rows"} or an array of rows), optional speaker "notes" and "numbered" for a numbered list. An optional deck "title" and "subtitle" add a title slide first. The font size steps down as a slide holds more bullets or table rows. Up to 100 slides, 30 bullets per slide, tables of 20 rows by 10 columns, 100,000 characters in all. The request body may be up to 2 MB. Returns the file as base64 with its size, content type and filename.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
slides | array of object | yes | 1 to 100 slides: {"title"?,"bullets"?,"numbered"?,"table"?,"notes"?}; each needs a title, bullets or a table. bullets: strings or {"text","level":0-4}. table: {"header"?:[...],"rows":[[...]]} or an array of rows. |
title | string | no | Optional deck title: adds a title slide first and sets the file's title |
subtitle | string | no | Optional subtitle on the title slide |
filename | string | no | File name for the answer (default "presentation.pptx") |
Example request
curl -i -X POST https://agent402.tools/api/pptx-create \
-H "Content-Type: application/json" \
-d '{"title":"Quarterly update","subtitle":"Operations review","slides":[{"title":"Highlights","bullets":["Revenue grew 12%",{"text":"North led with 1,200 units","level":1},"Churn fell to 2.1%"],"notes":"Open with the revenue number."},{"title":"Units by region","table":{"header":["Region","Units"],"rows":[["North",1200],["South",860]]}}],"filename":"update.pptx"}'
Without payment this returns HTTP 402 Payment Required with the exact price for pptx-create; any x402 v2 or MPP client pays it and retries.
Example response
{
"pptxBase64": "UEsDBAoAAAAAAG...",
"bytes": 19928,
"contentType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"filename": "update.pptx",
"slides": 3
}
| Field | Type | Always present | In the example |
|---|---|---|---|
pptxBase64 | string | yes | UEsDBAoAAAAAAG... |
bytes | number | yes | 19928 |
contentType | string | yes | application/vnd.openxmlformats-officedocument.presentationml.presentation |
filename | string | yes | update.pptx |
slides | number | yes | 3 |
From an MCP client
catalog.call {
"slug": "pptx-create",
"params": {
"title": "Quarterly update",
"subtitle": "Operations review",
"slides": [
{
"title": "Highlights",
"bullets": [
"Revenue grew 12%",
{
"text": "North led with 1,200 units",
"level": 1
},
"Churn fell to 2.1%"
],
"notes": "Open with the revenue number."
},
{
"title": "Units by region",
"table": {
"header": [
"Region",
"Units"
],
"rows": [
[
"North",
1200
],
[
"South",
860
]
]
}
}
],
"filename": "update.pptx"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for pptx-create; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y [email protected].
Errors and behavior
slidesis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/pptx-create returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.003" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/pptx-create", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"title": "Quarterly update",
"subtitle": "Operations review",
"slides": [
{
"title": "Highlights",
"bullets": [
"Revenue grew 12%",
{
"text": "North led with 1,200 units",
"level": 1
},
"Churn fell to 2.1%"
],
"notes": "Open with the revenue number."
},
{
"title": "Units by region",
"table": {
"header": [
"Region",
"Units"
],
"rows": [
[
"North",
1200
],
[
"South",
860
]
]
}
}
],
"filename": "update.pptx"
}),
});
Related tools
Create Word document (.docx)
POST /api/docx-createTurn markdown into a real Word document (.docx) in one call.
Create Excel spreadsheet (.xlsx)
POST /api/xlsx-createTurn rows of data into a real Excel workbook (.xlsx) in one call.
Base / radix convert
POST /api/base-convertConvert an integer between number bases (radix 2-36), e.g. binary↔hex↔decimal.
CSV to JSON
POST /api/csv-to-jsonParse CSV (quoted fields supported) into a JSON array of objects, using the first row as headers (header=false.
CSV to Markdown table
POST /api/csv-to-mdConvert CSV into a GitHub-flavored Markdown table (first row is the header).
HTML to Markdown
POST /api/html-to-markdownConvert an HTML fragment or document you already have into clean markdown.