SDKs & Client Libraries
There is more than one way to call the Prezent Platform API, depending on what you are building:
| You are building… | Use |
|---|---|
| An AI agent (Claude, Cursor, Cline, Continue, Zed, or Claude.ai) | The MCP server — recommended. The API is exposed as agent tools; no HTTP plumbing. |
| A typed client in Python or TypeScript | The official prezent-sdk package (see Official SDKs). |
| A typed client in another language | Generate one from the OpenAPI spec with openapi-generator-cli. |
| Quick manual exploration / testing | The Postman collection. |
| Plain HTTP from any language | Any HTTP library — see Getting Started. |
The API is plain JSON over HTTPS with Bearer authentication, so any HTTP client works out of the box. The options below save you time.
Recommended for agents: the MCP server
The fastest way to let an AI agent drive Prezent is the Model Context Protocol (MCP) server. It wraps the documented REST API so an agent can create and convert presentations as tool calls instead of writing HTTP code.
There are two ways to use it:
-
Hosted remote MCP at
https://mcp.myprezent.com/mcp— OAuth 2.1, no install, works with Claude.ai Custom Connectors. -
Local stdio server, published on PyPI as
prezent-mcp-server(Python 3.10+):pip install prezent-mcp-serverDrop a config snippet into Claude Desktop, Cursor, Cline, Continue, or Zed and the Prezent tools appear in your agent's tool list.
For the full setup (config snippets per client, the available tools, and how authentication works in each mode), see Agents & MCP.
Official SDKs
Prezent publishes official, typed REST clients for Python and
TypeScript / JavaScript. Each is generated from — and versioned
against — this API's OpenAPI spec, so it never drifts from the contract.
Both speak the same conventions documented here: Bearer auth, the
{ "success": true, "data": { … } } envelope, and the callback_id
async polling pattern.
| Language | Install |
|---|---|
| Python | pip install prezent-sdk |
| TypeScript / JavaScript | npm install prezent-sdk |
Pin a version in production. Each API surface is its own class
(ThemesApi, AudiencesApi, AutoGeneratorApi, TemplateConverterApi,
WebhooksApi, FileAccessApi, HealthApi).
Quickstart
Configure once with your base URL + API key, then call any endpoint.
Python
import prezent_sdk
config = prezent_sdk.Configuration(host="https://api.prezent.ai")
config.access_token = "YOUR_API_KEY" # sent as: Authorization: Bearer …
with prezent_sdk.ApiClient(config) as client:
themes = prezent_sdk.ThemesApi(client).list_themes()
print(len(themes.data), "themes") # themes.data is a list
TypeScript
import { Configuration, ThemesApi } from "prezent-sdk";
const config = new Configuration({
basePath: "https://api.prezent.ai",
accessToken: "YOUR_API_KEY",
});
const { data } = await new ThemesApi(config).listThemes();
console.log(`${data.data?.length} themes`);
End-to-end: generate a deck
The full async pattern — start a job, poll the callback_id to a terminal
state, then fetch the result — with typed error handling.
Python
import time
import prezent_sdk
from prezent_sdk import AutoGeneratorApi, AutoGeneratorStartRequest, ApiException
config = prezent_sdk.Configuration(host="https://api.prezent.ai")
config.access_token = "YOUR_API_KEY"
with prezent_sdk.ApiClient(config) as client:
ag = AutoGeneratorApi(client)
try:
# 1. start the job
job = ag.create_autogeneration(AutoGeneratorStartRequest(
prompt="A 5-slide deck on renewable energy",
template_id="your-template-id",
))
callback_id = job.data.callback_id
# 2. poll to a terminal state (2–5s; use jittered backoff in production)
while True:
status = ag.get_autogeneration(callback_id)
if status.data.status in ("success", "failed"):
break
time.sleep(3)
if status.data.status == "failed":
raise RuntimeError("generation failed")
# 3. fetch the result
result = ag.create_autogeneration_download(callback_id)
print("done:", result.data)
except ApiException as e:
# e.status is the HTTP code; the body carries error.code from the
# stable catalog, and 429s include Retry-After.
print(f"API error {e.status}: {e.body}")
TypeScript
import { Configuration, AutoGeneratorApi } from "prezent-sdk";
import { isAxiosError } from "axios";
const config = new Configuration({
basePath: "https://api.prezent.ai",
accessToken: "YOUR_API_KEY",
});
const ag = new AutoGeneratorApi(config);
try {
// 1. start
const start = await ag.createAutogeneration({
prompt: "A 5-slide deck on renewable energy",
template_id: "your-template-id",
});
const callbackId = start.data.data!.callback_id;
// 2. poll to a terminal state
let status;
do {
await new Promise((r) => setTimeout(r, 3000));
status = (await ag.getAutogeneration(callbackId)).data;
} while (status.data?.status !== "success" && status.data?.status !== "failed");
if (status.data?.status === "failed") throw new Error("generation failed");
// 3. download
const result = await ag.createAutogenerationDownload(callbackId);
console.log("done:", result.data);
} catch (e) {
if (isAxiosError(e)) console.error(`API error ${e.response?.status}:`, e.response?.data);
else throw e;
}
Pagination
List endpoints accept opt-in limit/cursor; pass back next_cursor
until it is null.
audiences = prezent_sdk.AudiencesApi(client)
page = audiences.list_audiences(limit=50)
all_items = list(page.data)
while page.next_cursor:
page = audiences.list_audiences(limit=50, cursor=page.next_cursor)
all_items += page.data
The SDKs are versioned to track the OpenAPI contract — pin a version in production. For any other language, generate a client from the same spec (below).
Generate a typed client from the OpenAPI spec
Need a client in a language other than Python or TypeScript? Prezent publishes a complete OpenAPI description of the API. Feed it to OpenAPI Generator to produce a typed client in your language of choice.
Download the OpenAPI document from the API Reference
page (the raw file is at /openapi/openapi.yaml on this docs site), then
generate from your local copy.
Install the generator
npm install -g @openapitools/openapi-generator-cli
(OpenAPI Generator requires a Java runtime; see its install docs for alternatives such as the Homebrew formula or the JAR.)
Generate a Python client
openapi-generator-cli generate \
-i openapi.yaml \
-g python \
-o ./prezent-client-python
Generate a TypeScript client
openapi-generator-cli generate \
-i openapi.yaml \
-g typescript-axios \
-o ./prezent-client-ts
-g selects the generator; OpenAPI Generator ships dozens (java,
go, csharp, php, ruby, and more). Run
openapi-generator-cli list to see them all.
First authenticated call
The generated client speaks the same API documented here: base URL
https://api.prezent.ai, Bearer authentication, and the standard
{ "success": true, "data": { ... } } response envelope. Long-running
endpoints return a callback_id you poll against a status endpoint — see
Async operations.
Using the generated Python client (exact class and method names vary
by generator version — check the generated README.md):
import prezent_client
from prezent_client.rest import ApiException
config = prezent_client.Configuration(host="https://api.prezent.ai")
config.access_token = "YOUR_API_KEY" # sent as: Authorization: Bearer YOUR_API_KEY
with prezent_client.ApiClient(config) as api_client:
api = prezent_client.DefaultApi(api_client)
try:
# Start a presentation generation job
result = api.create_autogenerator({
"prompt": "Generate a presentation on AI trends",
"template_id": "your-template-id",
})
print(result.data.callback_id)
except ApiException as e:
print("API error:", e)
If you would rather not generate a full client, every snippet in Getting Started is a working raw-HTTP example in cURL, Node.js, and Python.
Postman collection
A ready-made Postman collection is available so you can try every documented endpoint without writing code. It is configured for Bearer authentication and includes the AutoGenerator and SCIM User Management endpoints.
- Download the collection: Prezent Platform API Collection.
- In Postman, choose Import and select the downloaded file.
- Set the collection variables:
baseUrl—https://api.prezent.aifor production (or a non-production host).apiKey— your Prezent API key. The collection is pre-wired to send it asAuthorization: Bearer {{apiKey}}.
- Send the Create Presentation request, copy the returned
callback_id, and use it in the status request to poll for the result.
Which option should I use?
| If you want… | Use | Why |
|---|---|---|
| An agent to call Prezent with zero HTTP code | MCP server | Tools, auth, and polling are handled for you. |
| A typed client in Python or TypeScript | prezent-sdk | Official, spec-synced SDK — pip install / npm install. |
| A typed client in another language | OpenAPI Generator | Generate from the same spec the SDKs are built from. |
| To poke at endpoints by hand | Postman collection | Pre-wired auth and example requests. |
| Maximum control | Raw HTTP | Plain JSON + Bearer; works in any language. |
Where to go next
- Agents & MCP — the recommended path for AI agents, with per-client setup.
- Getting Started — authenticate and make your first raw-HTTP call.
- API Reference — the interactive endpoint reference, plus the raw OpenAPI YAML.
- Developer Guide — rate limits, error codes, and async patterns that apply to every client.