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

# Generate presentation

> Generates a presentation based on the provided prompt



## OpenAPI

````yaml POST /v1/presentations/generate
openapi: 3.1.0
info:
  title: Web
  version: 0.1.0
servers:
  - url: https://api.slidesgpt.com
    description: SlidesGPT API
security:
  - bearerAuth: []
tags: []
paths:
  /v1/presentations/generate:
    post:
      tags:
        - Presentations
      summary: Generate a presentation
      description: Generates a presentation based on the provided prompt
      operationId: generatePresentation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeneratePresentation'
            example:
              prompt: Create a 10 slide presentation about the history of the internet
              templateId: abc123
      responses:
        '200':
          description: The generated presentation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Presentation'
              example:
                id: '123'
                embed: https://api.slidesgpt.com/123/embed
                download: https://api.slidesgpt.com/123/download
        '400':
          description: Failed to generate presentation
        '500':
          description: Internal Server Error
components:
  schemas:
    GeneratePresentation:
      type: object
      properties:
        prompt:
          type: string
          minLength: 5
          maxLength: 64000
          description: The prompt to generate the presentation.
        templateId:
          type: string
          description: >-
            The ID of a custom template to use. Get template IDs from GET
            /v1/templates.
      required:
        - prompt
      additionalProperties: false
    Presentation:
      type: object
      properties:
        id:
          type: string
          description: The id of the presentation
        embed:
          type: string
          format: uri
          description: >-
            The url to embed the presentation. A redirect to a Microsoft
            PowerPoint viewer url.
        download:
          type: string
          format: uri
          description: The url to download the presentation as PowerPoint.
      required:
        - id
        - embed
        - download
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````