API Reference

An overview of all available API endpoints

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

Prefer using Postman? Check out our Postman collection.

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

plain_text

string

What to generate a presentation about.

length

number

The amount of slides.

template

string

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.

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

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);
  });

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 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);
  });

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);
  });

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

Last updated