Use asynchronous generation for production jobs that should not depend on one long-running HTTP connection.
Before you begin
Create an API key in your Presenton account and store it in a secret manager. Send it with every request:Generate from a prompt
Send a JSON body toPOST /presentation/generate:
Choose the input
The generation request supports three useful input patterns:
For file input, upload the documents first and pass the returned file values in
files. See Generate from documents.
For more control over the story, generate an outline before creating the presentation:
slides:
Configure the result
Use one presentation design mode per request: select a
standard_template for schema-backed standard layouts or a smart_design for Smart composition.
Handle the response
A successful request returns this shape:- Store
presentation_idas the stable identifier for later operations. - Use
pathto retrieve the generated export. - Send a user to
edit_pathwhen they should review or refine the deck in Presenton Cloud. - Record
credits_consumedfor internal usage reporting when needed.
Export again after editing
If a user edits the presentation after generation, export the current version withPOST /presentation/export:
Recommended flow
- Validate the prompt, slide count, and uploaded files in your application.
- Generate and review an outline when narrative control matters.
- Select a standard template or Smart design and an optional theme.
- Submit the synchronous or asynchronous generation request.
- Store the returned presentation and task identifiers.
- Let a user review the result at
edit_pathwhen the workflow includes approval. - Export the reviewed version and verify the downloaded file.
Handle failures
- Treat every non-2xx response as a failed request and log its response body with secrets removed.
- A
422response means the payload does not satisfy the request schema; inspect the validation details before retrying. - Do not retry authentication or validation failures without changing the request.
- Retry transient network or server failures with a bounded backoff and an application-level timeout.
- Never log the
Authorizationheader or expose the API key in client-side code.
Generate asynchronously
Queue long-running generation and monitor its task status.
Templates and themes
Discover valid design resources and apply them safely.