Edit Slide
Edits a slide in an existing presentation. Depending on edit_type, it can insert a new generated slide, regenerate an existing slide, or remove a slide at a specified position.
The endpoint returns a task_id; poll /task_status/{task_id} until SUCCESS, then use the returned request_id with /presentation/download/{id} to obtain a short‑lived download URL.
Headers
Section titled “Headers”application/json
The API key to use for the request.
<YOUR_API_KEY>
Body Parameters
Section titled “Body Parameters”The type of edit to perform on the slide.
The ID of the presentation to modify.
The text prompt describing the content to generate. Required for insert and regenerate. Must be omitted or null for remove.
The absolute slide index to target for the edit. For insert, the slide is inserted at this index (values beyond the current number of slides are clamped to the end). For regenerate and remove, the slide at this index is updated or removed.
UUIDs of uploaded documents whose content can be used for the slide generation.
Whether to include stock images for the inserted slide. If omitted, inherits from the presentation’s settings.
How verbose the text should be for the inserted slide. If omitted, inherits from the presentation’s settings.
Whether to add speaker notes to the inserted slide. If omitted, inherits from the presentation’s settings.
Whether to expand content with related information using general knowledge. If omitted, inherits from the presentation’s settings.
Whether to use wording very similar to the provided documents. If omitted, inherits from the presentation’s settings.
Whether to include images detected in the provided documents. If omitted, inherits from the presentation’s settings.
The tone for the inserted slide. If omitted, inherits from the presentation’s settings.
Code Examples
Section titled “Code Examples”curl -X POST "https://api.slidespeak.co/api/v1/presentation/edit/slide"   -H "Content-Type: application/json"   -H "X-API-Key: YOUR_API_KEY"   -d '{    "presentation_id": "cmgt32cut0000h3ovex8dbzmn",    "edit_type": "insert",    "prompt": "Add a slide summarizing key customer acquisition channels with 3 bullet points.",    "position": 4,    "document_uuids": ["b12f2c9c-1a2b-4d3e-9f4a-5b6c7d8e9f01"],    "fetch_images": true,    "tone": "professional",    "verbosity": "standard"  }'fetch('https://api.slidespeak.co/api/v1/presentation/edit/slide', {  method: 'POST',  headers: {    'Content-Type': 'application/json',    'X-API-Key': 'YOUR_API_KEY'  },  body: JSON.stringify({    presentation_id: 'cmgt32cut0000h3ovex8dbzmn',    edit_type: 'insert',    prompt: 'Add a slide summarizing key customer acquisition channels with 3 bullet points.',    position: 4,    document_uuids: ['b12f2c9c-1a2b-4d3e-9f4a-5b6c7d8e9f01'],    fetch_images: true,    tone: 'professional',    verbosity: 'standard'  }),})  .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/edit/slide"headers = {  "Content-Type": "application/json",  "X-API-Key": "YOUR_API_KEY"}payload = {  "presentation_id": "cmgt32cut0000h3ovex8dbzmn",  "edit_type": "insert",  "prompt": "Add a slide summarizing key customer acquisition channels with 3 bullet points.",  "position": 4,  "document_uuids": ["b12f2c9c-1a2b-4d3e-9f4a-5b6c7d8e9f01"],  "fetch_images": True,  "tone": "professional",  "verbosity": "standard"}
response = requests.post(url, headers=headers, json=payload)print(response.json())<?phprequire 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post('https://api.slidespeak.co/api/v1/presentation/edit/slide', [    'headers' => [        'Content-Type' => 'application/json',        'X-API-Key' => 'YOUR_API_KEY'    ],    'json' => [        'presentation_id' => 'cmgt32cut0000h3ovex8dbzmn',        'edit_type' => 'insert',        'prompt' => 'Add a slide summarizing key customer acquisition channels with 3 bullet points.',        'position' => 4,        'document_uuids' => ['b12f2c9c-1a2b-4d3e-9f4a-5b6c7d8e9f01'],        'fetch_images' => true,        'tone' => 'professional',        'verbosity' => 'standard'    ]]);
$body = $response->getBody();$data = json_decode($body, true);
print_r($data);Example bodies
Section titled “Example bodies”Insertion
{  "presentation_id": "cmgt32cut0000h3ovex8dbzmn",  "edit_type": "insert",  "prompt": "Add a slide summarizing key customer acquisition channels with 3 bullet points.",  "position": 2,  "document_uuids": ["b12f2c9c-1a2b-4d3e-9f4a-5b6c7d8e9f01"],  "fetch_images": true,  "tone": "professional",  "verbosity": "standard",  "add_speaker_notes": false,  "use_general_knowledge": true,  "use_wording_from_document": false,  "use_document_images": true}Regeneration
{  "presentation_id": "cmgt32cut0000h3ovex8dbzmn",  "edit_type": "regenerate",  "prompt": "Regenerate this slide to focus on organic channels only with 3 concise bullets.",  "position": 3}Removal
{  "presentation_id": "cmgt32cut0000h3ovex8dbzmn",  "edit_type": "remove",  "prompt": null,  "position": 4}Response
Section titled “Response”{  "task_id": "a5e371f2-9138-4d07-9f7a-8a9c9dcd0c21"}Example Task Result
Section titled “Example Task Result”{  "task_id": "a5e371f2-9138-4d07-9f7a-8a9c9dcd0c21",  "task_status": "SUCCESS",  "task_result": {    "url": "https://slidespeak-files.s3.us-east-2.amazonaws.com/24d89111-71a1-4c05-a909-2d84123c9ba9.pptx",    "presentation_id": "cmgt32cut0000h3ovex8dbzmn",    "request_id": "353509d6-8efe-401c-a8a9-53ca64b520a3"  },  "task_info": {    "url": "https://slidespeak-files.s3.us-east-2.amazonaws.com/24d89111-71a1-4c05-a909-2d84123c9ba9.pptx",    "presentation_id": "cmgt32cut0000h3ovex8dbzmn",    "request_id": "353509d6-8efe-401c-a8a9-53ca64b520a3"  }}