> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I update an existing PowerPoint with new content?

> Upload the .pptx and ask for the changes with operation edit: add, reorder or remove slides while keeping the presentation's design.

To update an existing PowerPoint, upload it and ask for the changes in a sentence with `operation: "edit"` ("add a
slide with March results after slide 3"). Doconda adds, reorders or removes slides while keeping the design, and
leaves everything you don't ask for untouched.

## Steps

1. Store your API key in `DOCONDA_API_KEY` and install the SDK (`pip install doconda` or `npm install @doconda/sdk`).
2. Upload the presentation with `files.upload`.
3. Ask for the changes and download the `.pptx`.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  from pathlib import Path
  from doconda import Doconda

  doconda = Doconda()  # reads the key from DOCONDA_API_KEY
  file = doconda.files.upload("board.pptx")
  edited = doconda.documents.create(
      operation="edit",
      file=file["id"],
      prompt="Add a slide with March sales (€48,000) after slide 3 and remove the last one",
  )
  Path("board-updated.pptx").write_bytes(doconda.documents.download(edited["id"], "pptx"))
  ```

  ```ts TypeScript theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  import { readFile, writeFile } from "node:fs/promises"
  import { Doconda } from "@doconda/sdk"

  const doconda = new Doconda()
  const file = await doconda.files.upload(await readFile("board.pptx"), "board.pptx")
  const edited = await doconda.documents.create({
    operation: "edit",
    file: file.id,
    prompt: "Add a slide with March sales (€48,000) after slide 3 and remove the last one",
  })
  await writeFile("board-updated.pptx", await doconda.documents.download(edited.id, "pptx"))
  ```
</CodeGroup>

## What you get back

* The same presentation with only the requested changes, as `.pptx`, and its PDF.
* A report (`documents.report(id)`). The result is reviewed as in [Review](/en/guides/review): text overflowing its
  box, shapes off the slide, slides without a title…
* `status`: `ready`, `ready_with_warnings`, `needs_review` or `failed`. If the request can't be turned into changes,
  `failed` with `edit_not_understood`, not charged.

## Limits

* 50 pages maximum.
* `.ppt` is accepted: the result comes out as `.pptx`.
* With `quality: "fast"` and with `.ppt`, each change arrives as an `edit.operation_applied` event with the before and
  after.

## Another option: a new presentation with your template

If you'd rather rebuild it, create a new presentation and pass yours in `sources`, saying "with our template's
design". A presentation is used as a template: the result starts from its slides. Needs `standard` or `best`. See
[Copy the design of a file](/en/guides/create#copy-the-design-of-a-file).

## FAQ

<AccordionGroup>
  <Accordion title="Is the presentation's theme kept?">
    Yes. Only what you ask for changes; new content follows the design of the existing slides.
  </Accordion>

  <Accordion title="Can I use a presentation Doconda already made?">
    Yes: pass its id (`doc_…`) in `file`.
  </Accordion>

  <Accordion title="How do I read a presentation's text?">
    With [`extract`](/en/guides/extract): one section per slide, with its notes.
  </Accordion>
</AccordionGroup>

## Keep reading

* [Edit](/en/guides/edit) and [SDK: review and edit](/en/sdk/review-edit).
* [Quickstart](/en/quickstart).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.