Untitleddiagram Mermaid Chart 2025 08 12 124532 Pn

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.