# Presentations API

{% hint style="info" %}
Presentations API requires a **Pro or Team plan**. [Learn more about pricing](https://guide.plusai.com/plus-ai/plans-and-billing).
{% endhint %}

The Plus AI Presentations API allows you to create new presentations programmatically via HTTP request.  Creating presentations via the Presentations API is a two step process. First, you being presentation creation with a create request, and then you poll for the final presentation file using the presentations endpoint.

## Authentication

To authenticate with the Presentations API, you must first generate an API key. You can [generate an API key here](https://app.plusdocs.com/api-settings). \
\
\&#xNAN;*Note: Only one active API key per user is currently allowed.*\
\
Once you have an API key, you can authenticate your requests to the presentations api using [HTTP Bearer authentication](https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/):

```
Authorization: Bearer {PLUSAI_API_KEY}
```

## Creating presentations via HTTP request

Creating presentations is done by sending a POST request to the presentations endpoint:

```
POST https://api.plusdocs.com/r/v0/presentation
```

The following content can be sent inside the body payload of the request:

<table data-header-hidden><thead><tr><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td>Name</td><td>Required</td><td>Type</td><td>Description</td></tr><tr><td><strong>prompt</strong></td><td>Yes</td><td>string</td><td>The input text prompt and content for the presentation</td></tr><tr><td><strong>language</strong></td><td>No</td><td>string, ISO 639-1</td><td>Defaults to "en"</td></tr><tr><td><strong>numberOfSlides</strong></td><td>No</td><td>integer, &#x3C;= 30</td><td>If not provided, will be determined by AI</td></tr><tr><td><strong>includeUserTips</strong></td><td>No</td><td>boolean</td><td>If set to false, Plus user tips will not be added to slides in presentation</td></tr><tr><td><strong>templateId</strong></td><td>No</td><td>string</td><td>Id of the custom template to create the presentation from. Contact us for information on using custom templates.</td></tr><tr><td><strong>textHandling</strong></td><td>No</td><td><p>string, </p><pre><code>"DEFAULT" |
"PRESERVE" |
"STRICT"
</code></pre></td><td>See API text handling section below</td></tr></tbody></table>

#### Text Handling <a href="#id-63d3aa9f-852d-4750-9d6c-74f44391ca03" id="id-63d3aa9f-852d-4750-9d6c-74f44391ca03"></a>

There are three different modes of text handling available via the Presentations API, which allow for control over how much editing Plus AI will do to your inputs while creating your presentation:

* Default mode: Plus AI will use your initial input as a reference, but will both edit the initial input and expand upon the input to create the best presentation possible.
* Preserve mode: Plus AI will use your initial input as a reference, and will use direct excerpts from your documents in the presentation, while minimizing edits and expansion, but will use editing and expansion of the original input when necessary.
* Strict mode: Plus AI will only use directs quotes/excerpts from your initial input when making your presentation. *Note: While Plus AI will only use your initial input in direct quotes, certain types of content such as charts, images, tables, and other formatted content may result in slight changes from your initial document.*

#### Example Request <a href="#id-63d3aa9f-852d-4750-9d6c-74f44391ca03" id="id-63d3aa9f-852d-4750-9d6c-74f44391ca03"></a>

```
curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "authorization: Bearer $PLUSAI_API_TOKEN" \
  -v \
  -d '{"prompt": "a presentation about cows"}' \
  https://api.plusdocs.com/r/v0/presentation
```

#### Response <a href="#id-040fa928-567f-40b2-947c-1a9900399aaf" id="id-040fa928-567f-40b2-947c-1a9900399aaf"></a>

The response from the create presentations endpoint will contain a polling endpoint that you can use to access your generated presentation when it finishes generating.

```
{
  "pollingUrl": "https://api.plusdocs.com/r/v0/presentation/cmffgfzpa00027vidien49upq",
  "status": "PROCESSING"
}
```

## **Polling for Generated Presentation** <a href="#b05da6a9-b569-4ab2-84d8-5361fb88c5b0" id="b05da6a9-b569-4ab2-84d8-5361fb88c5b0"></a>

```
GET /v0/presentation/:presentationId
```

Poll this endpoint to check the progress of a presentation generation request. When the status field in the response returns as "GENERATED", your presentation file will be included in the request and ready to be downloaded.

#### Path Parameters <a href="#id-54b2f288-d36f-4f4e-839d-f5c062641024" id="id-54b2f288-d36f-4f4e-839d-f5c062641024"></a>

| Name               | Required | Type   | Description                                   |
| ------------------ | -------- | ------ | --------------------------------------------- |
| **presentationId** | Yes      | string | The ID of the presentation generation request |

#### Example Request <a href="#id-53aa7835-f149-47c5-afc7-40983728713c" id="id-53aa7835-f149-47c5-afc7-40983728713c"></a>

```
curl \
  -X GET \
  -H "Content-Type: application/json" \
  -H "authorization: Bearer $PLUSAI_API_TOKEN" \
  https://api.plusdocs.com/r/v0/presentation/cmffj17kx0002snyqykn2my2x
```

#### Response <a href="#id-3f58d758-5ba1-4b52-8ff5-8620311b148d" id="id-3f58d758-5ba1-4b52-8ff5-8620311b148d"></a>

<pre><code><strong>
</strong><strong>{
</strong>  "createdAt": "2025-09-11T14:51:46.977Z",
  "id": "cmffj17kx0002snyqykn2my2x",
  "language": "en",
  "slides": null,
  "status": "PROCESSING",
  "updatedAt": "2025-09-11T14:52:43.195Z",
  "url": null
}
</code></pre>

```
{
  "createdAt": "2025-09-11T14:51:46.977Z",
  "id": "cmffj17kx0002snyqykn2my2x",
  "language": "en",
  "slides": [
    "The History of Cows",
    "Contents",
    "Origins of Cows",
    "Ancient Uses of Cows",
    "Cows in Different Cultures",
    "Modern Cattle Breeding",
    "Economic Impact of Cows",
    "Environmental Considerations",
    "Future of Cattle Farming",
    "Summary and Conclusion",
    "Thank You"
  ],
  "status": "GENERATED",
  "updatedAt": "2025-09-11T14:52:43.195Z",
  "url": "https://d2q8qai8hhcosn.cloudfront.net/3245870997/organization/cmffd8fk8000112le1tnx5osw/presentation/cmffj17kx0002snyqykn2my2x/pptx/presentation-84815c3a-2307-40fc-93c9-2f5776778d00.pptx"
}
```

## Polling for all Generated Presentations

```
GET /v0/presentations
```

Poll this endpoint to retrieve all generated presentations you have created via the Presentations API.&#x20;

*Note: This endpoint currently only shows the last 100 generated presentations.*

#### Example Request <a href="#id-53aa7835-f149-47c5-afc7-40983728713c" id="id-53aa7835-f149-47c5-afc7-40983728713c"></a>

```
curl \
  -X GET \
  -H "Content-Type: application/json" \
  -H "authorization: Bearer $PLUSAI_API_TOKEN" \
  https://api.plusdocs.com/r/v0/presentations
```

#### Response <a href="#id-3f58d758-5ba1-4b52-8ff5-8620311b148d" id="id-3f58d758-5ba1-4b52-8ff5-8620311b148d"></a>

```
{
  "presentations": [
    {
      "id": "cmffj17kx0002snyqykn2my2x",
      "name": "A brief history of cows",
      "status": "GENERATED",
      "url": "https://d2q8qai8hhcosn.cloudfront.net/3245870997/organization/cmffd8fk8000112le1tnx5osw/presentation/cmffj17kx0002snyqykn2my2x/pptx/presentation-84815c3a-2307-40fc-93c9-2f5776778d00.pptx"  
    },
    {
      "id": "cmffgfzpa00027vidien49upq",
      "name": "Dinsoaurs: A look into the past",
      "status": "GENERATED",
      "url": "https://d2q8qai8hhcosn.cloudfront.net/3245870997/organization/cmffd8fk8000112le1tnx5osw/presentation/cmffgfzpa00027vidien49upq/pptx/presentation-84815c3a-2307-40fc-93c9-293jh45kj00.pptx"  
    },
  ]
}
```

## Code Samples

### cURL Example (Presentation Creation + Polling) <a href="#id-0b0e94a2-b589-4ccb-91f8-0a0c6367d12f" id="id-0b0e94a2-b589-4ccb-91f8-0a0c6367d12f"></a>

```
PLUSAI_API_TOKEN="YOUR_TOKEN_HERE" \
PROMPT="the history of cows" \
payload=$(jq -n --arg prompt "$PROMPT" '{prompt:$prompt}'); \
polling_url=$(curl -s -X POST \
  -H "authorization: Bearer $PLUSAI_API_TOKEN" \
  -H "Content-Type: application/json" \
  https://api.plusdocs.com/r/v0/presentation \
  -d "$payload" | jq -r '.pollingUrl'); \
while :; do \
  resp=$(curl -s -H "authorization: Bearer $PLUSAI_API_TOKEN" "$polling_url"); \
  status=$(echo "$resp" | jq -r '.status'); \
  if [ "$status" = "GENERATED" ]; then \
    echo "$resp" | jq; \
    break; \
  elif [ "$status" = "FAILED" ]; then \
    echo "$resp" | jq; \
    exit 1; \
  else \
    sleep 5; \
  fi; \
done
```

### Python Example (Presentation Creation + Polling) <a href="#id-73237d9c-604e-45d7-8b2e-cfbd5a91b2c9" id="id-73237d9c-604e-45d7-8b2e-cfbd5a91b2c9"></a>

```
import time
import requests

API_BASE_URL = "https://api.plusdocs.com/r/v0"
PLUSAI_API_TOKEN = "YOUR_TOKEN_HERE"


def create_request(
    prompt: str,
    retry: int = 0,
    backoff_delay: float = 1.5,
) -> tuple[str, str]:
    request = requests.post(
        f"{API_BASE_URL}/presentation",
        headers={
            "accept": "application/json",
            "authorization": f"Bearer {PLUSAI_API_TOKEN}",
            "Content-Type": "application/json",
        },
        json={
            "prompt": prompt,
        },
    )

    if request.status_code == 429:
        if retry >= 3:
            raise Exception(
                f"Plus AI API request retries exhausted {request.status_code}: {request.text}"
            )

        delay = backoff_delay * (2**retry)  # Exponential backoff
        print(f"Rate limit exceeded, retrying in {delay} seconds...")
        time.sleep(delay)

        return create_request(prompt, retry + 1, backoff_delay * 2)

    if request.status_code not in [200, 201, 429]:
        raise Exception(
            f"Plus AI API request failed with status code {request.status_code}: {request.text}"
        )

    data = request.json()

    request_id = data["id"]
    polling_url = data["pollingUrl"]

    return request_id, polling_url


def poll_for_result(
    request_id: str, polling_url: str, timeout: int = 300, wait_time: int = 5
) -> str | None:
    start_time = time.time()

    while True:
        time.sleep(wait_time)

        elapsed_time = time.time() - start_time

        if elapsed_time > timeout:
            print(
                f"Polling timed out after {timeout} seconds for request {request_id}."
            )
            return None

        print(f"Polling for result of generation request {request_id} ...")

        result = requests.get(
            polling_url,
            headers={
                "accept": "application/json",
                "authorization": f"Bearer {PLUSAI_API_TOKEN}",
            },
            params={"id": request_id},
        ).json()

        if result["status"] == "GENERATED":
            print(
                f"Generation request {request_id} completed in {time.time() - start_time:.2f} seconds."
            )
            return result["url"]

        elif result["status"] in ["FAILED"]:
            print(f"Generation failed: {result}")
            return None


def generate_presentation(prompt: str) -> str | None:
    request_id, polling_url = create_request(prompt=prompt)
    time.sleep(30)
    pptx_url = poll_for_result(request_id, polling_url)

    if not pptx_url:
        print("No result returned from the generation request.")
        return None

    return pptx_url
```

```
generate_presentation(
    "Create a presentation about the history of the internet."
)
```

### Plus Template IDs

If you would like to use a specific Plus template for your presentation generation you can use the associated template ID in your cURL request.

<details>

<summary>Template IDs</summary>

| Template Name          | Template ID                          |
| ---------------------- | ------------------------------------ |
| Aurora                 | EPX9O042Z6Sv6iQzbuARhS               |
| Blackboard             | ZudB2GVFiv1KzcgdRsbfM8               |
| Brut Brick             | p8pxA5qoot1I2WffVbQFaj               |
| Brut Seascape          | QBtFc6rV16vJpMoiX6vb8l               |
| Brut Tigris            | kOqAdCKG7xojGCT4ZfXSK4               |
| Composition Book       | ZudB2GVFiv1KzcgdRz9FC6               |
| Corporate Blue         | XFzedsfTQ3ccCtO09ZWSav               |
| Editorial              | p8pxA5qoot1I2WffVcrm2D               |
| Feemo                  | OjeLTqC7loN3OmaqHD0qby               |
| Forest Floor           | kOqAdCKG7xojGCT4ZfbYAV               |
| Fred                   | N12Yg407RXsoVq9xji1jA9               |
| Herbert                | N12Yg407RXsoVq9xjoYtXV               |
| Indigo                 | p8pxA5qoot1I2WffVd69nF               |
| Insight                | iG190W6PEa3wEoxBjE7gtz               |
| Insight Bold           | D9fCV9f59UZFiLIMMzUMhy               |
| Insight Modern         | D9fCV9f59UZFiLIMLoUj3k               |
| Kin                    | N12Yg407RXsoVq9xjozV7a               |
| Mallorca               | kqplMC1wKwvcjVhxZGoAQa               |
| Manila                 | nXmZO8Fk1P14FXUEQFD78H               |
| Metro                  | kqplMC1wKwvcjVhxZGqBaa               |
| Minimalist Light       | XFzedsfTQ3ccCtO09a4pZt               |
| Modern Sketchpad       | OjeLTqC7loN3OmaqHMjIIF               |
| Modernist Professional | kqplMC1wKwvcjVhxZGz9ia               |
| Modernist Siena        | XFzedsfTQ3ccCtO09aA7vY               |
| Plus Default           | d1e65e54-753c-4368-946b-ddb430583b0d |
| Potpourri              | 1jelx0KVU9F6jq1WcIQDsD               |
| Simple Notebook        | nXmZO8Fk1P14FXUEQFFZEp               |
| Spiral Notebook        | N12Yg407RXsoVq9xk7LMTR               |
| Swiss Dark             | XFzedsfTQ3ccCtO09aCCgD               |
| Swiss Light            | kqplMC1wKwvcjVhxZHI0qO               |

</details>

Creating presentations via API with your custom branding or custom template is currently available for Enterprise accounts. If you'd like to inquire about Enterprise please contact us at <support@plusdocs.com>.

### Rate Limits and Restrictions

The Presentations API is currently in beta, and has a rate limit of 3 presentation creation requests a minute.
