generator/create
How to create a presentation
Use this endpoint to create a new presentation from a .pptx template file and JSON data.
generator/create
POST
https://gen.powerpointgeneratorapi.com/v1.0/generator/create
Headers
Name
Type
Description
Content-Type*
String
multipart/form-data
Authorization*
String
Bearer authentication token
Request Body
Name
Type
Description
files*
Object
.pptx file
jsonData*
String
JSON data
Example request
curl --location --request POST 'https://gen.powerpointgeneratorapi.com/v1.0/generator/create' \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer {add_your_token_here}' \
-F 'files=@my_dummy_presentation.pptx' \
-F 'jsonData={"presentation":{"template":"my_dummy_presentation.pptx","export_version":"Pptx2010","resultFileName":"quick_start_example","slides":[{"type":"slide","slide_index":0,"shapes":[{"name":"Title 1","content":"Your generated PowerPoint presentation"},{"name":"Subtitle 2","content":"Create,fill and manage PowerPoint documents through simple API requests."}]}]}}'
import requests
payload={'jsonData': '{"template":"my_dummy_presentation.pptx","export_version":"Pptx2010","resultFileName":"quick_start_example","slides":[{"type":"slide","slide_index":0,"shapes":[{"name":"Title 1","content":"Your generated PowerPoint presentation"},{"name":"Subtitle 2","content":"Create, fill and manage PowerPoint documents through simple API requests."}]}]}'}
files=[
('files', ('my_dummy_presentation.pptx', open('./my_dummy_presentation.pptx','rb'), 'application/vnd.openxmlformats-officedocument.presentationml.presentation'))
]
response = requests.post(
'https://gen.powerpointgeneratorapi.com/v1.0/generator/create',
data=payload,
files=files,
headers={
'Authorization': f'Bearer {add_your_token_here}',
},
timeout=360
)
with open("./generated.pptx", "wb") as file:
file.write(response.content)
const formData = new FormData();
formData.append("jsonData", JSON.stringify('{"presentation":{"template":"url of title_slide_template.pptx","export_version":"Pptx2010","resultFileName":"quick_start_example","slides":[{"type":"slide","slide_index":0,"shapes":[{"name":"Title 1","content":"YourgeneratedPowerPointpresentation"},{"name":"Subtitle 2","content":"Create,fillandmanagePowerPointdocumentsthroughsimpleAPIrequests."}]}]}}'));
const request = new XMLHttpRequest();
request.open(
"POST",
"https://gen.powerpointgeneratorapi.com/v1.0/generator/create",
true
);
request.setRequestHeader(
"Authorization",
"Bearer {add_your_token_here}"
);
request.responseType = "blob";
request.onload = function () {
if (request.readyState === request.DONE && request.status === 200) {
var blob = new Blob([request.response], {
type: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
});
var link = document.createElement("a");
link.href = window.URL.createObjectURL(blob);
link.download = "generated.pptx";
link.click();
}
};
request.send(formData);
Enter your Bearer Token in the
Authorization
tab.
In the
Body
tab add the following parameters:file
: upload your .pptx template filejsonData
: Paste your JSON data
Click
Send and Download
save as `.pptx`
Last updated