The 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.
language
string
The language to use in the presentation.
fetch_images
boolean
Whether to include stock images.
tone
string
The tone to use for the text.
Options:
default
casual
professional
funny
educational
sales_pitch
verbosity
string
how verbose, or long, the text should be.
Options:
consise
standard
text-heavy
custom_user_instructions
string
A custom instruction that should be followed when generating the presentation.
include_cover
boolean
Whether to include the 'cover' slide.
default: true
include_table_of_contents
boolean
Whether to include the 'table of contents' slides.
default: 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);
});
import requests
url = "https://api.slidespeak.co/api/v1/presentation/generate"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
payload = {
"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 = requests.post(url, headers=headers, json=payload)
print(response.json())
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post('https://api.slidespeak.co/api/v1/presentation/generate', [
'headers' => [
'Content-Type' => 'application/json',
'x-api-key' => 'YOUR_API_KEY'
],
'json' => [
'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'
]
]);
$body = $response->getBody();
$data = json_decode($body, true);
print_r($data);
curl -X POST "https://api.slidespeak.co/api/v1/presentation/generate" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"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"
}'
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"
}
Generate a presentation slide by slide. This way, you can define the structure and content of each presentation slide directly.
Headers
Name
Value
Content-Type
application/json
X-API-Key
<your api token>
Body
Name
Type
Description
slides
list[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.
template
string
language
string
The language to use in the presentation.
fetch_images
boolean
Whether to include stock images.
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) Feeding habits: Primarily browse on leaves from tall trees Cheetahs Speed: Capable of running up to 60 mph (97 km/h) Hunting strategy: Use bursts of speed and keen eyesight to catch prey"
}
]
}