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

# Generate Slide(s)

> The **Generate Deck** endpoint creates a slide deck based on user-defined parameters that specify its content and structure. Upon successful creation, the endpoint returns a link to the deck along with execution details. Unlike the POST `/v3/generate/deck/task` endpoint—which immediately returns a deck generation task for polling—this endpoint waits until the entire deck has been rendered before sending the response.



## OpenAPI

````yaml https://api.flashdocs.ai/openapi.json post /v3/generate/deck
openapi: 3.1.0
info:
  title: FlashDocs API
  description: API for FlashDocs application
  version: 1.0.0
servers:
  - url: https://api.flashdocs.ai
    description: Production server
security: []
paths:
  /v3/generate/deck:
    post:
      tags:
        - Generate
      summary: Generate Slide(s)
      description: >-
        The **Generate Deck** endpoint creates a slide deck based on
        user-defined parameters that specify its content and structure. Upon
        successful creation, the endpoint returns a link to the deck along with
        execution details. Unlike the POST `/v3/generate/deck/task`
        endpoint—which immediately returns a deck generation task for
        polling—this endpoint waits until the entire deck has been rendered
        before sending the response.
      operationId: generate_deck_v3_generate_deck_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeckGenerationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeckGenerationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    DeckGenerationRequest:
      properties:
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
          description: >-
            The main (ideally information dense) instructions for how to create
            the slide(s). Can be ~400,000 characters.
          example: >-
            In a few slides, describe the recent Innovations in Renewable
            Energy. Discuss the foundational problems and key papers. Include
            specific examples.
        source_document_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Document Id
          description: >-
            Optional. The FlashDocs document ID of an existing source document
            to base the presentation content on. See the results from
            `https://api.flashdocs.ai/v1/documents/base` - the `id` key in the
            document object. If not provided, then *any* Library document in the
            organization is chosen.
          example: abc-def-ghi-jkl
        number_slides:
          anyOf:
            - type: integer
            - type: 'null'
          title: Number Slides
          description: >-
            Optional. The desired number of slides in the generated
            presentation. If not provided, the system will automatically predict
            the number of slides from the prompt. Do not include if
            `source_document_id` is a *template* document.
          example: 5
        audience_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Audience Domain
          description: >-
            Optional. Used to populate image placeholders with the
            `audience-company-logo` category. I.e. if this is a slide deck for
            an *external* audience, the `audience_domain` is the website of the
            company that the audience belongs to. If not provided, the system
            will predict. Must be valid domain name (ex: if you are making a
            deck to sell your product to the finance team at Intel, set this
            parameter to `intel.com` or `https://intel.com`)
          example: slack.com
        presentation_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Presentation Name
          description: >-
            Optional. The desired filename name for the generated presentation
            deck. If not provided, the system will generate one based on the
            prompt.
          example: Renewable Energy Innovations 2025
        outline:
          anyOf:
            - items:
                $ref: '#/components/schemas/DeckOutlineItem'
              type: array
            - type: 'null'
          title: Outline
          description: >-
            Optional. An array of outline instructions defining the content and
            layout for each slide. See the endpoint for details. Only used for
            custom decks - ignored for template decks. Useful when you want
            specific content & layouts for each slide in a custom deck. If not
            provided, then the system will generate an outline using the prompt.
        export_options:
          anyOf:
            - $ref: '#/components/schemas/ExportOptions'
            - type: 'null'
          description: >-
            Optional. Export options for the generated presentation. Only
            applicable to Google Slides - ignored for PowerPoint.
          example:
            google_slides_permission_options:
              anyone_edit_with_link: false
              anyone_view_with_link: false
              google_document_editors:
                - bob@acme.com
                - joe@acme.com
            output_format: google_slides_direct_link
      type: object
      title: DeckGenerationRequest
    DeckGenerationResponse:
      properties:
        task_id:
          type: string
          title: Task Id
          description: Unique identifier for the task instance of the deck generation.
          example: task_67890
        link_to_deck:
          anyOf:
            - type: string
            - type: 'null'
          title: Link To Deck
          description: URL link to access the generated presentation deck.
          example: https://docs.google.com/presentation/d/abcdefg123456
        runtime:
          type: number
          title: Runtime
          description: Time taken to generate the deck, in seconds.
          example: 4.3778
        success:
          type: boolean
          title: Success
          description: Indicates whether the deck generation was successful.
          example: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message in case the generation failed.
          example: ''
      type: object
      required:
        - task_id
        - runtime
        - success
      title: DeckGenerationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeckOutlineItem:
      properties:
        content_instruction:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Instruction
          description: Optional. Instruction for the content of the slide.
          example: Introduce the topic of renewable energy and its importance.
        layout_instruction:
          anyOf:
            - type: string
            - type: 'null'
          title: Layout Instruction
          description: >-
            Optional. Instruction for the layout/design of the slide. Can only
            provide 1 of `layout_instruction` OR `slide_id`.
          example: Title slide with a background image.
        markdown:
          anyOf:
            - type: string
            - type: 'null'
          title: Markdown
          description: >-
            Optional. Markdown content for the slide. Can only provide 1 of
            `markdown` OR [`layout_instruction`, `content_instruction`].
          example: |-
            # Parallel Inference on GPUs for LLMs
            ## **Data Parallelism**
            - Distributes batches of input data across GPUs.
            - **Benefits:** Increased throughput via simultaneous processing.
            ## **Model Parallelism**
            - Splits the model's layers or components among GPUs.
            ## **Pipeline Parallelism**
            - Overlaps different stages of inference, reducing idle time.
            - **Advantage:** Maximizes resource utilization.
                - Use various layers of DNN see [here](https://developer.nvidia.com/blog).
        text_placeholder_manual_insertions:
          anyOf:
            - items:
                $ref: '#/components/schemas/TextPlaceholderValueWithOptions'
              type: array
            - type: 'null'
          title: Text Placeholder Manual Insertions
          description: >-
            Optional. A list of manual insertions of placeholder text into the
            generated deck. Useful for users who want to control the exact
            values of text placeholders in the slide. The placeholder must exist
            in the slides as Text Placeholder; therefore, we recommend using
            this text_placeholder_manual_insertions parameter when you know the
            placeholder values: `template` deck types and custom decks where the
            slide id is specified in the `outline` parameter. We support
            markdown content (lists, heading, bold, italics, underline, links,
            etc.)!
          example:
            - placeholder: '[title]'
              value: Renewable Energy Innovations 2027
            - placeholder: '[content]'
              value: Introduce the topic of renewable energy and its importance.
        image_placeholder_manual_insertions:
          anyOf:
            - items:
                $ref: '#/components/schemas/ImagePlaceholderManualInsertion'
              type: array
            - type: 'null'
          title: Image Placeholder Manual Insertions
          description: >-
            Optional. A list of manual insertions of image placeholders into the
            generated deck.
          example:
            - alt_text: '[top right]'
              slide_index: 0
              url: https://example.com/image.jpg
            - alt_text: '[bottom left]'
              slide_index: 1
              url: https://example.com/image2.jpg
        slide_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slide Id
          description: >-
            Optional. FlashDocs `id` of the slide. Can be found in the
            `https://api.flashdocs.ai/v1/documents/{document_id}/full` endpoint
            with `include_slides=true` in the `id` key for the slide object. Can
            only provide 1 of `layout_instruction` OR `slide_id`.
          example: slide_123
      type: object
      title: DeckOutlineItem
    ExportOptions:
      properties:
        output_format:
          allOf:
            - $ref: '#/components/schemas/OutputFormat'
          description: Output format for the export.
          default: default
          example: google_slides_direct_link
        expiration_minutes:
          anyOf:
            - type: integer
              minimum: 3
            - type: 'null'
          title: Expiration Minutes
          description: >-
            Optional. Expiration time in minutes for the generated document
            link. If not provided, the link will expire at your organization's
            data retention period.
          example: 60
        google_slides_permission_options:
          anyOf:
            - $ref: '#/components/schemas/GoogleSlidesPermissionOptions'
            - type: 'null'
          description: >-
            Optional. Permission options for the generated Google Slides
            presentation. Only applicable to Google Slides - ignored for
            PowerPoint.
          example:
            anyone_edit_with_link: false
            anyone_view_with_link: false
            google_document_editors:
              - bob@acme.com
              - joe@acme.com
      type: object
      title: ExportOptions
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TextPlaceholderValueWithOptions:
      properties:
        placeholder:
          type: string
          title: Placeholder
          description: The placeholder text in the slide
          example: '[title]'
        value:
          type: string
          title: Value
          description: Value for the placeholder
          example: Introduce the topic of renewable energy and its importance.
        resize:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Resize
          description: >-
            Optional. Whether to resize the placeholder to fit the content. If
            not specified, the placeholder will be resized by default.
          default: false
          example: true
      type: object
      required:
        - placeholder
        - value
      title: TextPlaceholderValueWithOptions
    ImagePlaceholderManualInsertion:
      properties:
        alt_text:
          type: string
          title: Alt Text
          description: The alt text for the image, which must exist in the template
          example: '[top right]'
        url:
          type: string
          minLength: 1
          format: uri
          title: Url
          description: URL for the image
          example: https://example.com/image.jpg
      type: object
      required:
        - alt_text
        - url
      title: ImagePlaceholderManualInsertion
    OutputFormat:
      type: string
      enum:
        - google_slides_direct_link
        - google_slides_copy_link
        - pdf
        - pptx
        - png
        - default
      title: OutputFormat
    GoogleSlidesPermissionOptions:
      properties:
        google_document_editors:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Google Document Editors
          description: >-
            Optional. A list of email addresses that will have edit access to
            the generated Google Slides presentation. API user is included by
            default. Only applicable to Google Slides - ignored for PowerPoint.
          example:
            - bob@acme.com
            - joe@acme.com
        anyone_view_with_link:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Anyone View With Link
          description: >-
            Optional. If true, the generated Google Slides presentation will be
            shared with anyone with a link. Only applicable to Google Slides -
            ignored for PowerPoint.
          default: false
          example: false
        anyone_edit_with_link:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Anyone Edit With Link
          description: >-
            Optional. If true, the generated Google Slides presentation will be
            shared with anyone with a link. Only applicable to Google Slides -
            ignored for PowerPoint.
          default: false
          example: false
      type: object
      title: GoogleSlidesPermissionOptions
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````