用途:在 SlideSpeak 已生成的 PPT 上做增量编辑,支持三种操作——INSERT 在指定位置插入新幻灯片、REGENERATE 重新生成已有幻灯片、REMOVE 删除指定位置幻灯片。INSERT 与 REGENERATE 各消耗 1 credit 且必须提供 prompt,REMOVE 不消耗 credit 也不需要 prompt。
主要能力:调用端点 POST https://api.slidespeak.co/api/v1/presentation/edit/slide。必需参数为 presentation_id、edit_type、position(从 0 开始)以及 INSERT/REGENERATE 所需的 prompt。可选参数包括 document_uuids、fetch_images、verbosity(concise/standard/text-heavy)、tone(default/casual/professional/funny/educational/sales_pitch)、add_speaker_notes、use_general_knowledge、use_wording_from_document、use_document_images。
使用方式:请求返回 task_id,需轮询 /task_status/{task_id} 直到 status 为 SUCCESS,再从 task_result 的 url 下载编辑后的 PPT。工具调用形如 slidespeak_edit_slide(presentation_id=..., edit_type="INSERT", position=3, prompt=...)。
适用场景:对话中持续完善 PPT、快速迭代优化页面、动态调整演示结构,常与 slidespeak-generator 配合先生成后编辑。
限制:封面与目录页不可编辑;position 为绝对索引,需按是否有封面/目录计算偏移;异步任务可能超时或失败,需重试与错误处理;prompt 应清晰具体,过于模糊或过长会影响效果。官方 API 文档见 https://docs.slidespeak.co/basics/api-references/edit-slide/。