Skip to content

Edit Slide

POST https://api.slidespeak.co/api/v1/presentation/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.


Content-Type: string

application/json

X-API-Key: string

The API key to use for the request.


<YOUR_API_KEY>


edit_type: 'insert' | 'regenerate' | 'remove'

The type of edit to perform on the slide.

presentation_id: string

The ID of the presentation to modify.

prompt: string OPTIONAL

The text prompt describing the content to generate. Required for insert and regenerate. Must be omitted or null for remove.

position: number

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.

document_uuids: list[string] OPTIONAL

UUIDs of uploaded documents whose content can be used for the slide generation.

fetch_images: boolean OPTIONAL (default: inherits)

Whether to include stock images for the inserted slide. If omitted, inherits from the presentation’s settings.

verbosity: 'concise' | 'standard' | 'text-heavy' OPTIONAL (default: inherits)

How verbose the text should be for the inserted slide. If omitted, inherits from the presentation’s settings.

add_speaker_notes: boolean OPTIONAL (default: inherits)

Whether to add speaker notes to the inserted slide. If omitted, inherits from the presentation’s settings.

use_general_knowledge: boolean OPTIONAL (default: inherits)

Whether to expand content with related information using general knowledge. If omitted, inherits from the presentation’s settings.

use_wording_from_document: boolean OPTIONAL (default: inherits)

Whether to use wording very similar to the provided documents. If omitted, inherits from the presentation’s settings.

use_document_images: boolean OPTIONAL (default: inherits)

Whether to include images detected in the provided documents. If omitted, inherits from the presentation’s settings.

tone: 'default' | 'casual' | 'professional' | 'funny' | 'educational' | 'sales_pitch' OPTIONAL (default: inherits)

The tone for the inserted slide. If omitted, inherits from the presentation’s settings.


Terminal window
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"
}'

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
}

{
"task_id": "a5e371f2-9138-4d07-9f7a-8a9c9dcd0c21"
}

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