Quickstart
Getting an API key
Section titled “Getting an API key”Before making your first request you first need to create and copy your SlideSpeak API key. Go to the developer page, create an API key and copy it.
Making the first request
Section titled “Making the first request”All requests require a X-API-Key
header with your API key.
Run the following code to create your first presentation, be sure to use your own API key in the X-API-Key header:
curl -L \ -X POST \ -H 'Content-Type: application/json' \ -H 'X-API-key: YOUR_API_KEY' \ 'https://api.slidespeak.co/api/v1/presentation/generate' \ -d '{"plain_text":"Key moments in the french revolution", "length": 6, "template": "default"}'
If your request and API key is correct you should get the following response:
{"task_id":"d941a950-61c0-49da-a407-ab1ef65e06be"}
Congrats! You just made your first API request! The process to create your presentation has now started. Follow the next steps to check the progress and download the presentation when it’s ready.
Downloading the presentation
Section titled “Downloading the presentation”The previous request we made started the process to create a presentation. You can now send a request to poll for the status. The creation step can take around 20-30 seconds, depending on the length of the presentation.
We will now send a call to check on the status of the job. Send the following request, and replace ‘your-task-id’ with the task_id you got as a response from the previous request.
https://api.slidespeak.co/api/v1/task_status/your-task-id
You might initially get a response showing that the request is still in progress. This looks like this:
{ "task_id": "9649d202-03ac-437a-80e8-ff91ff4ace67", "task_status": "STARTED", "task_result": null, "task_info": null}
Give it some time, and if all goes well you will get the following response:
{ "task_id": "b4384f2b-27c7-4448-8aa2-67ab445b5bd2", "task_status": "SUCCESS", "task_result": { "url": "https://slidespeak-files.s3.us-east-2.amazonaws.com/e32959d9-3b90-45dd-bd1c-fde77767c1d6.pptx" }, "task_info": { "url": "https://slidespeak-files.s3.us-east-2.amazonaws.com/e32959d9-3b90-45dd-bd1c-fde77767c1d6.pptx" }}
Congrats! You just made your first PowerPoint!
Next steps
Section titled “Next steps”The next step is to check out all available endpoints in the ‘API References’ section.