Upload fonts and generate slide previews
curl --request POST \
--url https://api.presenton.ai/api/v2/ppt/fonts/upload-and-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form pptx_file='@example-file' \
--form font_files.0.items='@example-file'import requests
url = "https://api.presenton.ai/api/v2/ppt/fonts/upload-and-preview"
files = {
"pptx_file": ("example-file", open("example-file", "rb")),
"font_files.0.items": ("example-file", open("example-file", "rb"))
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('pptx_file', '<string>');
form.append('font_files.0.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.presenton.ai/api/v2/ppt/fonts/upload-and-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"slide_image_urls": [
"<string>"
],
"pptx_url": "<string>",
"modified_pptx_url": "<string>",
"fonts": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Fonts
Upload fonts and generate slide previews
Upload a reference PPTX and any replacement fonts, then return slide previews and assets used to create a Smart Design.
POST
/
api
/
v2
/
ppt
/
fonts
/
upload-and-preview
Upload fonts and generate slide previews
curl --request POST \
--url https://api.presenton.ai/api/v2/ppt/fonts/upload-and-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form pptx_file='@example-file' \
--form font_files.0.items='@example-file'import requests
url = "https://api.presenton.ai/api/v2/ppt/fonts/upload-and-preview"
files = {
"pptx_file": ("example-file", open("example-file", "rb")),
"font_files.0.items": ("example-file", open("example-file", "rb"))
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('pptx_file', '<string>');
form.append('font_files.0.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.presenton.ai/api/v2/ppt/fonts/upload-and-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"slide_image_urls": [
"<string>"
],
"pptx_url": "<string>",
"modified_pptx_url": "<string>",
"fonts": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
multipart/form-data
Was this page helpful?