Generate a v2 Presentation
Creates a presentation from a prompt and optional uploaded documents.
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 prompt or topic to generate a presentation about. It must not be empty.
Uploaded document IDs to use as source material. Upload documents with
/api/v2/document/upload, then poll the upload task until
SUCCESS and pass the returned document ID here.
Optional generation settings. If omitted, SlideSpeak chooses generation defaults.
A design kit ID returned by /presentation/design-kits.
If omitted, SlideSpeak uses automatic AI design.
Exact slide count. If omitted, SlideSpeak chooses 3 to 8 slides, capped by your available credits.
Output language, such as ENGLISH or ORIGINAL.
Tone for generated text.
How much text to include in the presentation.
Whether to generate speaker notes.
Code Examples
Section titled “Code Examples”curl -X POST "https://api.slidespeak.co/api/v2/presentation/generate" -H "Content-Type: application/json" -H "X-API-Key: YOUR_API_KEY" -d '{ "prompt": "Create a concise sales enablement deck for a new CRM integration.", "document_ids": ["doc_123"], "settings": { "design_kit_id": "dk_acme", "length": 8, "language": "ENGLISH", "tone": "professional", "verbosity": "standard", "add_speaker_notes": true } }'const response = await fetch('https://api.slidespeak.co/api/v2/presentation/generate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ prompt: 'Create a concise sales enablement deck for a new CRM integration.', document_ids: ['doc_123'], settings: { design_kit_id: 'dk_acme', length: 8, language: 'ENGLISH', tone: 'professional', verbosity: 'standard', add_speaker_notes: true } }),});
const data = await response.json();console.log(data.task_id);import requests
url = "https://api.slidespeak.co/api/v2/presentation/generate"headers = { "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY",}payload = { "prompt": "Create a concise sales enablement deck for a new CRM integration.", "document_ids": ["doc_123"], "settings": { "design_kit_id": "dk_acme", "length": 8, "language": "ENGLISH", "tone": "professional", "verbosity": "standard", "add_speaker_notes": True, },}
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/generate', [ 'headers' => [ 'Content-Type' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY' ], 'json' => [ 'prompt' => 'Create a concise sales enablement deck for a new CRM integration.', 'document_ids' => ['doc_123'], 'settings' => [ 'design_kit_id' => 'dk_acme', 'length' => 8, 'language' => 'ENGLISH', 'tone' => 'professional', 'verbosity' => 'standard', 'add_speaker_notes' => true ] ]]);
$data = json_decode($response->getBody(), true);echo $data['task_id'];Example Body
Section titled “Example Body”{ "prompt": "Create a concise sales enablement deck for a new CRM integration.", "document_ids": ["doc_123"], "settings": { "design_kit_id": "dk_acme", "length": 8, "language": "ENGLISH", "tone": "professional", "verbosity": "standard", "add_speaker_notes": true }}Response
Section titled “Response”{ "task_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69"}{ "detail": "Design kit is not available to this user"}{ "detail": [ { "loc": ["body", "prompt"], "msg": "Value error, Prompt must not be empty", "type": "value_error" } ]}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}.
{ "task_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69", "task_status": "SUCCESS", "task_result": { "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "request_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69" }}Validation
Section titled “Validation”promptis required and must contain non-whitespace text.document_idsmust belong to your API key.settings.design_kit_id, when provided, must be available to your API key.settings.length, when provided, must be greater than0and you must have enough credits for that slide count.- Unknown request fields are rejected.