Generate a v2 Presentation Video
Generates a narrated MP4 video from an existing presentation. Narration is written from the deck’s
content, spoken with an Azure voice, and rendered over the slides. Video generation is asynchronous.
The endpoint returns a task_id; poll /task_status/{task_id} until
SUCCESS, then use the returned request_id with /presentation/download/{request_id}.
Headers
Section titled “Headers”application/json
The API key to use for the request.
Body Parameters
Section titled “Body Parameters”The ID of a presentation created with your API key. It must not be empty, and the presentation must
belong to the same user as the API key. To narrate your own PowerPoint file, first import it with
/presentation/import to get a presentation_id.
The language the narration is written and spoken in. Pass a language code such as ENGLISH,
ENGLISH_UK or SPANISH_MEXICO — matching is case-insensitive. See
Voices for the full list.
A specific narration voice, as returned by /presentation/voices. The voice
must belong to the same language you pass here. Omit it to use the default voice for the language.
Burn subtitles into the video.
Output resolution. sd renders at 720p, hd at 900p.
Narration playback speed, between 0.5 and 2.0. Values outside that range are rejected with a 422.
Code Examples
Section titled “Code Examples”curl -X POST "https://api.slidespeak.co/api/v2/presentation/video" -H "Content-Type: application/json" -H "X-API-Key: YOUR_API_KEY" -d '{ "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "language": "ENGLISH", "captions": true, "quality": "hd", "speed": 1.0 }'const response = await fetch('https://api.slidespeak.co/api/v2/presentation/video', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ presentation_id: 'cmgt32cut0000h3ovex8dbzmn', language: 'ENGLISH', captions: true, quality: 'hd', speed: 1.0 }),});
const data = await response.json();console.log(data.task_id);import requests
url = "https://api.slidespeak.co/api/v2/presentation/video"headers = { "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY",}payload = { "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "language": "ENGLISH", "captions": True, "quality": "hd", "speed": 1.0,}
response = requests.post(url, headers=headers, json=payload)print(response.json()["task_id"])<?phprequire 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post('https://api.slidespeak.co/api/v2/presentation/video', [ 'headers' => [ 'Content-Type' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY' ], 'json' => [ 'presentation_id' => 'cmgt32cut0000h3ovex8dbzmn', 'language' => 'ENGLISH', 'captions' => true, 'quality' => 'hd', 'speed' => 1.0 ]]);
$data = json_decode($response->getBody(), true);echo $data['task_id'];Example Body
Section titled “Example Body”{ "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "language": "ENGLISH", "voice_id": "en-US-AvaMultilingualNeural", "captions": true, "quality": "hd", "speed": 1.0}Response
Section titled “Response”{ "task_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69"}{ "detail": "Unknown voice_id 'en-GB-SoniaNeural' for language ENGLISH. See GET /presentation/voices?language=ENGLISH.", "error": { "code": "BAD_REQUEST", "status_code": 400, "retryable": false, "message": "Unknown voice_id 'en-GB-SoniaNeural' for language ENGLISH. See GET /presentation/voices?language=ENGLISH.", "details": {}, "request_id": "cmqf2lohi00017wlp3du979zt" }}{ "detail": "You don't have enough API credits to generate the video (required: 50, available: 24). Please upgrade your plan at https://app.slidespeak.co/settings/developer", "error": { "code": "INSUFFICIENT_API_CREDITS", "status_code": 403, "retryable": false, "message": "You don't have enough API credits to generate the video (required: 50, available: 24). Please upgrade your plan at https://app.slidespeak.co/settings/developer", "details": { "required_credits": 50, "available_credits": 24 }, "request_id": "cmqf2lohi00017wlp3du979zt" }}{ "detail": "Presentation not found", "error": { "code": "NOT_FOUND", "status_code": 404, "retryable": false, "message": "Presentation not found", "details": {}, "request_id": "cmqf2lohi00017wlp3du979zt" }}{ "detail": [ { "loc": ["body", "speed"], "msg": "Input should be less than or equal to 2", "type": "less_than_equal" } ], "error": { "code": "VALIDATION_FAILED", "status_code": 422, "retryable": false, "message": "Request validation failed.", "details": { "errors": [ { "loc": ["body", "speed"], "msg": "Input should be less than or equal to 2", "type": "less_than_equal" } ] }, "request_id": null }}Example Task Result
Section titled “Example Task Result”Poll /task_status/{task_id} until task_status is SUCCESS. The
task_result contains the request_id to use with /presentation/download/{request_id},
which returns a short-lived URL to the MP4.
{ "task_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69", "task_status": "SUCCESS", "task_result": { "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "request_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69" }}Credits
Section titled “Credits”Video generation costs 5 API credits per slide, so a 10-slide deck costs 50 credits. Credits are checked before the task starts and charged once the video succeeds. See API Credits for details.
Validation
Section titled “Validation”presentation_idmust belong to your API key.voice_id, when given, must exist for thatlanguage. Mismatches are rejected with a 400.- Unknown request fields are rejected.