---
title: "Create a presentation from text, topic, URL, YouTube, PDF or DOCX (unified endpoint)"
method: POST
path: "/ppt-from-text"
tags: ["Presentations"]
---

# Create a presentation from text, topic, URL, YouTube, PDF or DOCX (unified endpoint)

`POST /ppt-from-text`

## Request

- Base URL: `https://api.magicslides.app/public/api`
- URL: `https://api.magicslides.app/public/api/ppt-from-text`
- Auth: none required

Recommended for all new integrations. Detects the input type automatically: a plain topic, a summary, a website URL, a YouTube URL, a PDF URL or a DOCX URL. Returns download URLs for the generated PPTX and PDF plus the slide JSON. Generation typically takes 20–60 seconds; the call blocks until the deck is ready.

## Request body

- union
  - object
    - `apiKey` string, required: API key from /dashboard/settings. Format: ms-api-…
    - `topic` string, required: Topic, summary or URL. URLs are auto-detected.
    - `summary` string: Plain-text summary to turn into slides.
    - `youtubeURL` string, uri: YouTube video URL.
    - `websiteURL` string, uri: Web page to extract content from.
    - `pdfURL` string, uri: Public PDF URL.
    - `docxURL` string, uri: Public DOCX URL.
    - `model` 'gemini' | 'gpt-4': LLM used for content.
    - `presentationCategory` object: Optional tone/category hints.
      - `category` string
      - `subCategory` string
      - `tone` string
    - `email` string, email: Account email (legacy auth, use apiKey instead).
    - `accessId` string: Account access ID from /dashboard/settings (legacy auth, use apiKey instead).
    - `template` string: Presentation template style.
    - `language` string: Target language (ISO code).
    - `slideCount` integer: Number of slides to generate.
    - `aiImages` boolean: Generate AI images.
    - `imageForEachSlide` boolean: Place an image on every slide.
    - `googleImage` boolean: Use Google Images instead of AI images.
    - `googleText` boolean: Enrich content with Google search.
    - `presentationFor` string: Target audience, e.g. "investors".
    - `watermark` Watermark: Optional image watermark placed on every slide.
      - `width` string
      - `height` string
      - `brandURL` string, uri
      - `position` 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'
  - object
    - `apiKey` string, required: API key from /dashboard/settings. Format: ms-api-…
    - `topic` string: Topic, summary or URL. URLs are auto-detected.
    - `summary` string, required: Plain-text summary to turn into slides.
    - `youtubeURL` string, uri: YouTube video URL.
    - `websiteURL` string, uri: Web page to extract content from.
    - `pdfURL` string, uri: Public PDF URL.
    - `docxURL` string, uri: Public DOCX URL.
    - `model` 'gemini' | 'gpt-4': LLM used for content.
    - `presentationCategory` object: Optional tone/category hints.
      - `category` string
      - `subCategory` string
      - `tone` string
    - `email` string, email: Account email (legacy auth, use apiKey instead).
    - `accessId` string: Account access ID from /dashboard/settings (legacy auth, use apiKey instead).
    - `template` string: Presentation template style.
    - `language` string: Target language (ISO code).
    - `slideCount` integer: Number of slides to generate.
    - `aiImages` boolean: Generate AI images.
    - `imageForEachSlide` boolean: Place an image on every slide.
    - `googleImage` boolean: Use Google Images instead of AI images.
    - `googleText` boolean: Enrich content with Google search.
    - `presentationFor` string: Target audience, e.g. "investors".
    - `watermark` Watermark: Optional image watermark placed on every slide.
      - `width` string
      - `height` string
      - `brandURL` string, uri
      - `position` 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'
  - object
    - `apiKey` string, required: API key from /dashboard/settings. Format: ms-api-…
    - `topic` string: Topic, summary or URL. URLs are auto-detected.
    - `summary` string: Plain-text summary to turn into slides.
    - `youtubeURL` string, uri, required: YouTube video URL.
    - `websiteURL` string, uri: Web page to extract content from.
    - `pdfURL` string, uri: Public PDF URL.
    - `docxURL` string, uri: Public DOCX URL.
    - `model` 'gemini' | 'gpt-4': LLM used for content.
    - `presentationCategory` object: Optional tone/category hints.
      - `category` string
      - `subCategory` string
      - `tone` string
    - `email` string, email: Account email (legacy auth, use apiKey instead).
    - `accessId` string: Account access ID from /dashboard/settings (legacy auth, use apiKey instead).
    - `template` string: Presentation template style.
    - `language` string: Target language (ISO code).
    - `slideCount` integer: Number of slides to generate.
    - `aiImages` boolean: Generate AI images.
    - `imageForEachSlide` boolean: Place an image on every slide.
    - `googleImage` boolean: Use Google Images instead of AI images.
    - `googleText` boolean: Enrich content with Google search.
    - `presentationFor` string: Target audience, e.g. "investors".
    - `watermark` Watermark: Optional image watermark placed on every slide.
      - `width` string
      - `height` string
      - `brandURL` string, uri
      - `position` 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'
  - object
    - `apiKey` string, required: API key from /dashboard/settings. Format: ms-api-…
    - `topic` string: Topic, summary or URL. URLs are auto-detected.
    - `summary` string: Plain-text summary to turn into slides.
    - `youtubeURL` string, uri: YouTube video URL.
    - `websiteURL` string, uri, required: Web page to extract content from.
    - `pdfURL` string, uri: Public PDF URL.
    - `docxURL` string, uri: Public DOCX URL.
    - `model` 'gemini' | 'gpt-4': LLM used for content.
    - `presentationCategory` object: Optional tone/category hints.
      - `category` string
      - `subCategory` string
      - `tone` string
    - `email` string, email: Account email (legacy auth, use apiKey instead).
    - `accessId` string: Account access ID from /dashboard/settings (legacy auth, use apiKey instead).
    - `template` string: Presentation template style.
    - `language` string: Target language (ISO code).
    - `slideCount` integer: Number of slides to generate.
    - `aiImages` boolean: Generate AI images.
    - `imageForEachSlide` boolean: Place an image on every slide.
    - `googleImage` boolean: Use Google Images instead of AI images.
    - `googleText` boolean: Enrich content with Google search.
    - `presentationFor` string: Target audience, e.g. "investors".
    - `watermark` Watermark: Optional image watermark placed on every slide.
      - `width` string
      - `height` string
      - `brandURL` string, uri
      - `position` 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'
  - object
    - `apiKey` string, required: API key from /dashboard/settings. Format: ms-api-…
    - `topic` string: Topic, summary or URL. URLs are auto-detected.
    - `summary` string: Plain-text summary to turn into slides.
    - `youtubeURL` string, uri: YouTube video URL.
    - `websiteURL` string, uri: Web page to extract content from.
    - `pdfURL` string, uri, required: Public PDF URL.
    - `docxURL` string, uri: Public DOCX URL.
    - `model` 'gemini' | 'gpt-4': LLM used for content.
    - `presentationCategory` object: Optional tone/category hints.
      - `category` string
      - `subCategory` string
      - `tone` string
    - `email` string, email: Account email (legacy auth, use apiKey instead).
    - `accessId` string: Account access ID from /dashboard/settings (legacy auth, use apiKey instead).
    - `template` string: Presentation template style.
    - `language` string: Target language (ISO code).
    - `slideCount` integer: Number of slides to generate.
    - `aiImages` boolean: Generate AI images.
    - `imageForEachSlide` boolean: Place an image on every slide.
    - `googleImage` boolean: Use Google Images instead of AI images.
    - `googleText` boolean: Enrich content with Google search.
    - `presentationFor` string: Target audience, e.g. "investors".
    - `watermark` Watermark: Optional image watermark placed on every slide.
      - `width` string
      - `height` string
      - `brandURL` string, uri
      - `position` 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'
  - object
    - `apiKey` string, required: API key from /dashboard/settings. Format: ms-api-…
    - `topic` string: Topic, summary or URL. URLs are auto-detected.
    - `summary` string: Plain-text summary to turn into slides.
    - `youtubeURL` string, uri: YouTube video URL.
    - `websiteURL` string, uri: Web page to extract content from.
    - `pdfURL` string, uri: Public PDF URL.
    - `docxURL` string, uri, required: Public DOCX URL.
    - `model` 'gemini' | 'gpt-4': LLM used for content.
    - `presentationCategory` object: Optional tone/category hints.
      - `category` string
      - `subCategory` string
      - `tone` string
    - `email` string, email: Account email (legacy auth, use apiKey instead).
    - `accessId` string: Account access ID from /dashboard/settings (legacy auth, use apiKey instead).
    - `template` string: Presentation template style.
    - `language` string: Target language (ISO code).
    - `slideCount` integer: Number of slides to generate.
    - `aiImages` boolean: Generate AI images.
    - `imageForEachSlide` boolean: Place an image on every slide.
    - `googleImage` boolean: Use Google Images instead of AI images.
    - `googleText` boolean: Enrich content with Google search.
    - `presentationFor` string: Target audience, e.g. "investors".
    - `watermark` Watermark: Optional image watermark placed on every slide.
      - `width` string
      - `height` string
      - `brandURL` string, uri
      - `position` 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'

## Response `200`

Presentation generated.

- PresentationResult
  - `status` 'success' | 'failed', required
  - `success` boolean
  - `message` string
  - `inputType` 'topic' | 'summary' | 'youtube' | 'website' | 'pdf' | 'docx'
  - `url` string, uri, required: Download URL of the generated PPTX.
  - `pdfUrl` string, uri: Download URL of the PDF export.
  - `pptId` string: Presentation ID — open at https://www.magicslides.app/ppt/{pptId}.
  - `json` object: Slide-by-slide content as JSON.
  - `metadata` object
    - `slideCount` integer
    - `generatedAt` string, date-time
    - `fileSize` integer: Bytes.

## Other responses

- `400`: Invalid or missing parameters. Note: legacy endpoints answer missing parameters with 404, not 400.
- `401`: Missing or invalid apiKey / accessId.
- `403`: Plan does not allow this operation or credits exhausted.
- `405` (unresolved $ref)
- `429`: Plan rate limit exceeded. Back off and retry later.
- `500`: Generation failed. Safe to retry once.

---

[API](https://skmtc.dev/magicslides/apis/magicslides-api.md) · [All operations](https://skmtc.dev/magicslides/apis/magicslides-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magicslides/apis/magicslides-api/revisions/bb1173e74e5f?raw)
