Skip to content

API Reference

Not sure where to start? Check out the quickstart section to get up and running with the API in minutes.

POST https://api.slidespeak.co/api/v1/presentation/generate

Generate a presentation from plain text.

Headers

NameValue
Content-Typeapplication/json
X-API-Key<your api token>

Body

NameTypeDescriptionOptional
plain_textstringWhat to generate a presentation about.false
lengthnumberThe amount of slides.false
templatestringThe name of the template or the id of a custom template. See the custom templates section for more information.

For options, see Get All Templates .
false
languagestring

The language to use in the presentation.

Ex: French
default: “ORIGINAL”

true
fetch_imagesbooleanWhether to include stock images.
default: true
true
tonestring

The tone to use for the text.

Options:
default

casual

professional

funny

educational

sales_pitch

true
verbositystring

How verbose, or long, the text should be.

default: “standard”


Options:
consise

standard

text-heavy

true
custom_user_instructionsstringA custom instruction that should be followed when generating the presentation.
default: None
true
include_coverboolean

Whether to include the ‘cover’ slide.

default: true

true
include_table_of_contentsboolean

Whether to include the ‘table of contents’ slides.

default: true

true
use_branding_logoboolean

Whether to include the ‘Brand logo’ in the slides.

The Brand Logo can be configured in SlideSpeak’s web app under Brand Settings.

default: false

true
use_branding_colorboolean

Whether to apply the ‘Brand Color’ to the slides.

The Brand Color can be configured in SlideSpeak’s web app under Brand Settings.

default: false

true

Code Examples

fetch('https://api.slidespeak.co/api/v1/presentation/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
"plain_text": "Key moments in the French Revolution",
"length": 6,
"template": "default",
"language": "ORIGINAL",
"fetch_images": true,
"tone": "default",
"verbosity": "standard",
"custom_user_instructions": "Make sure to mention the storming of the Bastille"
}),
})
.then(response => response.json())
.then(data => {
console.log('Response:', data);
})
.catch(error => {
console.error('Error:', error);
});

Example body

{
"plain_text": "Key moments in the French Revolution",
"length": 6,
"template": "default",
"language": "ORIGINAL",
"fetch_images": true,
"tone": "default",
"verbosity": "standard",
"custom_user_instructions": "Make sure to mention the storming of the Bastille"
}

Response

{
"task_id": "353509d6-8efe-401c-a8a9-53ca64b520a3"
}

Generate a Presentation defined Slide by Slide

Section titled “Generate a Presentation defined Slide by Slide”

POST https://api.slidespeak.co/api/v1/presentation/generate/slide-by-slide

Generate a presentation slide by slide. This way, you can define the structure and content of each presentation slide directly.

Headers

NameValue
Content-Typeapplication/json
X-API-Key<your api token>

Body

NameTypeDescriptionOptional
slideslist[dict]A list of slides, each defined as a dictionary. The keys are: title, layout, item_amount and content_description. See the sample body below for further reference about the contents of each key.false
templatestringThe name of the template or the id of a custom template. See the custom templates section for more information.

For options, see the Get All Templates endpoint.
false
languagestringThe language to use in the presentation.
default: “ORIGINAL” — implied from the content.
true
fetch_imagesbooleanWhether to include stock images.
default: true
true

Example body

{
"slides": [
{
"title": "Introduction to African Wildlife",
"layout": "items",
"item_amount": "1",
"content_description": "Diversity of Species Over 1,100 mammal species, including iconic animals like elephants, lions, and rhinoceroses. Approximately 2,600 bird species, making Africa a birdwatcher's paradise. Ecosystems and Habitats Savannas: Home to large herbivores and predators, characterized by grasslands and scattered trees."
},
{
"title": "Savannah Ecosystem: Flora and Fauna",
"layout": "items",
"item_amount": "4",
"content_description": "Acacia Trees Key species: Acacia tortilis and Acacia senegal Adaptations: Deep roots and thorny branches for protection Zebras Species: Plains zebra (Equus quagga) Social structure: Live in herds, providing safety in numbers Giraffes Height: Can reach up to 18 feet (5.5 meters) "
}
]
}

Response

{
"task_id": "353509d6-8efe-401c-a8a9-53ca64b520a3"
}

GET https://api.slidespeak.co/api/v1/task_status/{{task_id}}

Get the status of a task.

Headers

NameValue
Content-Typeapplication/json
X-API-Key<your api token>

Get parameters

NameTypeDescription
task_idstringThe ID you got after starting tasks.

Examples

fetch('https://api.slidespeak.co/api/v1/task_status/9649d202-03ac-437a-80e8-ff91ff4ace67', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => {
console.log('Task status:', data);
})
.catch(error => {
console.error('Error:', error);
});

Response

{
"task_id": "9649d202-03ac-437a-80e8-ff91ff4ace67",
"task_status": "SUCCESS",
"task_result": {
"url": "https://slidespeak-files.s3.us-east-2.amazonaws.com/24d89111-71a1-4c05-a909-2d84123c9ba9.pptx"
},
"task_info": {
"url": "https://slidespeak-files.s3.us-east-2.amazonaws.com/24d89111-71a1-4c05-a909-2d84123c9ba9.pptx"
}
}

GET https://api.slidespeak.co/api/v1/presentation/templates

Headers

NameValue
Content-Typeapplication/json
X-API-Key<your api token>

Examples

fetch('https://api.slidespeak.co/api/v1/presentation/templates', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => {
console.log('Templates:', data);
})
.catch(error => {
console.error('Error:', error);
});

Response

[
{
"name": "default",
"images": {
"cover": "https://app.slidespeak.co/images/themes/default-cover.jpg",
"content": "https://app.slidespeak.co/images/themes/default-content.jpg"
}
},
{
"name": "gradient",
"images": {
"cover": "https://app.slidespeak.co/images/themes/gradient-cover.jpg",
"content": "https://app.slidespeak.co/images/themes/gradient-content.jpg"
}
},
...
]

POST https://api.slidespeak.co/api/v1/presentation/edit

Headers

NameValue
Content-Typemultipart/form-data
X-API-Key<your api token>

Body (form-data)

NameTypeDescription
pptx_filefileThe PowerPoint you wish to edit.
configjsonA json object containing the values to change.

Examples

const pptxFile = /* your PPTX file (Blob or File) */;
const configObject = {
replacements: [
{
shape_name: "TARGET_TITLE",
content: "Your new title"
},
{
shape_name: "TARGET_SUBTITLE",
content: "A new fancy subtitle"
},
{
shape_name: "TARGET_CONTENT",
content: "Some new content"
}
]
};
const formData = new FormData(); formData.append('pptx_file', pptxFile);
formData.append('config', JSON.stringify(configObject));
fetch('https://api.slidespeak.co/api/v1/presentation/edit', { method: 'POST',
headers: { 'x-api-key': 'YOUR_API_KEY' // Note: Do not set 'Content-Type'
manually here; // Fetch will set it to multipart/form-data automatically },
body: formData }) .then(response => response.json()) .then(data => {
console.log('Edit response:', data); }) .catch(error => {
console.error('Error:', error); });

Example config

{
"replacements": [
{
"shape_name": "TARGET_TITLE",
"content": "Your new title"
},
{
"shape_name": "TARGET_SUBTITLE",
"content": "A new fancy subtitle"
},
{
"shape_name": "TARGET_CONTENT",
"content": "Some new content"
}
]
}

Response

{
"url": "https://slidespeak-pptx-writer.s3.amazonaws.com/02776182-b4d2-46d9-90c4-f40dbcbb3cfe.pptx"
}