Skip to main content
See a video walk-through here
You can create, view, and edit your organization’s FlashDocs templates & libraries at: https://dash.flashdocs.ai This tutorial will show you how to do the following:

Authenticate

Upload a Google Slides presentation and convert it into a FlashDocs Library

View your uploaded document

Crash Course on How FlashDocs Works

Before continuing, make sure you know:
  • The difference between a Template and a Library in FlashDocs
    • A FlashDocs template is a series of slides with placeholders. When a template deck is generated, it uses the all of the slides in the specified order and customizes the placeholder values to the given context.
    • A FlashDocs library is a large set of slides. When a custom deck is created, specific slides from the library are selected based on the context of the deck. The placeholders in these slides are customized to the given context.
  • A general idea about placeholders in a FlashDocs document and how FlashDocs uses them to create custom presentations.

Crash Course

Learn the basics of how FlashDocs works in 60 seconds.

Set-Up

In this example, we will use Python’s requests library to interact with FlashDocs REST API.Replace YOUR_AUTH_TOKEN with your actual token. Keep your token secret.

EndpointGET /v1/auth/userWhen called with a valid Authorization: Bearer <token> header, this endpoint will return the User object representing the currently authenticated user.Example Response

Upload Documents

FlashDocs supports Google Slides and PowerPoint - in this example, we create a FlashDocs Library from a Google Slides document. After uploading a presentation, you can create endless decks from it using the launch endpoint.

Intuition

FlashDocs generates decks by choosing relevant slides from the master deck and then replacing all of the text, images, and charts in the slide depending on the user’s prompt + context.

Deck Creation

FlashDocs generates decks by choosing relevant slides from the master deck and then replacing all of the text, images, and charts in the slide depending on the user’s prompt + context.

Standardization

FlashDocs standardizes and processes the slides to make them usable for programmatic creation.
  • - Changes all text to placeholders - If reset_test_boxes=true
  • - Identifies image placeholders (logos)
  • - and more…
For best performance, include lots of slides in the library so the system can find a relevant layout for each slide generation.

Upload Endpoints

EndpointPOST /v1/documents/google
View the API Reference here
This endpoint is used to upload a Google Slides link and create a template or library in your organization. In this example, we’ll convert your Google Slides presentation into a library. Depending on the number of slides, it may take a few minutes (ex: 50 slides may take 3 minutes). If the speed of upload is a concern, let us know and we can easily speed it up an order of magnitude.If you have a deck with text placeholders already enclosed in brackets ([, ]), then reset_text_boxes=false will automatically identify and capture them. Otherwise, given a deck with text already populated, with reset_text_boxes=true the system will reset all text to placeholders.Request ParametersExample Response
Below is a code snippet that calls the REST API.
EndpointPOST /v1/documents/ppt
View the API Reference here

Example Usage (Google)

Feel free to use your own Google Document Link. For demonstration purposes, we created a sample library with a handful of slides: Google Slide Sample Library [Original]. The document is public, so feel free to check it out. Here is a duplicated result of the deck after the text boxes are reset: View Only Google Slide Sample Library [After Upload]
Note that in the output deck (result after calling endpoint), all of the text is transformed into placeholders (with square brackets around categories of text). This happens because the example includes reset_text_boxes=true, which identifies all text elements and transforms them into FlashDocs text placeholders.
Using the upload_google_presentation_as_library function defined in the “Create Google Slides Library” section:
Error Handling For Google Slides presentations, our service worker must be able to access and edit the document. You might be asked to manually share the document with flashy@flashdocs.ai, flashy1@flashdocs.ai, flashy2@flashdocs.ai, and flashy2@flashdocs.ai Contact adam@flashdocs.ai if you have any unexpected difficulties.

View and Edit Your Uploaded Document

After successfully uploading your document, you may want to verify its full details, including the placeholders created within each slide. The FlashDocs API offers a route to fetch the complete document object, where you can specify which parts (slides, questions, knowledge base items, or embeddings) you want included in the response.
EndpointGET /v1/documents/{document_id}/fullParameters

Example Request

GET /v1/documents/{document_id}/full?include_slides=true&include_questions=false&include_knowledge_base=false&include_embeddings=false

Example Response

Below is a Python snippet that demonstrates how to retrieve the full document data:
To update the metadata of a document (description, name, type (template/library)), use the following endpoint:EndpointPUT /v1/documents/{document_id}To update the attributes of a specific slide in the document (description, image_placeholders, text_placeholders, etc.), use the following endpoint:EndpointPUT /v1/slides/{slide_id}The slide_idcan be retrieved from a call to GET /v1/documents/{document_id}/full with include_slides=true
EndpointDELETE /v1/documents/{document_id}
Retrieve a list of documents from the system, with optional filtering by document type and format.

Endpoint

GET /v1/documents/base

Description

The List Documents endpoint allows you to fetch a collection of documents stored in the system. You can optionally filter the results by document_type and format. If no filters are applied, all documents will be returned.

Query Parameters

You can filter the documents by document_type and format. Both parameters are optional.

Response

A successful request returns a JSON array of document objects.

HTTP Status Code

  • 200 OK

Response Body

Each document object contains the following fields:

Example Response

Example Python Request

User Interface For FlashDocs Document Updates

You can create, view, and edit your organization’s FlashDocs templates & libraries at: https://dash.flashdocs.ai