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

# Generate presentations with the API

> Start with one prompt, then progress through files, design modes, templates, structured JSON, AI agents, and background jobs.

<div className="api-flow-hero">
  <p className="api-flow-eyebrow">PRESENTON API GUIDE</p>
  <h2>From one prompt to a polished presentation.</h2>

  <p>
    Start simple, then add files, design systems, structured slide data,
    agents, and background jobs using the deployment that fits your stack.
  </p>

  <div className="api-flow-products" aria-label="Available Presenton deployments">
    <div className="api-flow-product">
      <p className="api-flow-product-name">Cloud</p>
      <p className="api-flow-product-meta">Managed API · v3</p>
    </div>

    <div className="api-flow-product">
      <p className="api-flow-product-name">Open Source</p>
      <p className="api-flow-product-meta">Self-hosted API · v1</p>
    </div>
  </div>
</div>

<Tabs>
  <Tab title="Cloud">
    <Note>
      These workflows use the Presenton Cloud API v3. Keep uploaded file
      values, template IDs, task IDs, and presentation IDs in the same Cloud
      account that created them.
    </Note>

    ## Before you begin

    Create a Cloud API key and send it as a bearer token with every request:

    ```http theme={null}
    Authorization: Bearer YOUR_API_KEY
    ```

    The response from a completed generation request contains:

    ```json theme={null}
    {
      "presentation_id": "8f29a2e7-4f26-48d2-9d1d-9b0716909a6d",
      "path": "https://example.com/generated-presentation.pptx",
      "edit_path": "https://presenton.ai/presentation?id=8f29a2e7-4f26-48d2-9d1d-9b0716909a6d",
      "credits_consumed": 7
    }
    ```

    Use `path` for the generated file and `edit_path` when a person should review
    or refine the deck in Presenton.

    ## 1. Generate a presentation directly

    Use direct generation when the prompt contains all the context Presenton needs.
    The synchronous endpoint keeps the connection open until generation finishes.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/enterprise-01-direct-generation-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=6a6e366dbdd926e719d49326df8d45a8" alt="Four labeled steps showing a prompt sent to the Presenton API, generated, and returned as an editable presentation" width="1600" height="900" data-path="images/api-flows/enterprise-01-direct-generation-animated.webp" />

      <p>Direct generation turns one prompt into an editable presentation and exported PPTX.</p>
    </div>

    Send only the presentation content. Presenton uses the endpoint defaults for
    the slide count, language, design, title slide, and PPTX export.

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/generate \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create a seven-slide customer-facing launch deck for Atlas Analytics. The audience is enterprise operations leaders. Cover the problem, new capabilities, proof points, rollout plan, security, and next steps. Use concise executive language and do not invent customer metrics."
      }'
    ```

    Read the exact request and response schemas in
    [Generate a presentation synchronously](../api-reference/v3-presentation/generate-a-presentation-synchronously).

    ## 2. Generate from uploaded files

    Use this workflow when the presentation must be grounded in reports,
    spreadsheets, PDFs, or other supported source files.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/enterprise-02-file-grounded-generation-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=2a3e788ae7bf75f8c7448ba1cee961f8" alt="Five labeled steps showing source files uploaded, saved as file values, and used to generate a grounded presentation" width="1600" height="900" data-path="images/api-flows/enterprise-02-file-grounded-generation-animated.webp" />

      <p>Upload the sources once, then pass their returned file values into generation.</p>
    </div>

    ### Upload the files

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/files/upload \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --form "files=@./quarterly-report.pdf" \
      --form "files=@./customer-metrics.xlsx"
    ```

    The upload response is an array of file values:

    ```json theme={null}
    [
      "uploads/quarterly-report-a19f.pdf",
      "uploads/customer-metrics-52b1.xlsx"
    ]
    ```

    ### Generate from those values

    Pass the array back in `files`. Use `content` to tell Presenton what the deck
    should accomplish with the source material.

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/generate \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "files": [
          "uploads/quarterly-report-a19f.pdf",
          "uploads/customer-metrics-52b1.xlsx"
        ],
        "content": "Create an executive quarterly review. Prioritize revenue, retention, customer risks, and next-quarter actions. Preserve every reported figure exactly."
      }'
    ```

    See [Upload source files](../api-reference/v3-files/upload-source-files) and
    [Generate a presentation synchronously](../api-reference/v3-presentation/generate-a-presentation-synchronously).

    ## 3. Generate in Standard or Smart mode

    Choose one design mode for each request. Send `standard_template` for Standard
    mode or `smart_design` for Smart mode. Do not send both fields together.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/enterprise-03-design-modes-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=387f09c6eed93e9fe85e861d58722d6a" alt="A labeled decision diagram comparing Standard mode reusable layouts with Smart mode adaptive composition" width="1600" height="900" data-path="images/api-flows/enterprise-03-design-modes-animated.webp" />

      <p>Standard and Smart are alternative design paths for the same generation request.</p>
    </div>

    ### Standard mode

    Standard mode uses a template with reusable, schema-backed layouts.

    ```bash theme={null}
    curl --request GET \
      --url https://api.presenton.ai/api/v3/standard-template/all \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```

    Choose an `id` from the response and generate:

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/generate \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create a six-slide partner enablement presentation for a new analytics product.",
        "standard_template": "neo-modern"
      }'
    ```

    ### Smart mode

    Smart mode uses a Smart Design that composes each slide around its content.

    ```bash theme={null}
    curl --request GET \
      --url https://api.presenton.ai/api/v3/smart-design/all \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```

    Choose an `id` from the response and generate:

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/generate \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create a six-slide partner enablement presentation for a new analytics product.",
        "smart_design": "REPLACE_WITH_SMART_DESIGN_ID"
      }'
    ```

    See [List Standard templates](../api-reference/v3-standard-template/list-standard-templates)
    and [List Smart Designs](../api-reference/v3-smart-design/list-smart-designs).

    ## 4. Import a PPTX template and generate

    Importing a PPTX template happens in Presenton Template Studio. Cloud v3
    does not expose a public PPTX-template import endpoint. After the template is
    saved, the generation workflow uses the public API.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/enterprise-04-pptx-template-import-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=3e9c783efb198bea97885ffe908fa44f" alt="Five labeled steps showing a filled PPTX imported in Template Studio, saved as a template, and used through the API" width="1600" height="900" data-path="images/api-flows/enterprise-04-pptx-template-import-animated.webp" />

      <p>Template Studio converts a branded PPTX into a reusable template for API generation.</p>
    </div>

    1. Import the filled PPTX in Template Studio, resolve missing fonts, review the
       detected layouts, and save the template. Follow
       [Create a template from PPTX](../user-guide/branding-and-design/templates).
    2. List the account's Standard templates and find the saved template ID.
    3. Send that ID as `standard_template` in the synchronous generation request.

    ```bash theme={null}
    curl --request GET \
      --url https://api.presenton.ai/api/v3/standard-template/all \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/generate \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create a seven-slide annual strategy presentation for the leadership offsite.",
        "standard_template": "REPLACE_WITH_IMPORTED_TEMPLATE_ID"
      }'
    ```

    ## 5. Create from structured JSON

    Use structured JSON when your application already owns the narrative and slide
    data. Presenton applies the chosen layouts and renders the presentation without
    planning the story from a prompt.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/enterprise-05-structured-json-wide-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=3a5f895c83a7f20c7c641c60c257e3e2" alt="Six labeled steps showing template selection, schema inspection, slide JSON construction, validation, and rendering" width="1600" height="900" data-path="images/api-flows/enterprise-05-structured-json-wide-animated.webp" />

      <p>The live template schema is the contract between your slide data and the renderer.</p>
    </div>

    1. Call [List Standard templates](../api-reference/v3-standard-template/list-standard-templates)
       and choose a template ID.
    2. Call [Get a Standard template](../api-reference/v3-standard-template/get-a-standard-template)
       and read the `id` and `json_schema` for each layout.
    3. Build each slide with a `layout` from that template and a `content` object
       that satisfies the selected layout schema.
    4. Send the validated slides to
       [Create from JSON synchronously](../api-reference/v3-presentation/create-from-json-synchronously).

    ```bash theme={null}
    curl --request GET \
      --url https://api.presenton.ai/api/v3/standard-template/neo-modern \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/from-json \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "standard_template": "neo-modern",
        "slides": [
          {
            "layout": "REPLACE_WITH_LAYOUT_ID",
            "content": {
              "title": "Q2 customer health",
              "bullets": [
                "Enterprise retention remained above target",
                "Time to first value improved",
                "Support response time needs attention"
              ]
            }
          }
        ]
      }'
    ```

    The property names inside `content` are examples. Always use the live
    `json_schema` returned for the selected layout.

    ## 6. Generate with your own AI agent

    This workflow gives your agent control over slide selection and content while
    Presenton remains responsible for template rendering and export.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/enterprise-06-ai-agent-wide-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=ffd85d1a9e61836b08bf7a13a280cbaf" alt="Six labeled steps showing template contracts and source content sent to an AI agent, validated, and rendered by Presenton" width="1600" height="900" data-path="images/api-flows/enterprise-06-ai-agent-wide-animated.webp" />

      <p>Your agent writes slide JSON; your application validates it before Presenton renders the deck.</p>
    </div>

    ### Give the agent the template contract

    1. Call [List Standard templates](../api-reference/v3-standard-template/list-standard-templates)
       so the user can choose a template.
    2. Call [Get a Standard template](../api-reference/v3-standard-template/get-a-standard-template)
       to retrieve every layout ID and its `json_schema`.
    3. Call [Get a template example](../api-reference/v3-standard-template/get-a-template-example)
       to retrieve representative `layout` and `content` pairs.
    4. Give the schemas, examples, user content, and presentation goal to your AI
       agent.
    5. Validate the agent response against the live schemas in your application.
    6. Send the validated result to
       [Create from JSON synchronously](../api-reference/v3-presentation/create-from-json-synchronously).

    ```bash theme={null}
    curl --request GET \
      --url https://api.presenton.ai/api/v3/standard-template/neo-modern \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```

    ```bash theme={null}
    curl --request GET \
      --url https://api.presenton.ai/api/v3/standard-template/neo-modern/example \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```

    ### Agent instruction

    Use an instruction like this with the AI provider in your application:

    ```text theme={null}
    You create structured slide content for Presenton.

    Build a coherent presentation for the user's goal using only the supplied
    template layouts. For every slide:
    - select one supplied layout ID;
    - return a content object that satisfies that layout's JSON Schema;
    - follow the supplied template examples for content density and structure;
    - preserve all facts, names, dates, and figures from the user material;
    - do not invent fields that are not allowed by the schema.

    Return JSON only in this shape:
    {
      "standard_template": "<selected template id>",
      "slides": [
        {
          "layout": "<layout id>",
          "content": {}
        }
      ]
    }
    ```

    Treat agent output as untrusted input. Reject unknown layouts, validate each
    `content` object, enforce slide and string limits, and only then call
    `POST /presentation/from-json`.

    ## 7. Run background jobs with async APIs and webhooks

    Use background processing when generation should not hold an interactive HTTP
    request open. Presenton returns a task ID immediately and completes the work in
    the background.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/enterprise-07-async-webhooks-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=cd7ad464cdac6a1db4f2a97940d0bd3a" alt="A labeled async workflow showing task creation followed by polling or webhook delivery and a completed presentation" width="1600" height="900" data-path="images/api-flows/enterprise-07-async-webhooks-animated.webp" />

      <p>Start one background job, then resolve it through polling or webhook delivery.</p>
    </div>

    ### Poll for completion

    Use polling when your application does not expose a public callback URL.

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/generate/async \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create an eight-slide executive briefing about the rollout of a new customer analytics platform."
      }'
    ```

    Store the returned `id`, then poll with a capped delay until `status` becomes
    `completed` or `error`:

    ```bash theme={null}
    curl --request GET \
      --url https://api.presenton.ai/api/v3/async-task/status/REPLACE_WITH_TASK_ID \
      --header "Authorization: Bearer YOUR_API_KEY"
    ```

    ### Receive completion through a webhook

    Use webhook delivery when your application has a stable HTTPS receiver.
    Subscribe each event your receiver needs, then enable delivery on the async
    generation request.

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/webhook/subscribe \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "url": "https://app.example.com/webhooks/presenton",
        "secret": "REPLACE_WITH_A_RANDOM_SECRET",
        "event": "presentation.generation.completed"
      }'
    ```

    ```bash theme={null}
    curl --request POST \
      --url https://api.presenton.ai/api/v3/presentation/generate/async \
      --header "Authorization: Bearer YOUR_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create an eight-slide executive briefing about the rollout of a new customer analytics platform.",
        "trigger_webhook": true
      }'
    ```

    Subscribe `presentation.generation.failed` to receive failed jobs as well.
    Verify the webhook secret, acknowledge delivery quickly, and process repeated
    events idempotently.

    See [Generate a presentation asynchronously](../api-reference/v3-presentation/generate-a-presentation-asynchronously),
    [Get task status](../api-reference/v3-async-task/get-task-status), and
    [Subscribe a webhook](../api-reference/v3-webhook/subscribe-a-webhook).

    <div className="api-flow-finish">
      <p>Start at Flow 1 and stop when the workflow matches your product.</p>
      <span>Prompt → sources → design → structure → agents → background jobs</span>
    </div>
  </Tab>

  <Tab title="Open Source">
    <Note>
      These workflows use the self-hosted API v1 at
      `http://localhost:5001/api/v1`. Replace the origin with your deployment and
      keep every file path, template name, task ID, and presentation ID on that
      instance.
    </Note>

    ## Before you begin

    Start Presenton, configure the required AI providers, and have the primary
    administrator generate a Presenton API key. Store the instance URL and key outside your source code:

    ```bash theme={null}
    export PRESENTON_URL=http://localhost:5001
    export PRESENTON_API_KEY=sk-presenton-REPLACE_WITH_YOUR_KEY
    ```

    Send the API key as `Authorization: Bearer $PRESENTON_API_KEY`.

    ## 1. Generate a presentation directly

    The synchronous v1 endpoint waits for generation and export to finish before
    returning the presentation result.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/open-source-01-direct-generation-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=a5f689fd89c4db962f55df2a2c0362ea" alt="Five labeled steps showing direct presentation generation on a self-hosted Presenton instance" width="1600" height="900" data-path="images/api-flows/open-source-01-direct-generation-animated.webp" />

      <p>Your configured instance turns one prompt into an editable presentation.</p>
    </div>

    `content` is the only required request field. The instance uses its configured
    defaults for slide count, language, template, title slide, and PPTX export.

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/ppt/presentation/generate" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create a seven-slide customer-facing launch deck for Atlas Analytics. The audience is enterprise operations leaders. Cover the problem, new capabilities, proof points, rollout plan, security, and next steps. Use concise executive language and do not invent customer metrics."
      }'
    ```

    See [Generate a presentation synchronously](../api-reference/presentation/generate-a-presentation-synchronously).

    ## 2. Generate from uploaded files

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/open-source-02-file-grounded-generation-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=903b58833b86c305af42bf2fd9bd13fd" alt="Five labeled steps showing source files uploaded to an instance and their returned paths used for generation" width="1600" height="900" data-path="images/api-flows/open-source-02-file-grounded-generation-animated.webp" />

      <p>Keep the returned file paths on the same instance that performs generation.</p>
    </div>

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/ppt/files/upload" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --form "files=@./quarterly-report.pdf"
    ```

    Pass the returned path in `files`:

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/ppt/presentation/generate" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create an executive quarterly review from the uploaded report. Preserve every reported figure exactly.",
        "files": ["REPLACE_WITH_RETURNED_FILE_PATH"]
      }'
    ```

    See [Upload source files](../api-reference/files/upload-source-files).

    ## 3. Generate with an installed template

    Open Source v1 supports Standard generation with installed templates. It does
    not expose Cloud Smart Designs or a public template-list endpoint.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/open-source-03-installed-template-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=c6f94d515e511b30fd177fff9670d2ec" alt="Five labeled steps showing an installed template name added to an Open Source generation request" width="1600" height="900" data-path="images/api-flows/open-source-03-installed-template-animated.webp" />

      <p>Use the installed template name configured on your own Presenton instance.</p>
    </div>

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/ppt/presentation/generate" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create a six-slide partner enablement presentation for a new analytics product.",
        "template": "general"
      }'
    ```

    <Info>
      Smart mode and `smart_design` belong to Presenton Cloud. Open Source
      uses the installed template named in `template`.
    </Info>

    ## 4. Import a PPTX template and generate

    Template import happens in the Presenton interface. After validating fonts,
    layouts, and representative content, use the saved template name in v1
    generation requests.

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/open-source-04-pptx-template-import-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=c25c063807aacb57e57705288464dfe2" alt="Five labeled steps showing a PPTX imported on a self-hosted instance, saved as an installed template, and used for generation" width="1600" height="900" data-path="images/api-flows/open-source-04-pptx-template-import-animated.webp" />

      <p>Import in the interface, then use the saved template name in API requests.</p>
    </div>

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/ppt/presentation/generate" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create a seven-slide annual strategy presentation for the leadership offsite.",
        "template": "REPLACE_WITH_IMPORTED_TEMPLATE_NAME"
      }'
    ```

    Follow [Create a template from PPTX](../user-guide/branding-and-design/templates)
    for the import workflow.

    ## 5. Run background jobs with async APIs and webhooks

    <div className="api-flow-visual">
      <img src="https://mintcdn.com/presenton-521d9e2f/at0fMZFzkP-vbjoy/images/api-flows/open-source-05-async-webhooks-animated.webp?fit=max&auto=format&n=at0fMZFzkP-vbjoy&q=85&s=87a35db1bcb3203c8179d9b15e094e1f" alt="A labeled self-hosted async workflow showing task creation, polling or webhook delivery, and a completed presentation" width="1600" height="900" data-path="images/api-flows/open-source-05-async-webhooks-animated.webp" />

      <p>Queue work on your instance and finish through polling or webhook delivery.</p>
    </div>

    ### Poll for completion

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/ppt/presentation/generate/async" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create an eight-slide executive briefing about the rollout of a new customer analytics platform."
      }'
    ```

    ```bash theme={null}
    curl --request GET \
      --url "$PRESENTON_URL/api/v1/ppt/presentation/status/REPLACE_WITH_TASK_ID" \
      --header "Authorization: Bearer $PRESENTON_API_KEY"
    ```

    ### Receive a webhook

    Subscribe the instance, then set `trigger_webhook` to `true` in the async
    generation request.

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/webhook/subscribe" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "url": "https://app.example.com/webhooks/presenton",
        "secret": "REPLACE_WITH_A_RANDOM_SECRET",
        "event": "presentation.generation.completed"
      }'
    ```

    ```bash theme={null}
    curl --request POST \
      --url "$PRESENTON_URL/api/v1/ppt/presentation/generate/async" \
      --header "Authorization: Bearer $PRESENTON_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "content": "Create an eight-slide executive briefing about the rollout of a new customer analytics platform.",
        "trigger_webhook": true
      }'
    ```

    See [Generate asynchronously](../api-reference/presentation/generate-a-presentation-asynchronously),
    [Get generation status](../api-reference/presentation/get-generation-status),
    and [Subscribe a webhook](../api-reference/webhook/subscribe-a-webhook).

    <div className="api-flow-finish">
      <p>Use the Open Source tab for APIs hosted by your own Presenton instance.</p>
      <span>Prompt → sources → installed template → background jobs</span>
    </div>
  </Tab>
</Tabs>
