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

# Presentation Generation End‑to‑End Flow and API Map

> This guide explains how the Presentation Generator turns a user’s prompt, optional uploaded files, and a chosen template into a finished PPTX or PDF.

<img src="https://mintcdn.com/presenton-521d9e2f/sc7NnjIH00_puTca/images/Untitleddiagram_MermaidChart-2025-08-12-124532.png?fit=max&auto=format&n=sc7NnjIH00_puTca&q=85&s=f3bd2edbc31e8f809169d38d5094ee3e" alt="Untitleddiagram Mermaid Chart 2025 08 12 124532 Pn" width="2415" height="3840" data-path="images/Untitleddiagram_MermaidChart-2025-08-12-124532.png" />

## Overview

The flow mirrors the grouped stages in the diagram:

* Upload and parse files (optional)
* Generate outline
* Generate presentation
* Iterate and export

### Core user entry point

* User supplies slide count, language, and a prompt. They may also upload one or more files. The flow then follows one of two paths based on whether files are uploaded.

### Phase 1 — Upload and parse files (optional) Used only when the user attaches documents.

* Upload Files (`/api/v1/ppt/files/upload`)
  * Stores a temporary copy of each uploaded file.
* Decompose Files (`/api/v1/ppt/files/decompose`)
  * Converts each file into Markdown so it can be previewed and used as a content source.
* Update Markdown (`/api/v1/ppt/files/update`)
  * Persists edits the user makes to the extracted Markdown in the document preview page. Output of this group: cleaned, user‑approved Markdown ready to feed the outline and slide generation steps.

### Phase 2 — Generate outline

* Create Empty Presentation (`/api/v1/ppt/presentation/create`)
  * Creates a presentation record in the database with the prompt, n\_slides, language, and any Markdown file paths. Returns a presentationId that is used throughout the rest of the flow.
* Stream Outlines (`/api/v1/ppt/outlines/stream`)
  * Streams a slide‑by‑slide outline. The outline can be formed from the uploaded Markdown chunks, LLM‑generated content, or a mix; web grounding may be enabled or not. Result: a structured outline attached to presentationId that defines the content plan for each slide.

### Phase 3 — Generate presentation

* Prepare Presentation (`/api/v1/ppt/presentation/prepare`)
  * Accepts the user’s selected template and chooses a layout for each slide prior to generation.
* Stream Presentation (`/api/v1/ppt/presentation/stream`)
  * Generates slides and assets and streams them to the UI as they are created. This is the main content generation loop. Result: a live, streaming build of slides with text, structure, and assets based on the outline and chosen template/layouts.

### Iterate and export

* Update Presentation (`/api/v1/ppt/presentation/update`)
  * Saves user edits to slide content. You can call this repeatedly while previewing or after streaming has completed.
* Export PPTX (`/api/v1/ppt/presentation/export/pptx`)
  * Creates a PPTX from the structured shapes data produced during generation (using the presentation‑to‑pptx‑model NextJS endpoint under the hood).
* Export PDF
  * Creates PDF by screenshotting the slide in an Pupeeter instance through node.

For more information about the endpoints visit `/docs` of your instance for swagger documentation.
