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)Select the
Authorizationtab, enter yourToken.
Select the
Bodytab, selectform-data, add the two key-value parameters below:KEYVALUEfilesupload/ attach your
.pptxfilejsonDatacopy and paste the data from your
.jsonpayload

Click the down arrow next to
Sendthen selectSend and Download. Once the result is successfully received, save the output as.pptx.

Last updated
Was this helpful?