LogoLogo
  • Welcome
  • Getting Started
    • Quickstart
  • Basics
    • API Reference
    • Templates
    • Custom templates
      • Preparing your template
      • Using a custom template
    • Integrations
  • EXAMPLES
    • Editing an existing PowerPoint
Powered by GitBook
On this page
  • Generate a Presentation
  • Generate a Presentation defined Slide by Slide
  • Get Task Status
  • Get All Templates
  • Edit Powerpoint
  1. Basics

API Reference

An overview of all available API endpoints

PreviousQuickstartNextTemplates

Last updated 2 months ago

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

Prefer using Postman? Check out our .

Generate a Presentation

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

Generate a presentation from plain text.

Headers

Name
Value

Content-Type

application/json

X-API-Key

<your api token>

Body

Name
Type
Description
Optional

plain_text

string

What to generate a presentation about.

length

number

The amount of slides.

template

string

language

string

The language to use in the presentation.

Ex: French default: "ORIGINAL"

fetch_images

boolean

Whether to include stock images. default: true

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.

default: "standard"

Options: consise

standard

text-heavy

custom_user_instructions

string

A custom instruction that should be followed when generating the presentation. default: None

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

use_branding_logo

boolean

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

use_branding_color

boolean

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

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"
}

Response

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

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

Name
Value

Content-Type

application/json

X-API-Key

<your api token>

Body

Name
Type
Description
Optional

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. default: "ORIGINAL" — implied from the content.

fetch_images

boolean

Whether to include stock images. default: 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 Task Status

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

Get the status of a task.

Headers

Name
Value

Content-Type

application/json

X-API-Key

<your api token>

Get parameters

Name
Type
Description

task_id

string

The 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);
  });
import requests

url = "https://api.slidespeak.co/api/v1/task_status/9649d202-03ac-437a-80e8-ff91ff4ace67"
headers = {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('https://api.slidespeak.co/api/v1/task_status/9649d202-03ac-437a-80e8-ff91ff4ace67', [
    'headers' => [
        'Content-Type' => 'application/json',
        'x-api-key' => 'YOUR_API_KEY'
    ]
]);

$body = $response->getBody();
$data = json_decode($body, true);

print_r($data);
curl -X GET "https://api.slidespeak.co/api/v1/task_status/9649d202-03ac-437a-80e8-ff91ff4ace67" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY"

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"
    }
}
{
    "task_id": "9649d202-03ac-437a-80e8-ff91ff4ace67",
    "task_status": "PENDING",
    "task_result": null,
    "task_info": null
}

Get All Templates

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

Headers

Name
Value

Content-Type

application/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);
  });
import requests

url = "https://api.slidespeak.co/api/v1/presentation/templates"
headers = {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('https://api.slidespeak.co/api/v1/presentation/templates', [
    'headers' => [
        'Content-Type' => 'application/json',
        'x-api-key' => 'YOUR_API_KEY'
    ]
]);

$body = $response->getBody();
$data = json_decode($body, true);

print_r($data);
curl -X GET "https://api.slidespeak.co/api/v1/presentation/templates" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY"

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"
        }
    },
    ...
]

Edit Powerpoint

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

Headers

Name
Value

Content-Type

multipart/form-data

X-API-Key

<your api token>

Body (form-data)

Name
Type
Description

pptx_file

file

The PowerPoint you wish to edit.

config

json

A 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);
  });
import requests
import json

url = "https://api.slidespeak.co/api/v1/presentation/edit"

headers = {
    "x-api-key": "YOUR_API_KEY"
}

config_data = {
    "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"
        }
    ]
}

files = {
    "pptx_file": ("your-presentation.pptx", open("path/to/your-presentation.pptx", "rb"), "application/vnd.openxmlformats-officedocument.presentationml.presentation"),
    "config": (None, json.dumps(config_data), "application/json")
}

response = requests.post(url, headers=headers, files=files)
print(response.json())
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$configData = [
    '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 = $client->post('https://api.slidespeak.co/api/v1/presentation/edit', [
    'headers' => [
        'x-api-key' => 'YOUR_API_KEY'
    ],
    'multipart' => [
        [
            'name'     => 'pptx_file',
            'contents' => fopen('path/to/your-presentation.pptx', 'rb'),
            'filename' => 'your-presentation.pptx'
        ],
        [
            'name'     => 'config',
            'contents' => json_encode($configData),
            'headers'  => ['Content-Type' => 'application/json']
        ]
    ]
]);

$body = $response->getBody();
$data = json_decode($body, true);

print_r($data);
curl -X POST "https://api.slidespeak.co/api/v1/presentation/edit" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "pptx_file=@path/to/your-presentation.pptx" \
  -F "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\"
      }
    ]
  }"

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"
}

The name of the template or the id of a custom template. See the custom templates section for more information. For options, see .

The name of the template or the id of a custom template. See the custom templates section for more information. For options, see the endpoint.

quickstart
Postman collection
Get All Templates
Get All Templates