AI Builder API
The AI Builder API turns a natural-language prompt into a Prezent-quality deck, lets you revise it by describing the change you want, and hands you the finished file.
All three operations stream. You start the work, then read Server-Sent Events for progress and the result — there is no status endpoint to poll.
Full schemas and per-field documentation live in the interactive API Reference.
The AI Builder API changed substantially in 2.0 — polling became streaming, and the many editing endpoints collapsed into one. See What changed from 1.0 below. The 1.0 API is unchanged and still served; its docs are under version 1.0.
Authentication
All endpoints require a Bearer token:
Authorization: Bearer YOUR_API_KEY
See Getting Started → Authentication for details.
Endpoint summary
| Method | Path | Description |
|---|---|---|
POST | /api/v2/generate | Generate a presentation |
POST | /api/v2/autogenerator/edit | Revise a presentation |
POST | /api/v2/autogenerator/download | Download the file |
POST | /api/v2/streams/sessions | Get a stream URL for a callback_id |
GET | /api/v2/autogenerator/status | Get a turn's status (polling alternative) |
POST | /api/v2/autogenerator/feedback | Like or dislike a turn |
GET | /api/v1/autogenerator/templates | List available templates |
GET | /api/v2/autogenerator/languages | List supported languages |
GET | /api/v2/autogenerator/skills | List available skills |
GET | /api/v2/integrations | List your apps |
POST | /api/v2/integrations/auth | Connect or disconnect an app |
GET | /api/v2/integrations/auth/status | Check an app's connection |
GET /api/v1/autogenerator/templates keeps its v1 path — it is
unchanged in 2.0 and there is no v2 equivalent.
How the streaming flow works
Generate and edit both follow the same three steps:
1. POST /api/v2/generate → { resData: { callback_id } }
2. POST /api/v2/streams/sessions → { data: { stream_url } }
with that callback_id
3. open stream_url (SSE) → progress events…
terminal event + download_url
Download is two steps, not three —
POST /api/v2/autogenerator/download returns a stream_url directly,
so it skips step 2.
The event contract
Every event on a v2 stream has the same shape, so one parser handles the whole stream:
event: status
data: {"status":"inprogress","message":"Analyzing the key elements","callback_id":"3f8e7d61-…"}
| Field | Notes |
|---|---|
status | inprogress while working; then one of success, failed, cancelled |
message | Human-readable step description — safe to show a user verbatim |
callback_id | The generation or edit turn this event belongs to |
download_url | Only on a success event. May be null on a generation stream if the file has not been exported yet |
The stream closes after the terminal event. Branch on status rather
than on the SSE event: name — it carries the same information and is
simpler.
Progress messages are drawn from a fixed set, in order:
- Understanding your prompt
- Checking for app references — only when the prompt references a connected app
- Analyzing the key elements
- Adjusting structure for clarity
- Optimizing spacing and alignment
- Crafting your speaker notes — only when notes were requested
- Finalizing your slides
Steps that do not apply are skipped, so do not treat this as a fixed-length progress bar.
Reconnection, timeouts, and full client code are in Streaming (SSE).
Response envelopes
Errors use the canonical envelope on every endpoint:
{ "success": false, "data": null, "error": { "code": "...", "message": "..." } }
Success shapes are not uniform — each endpoint documents its own:
| Endpoint | Success shape |
|---|---|
POST /api/v2/generate | { message, resData, error } |
POST /api/v2/autogenerator/edit | { message, resData, error } |
POST /api/v2/autogenerator/download | flat top-level fields |
POST /api/v2/streams/sessions | { success, data } |
POST /api/v2/autogenerator/feedback | { message, resData, error } |
GET /api/v2/autogenerator/languages | { status, message, data } |
GET /api/v2/autogenerator/skills | { status, log, data } |
GET /api/v1/autogenerator/templates | { success, data } |
GET /api/v2/integrations | { mcps, count } |
POST /api/v2/integrations/auth | depends on the app — see the endpoint |
See Developer Guide → Error codes for the full code catalog.
POST /api/v2/generate — Generate a presentation
Starts a generation and returns a callback_id. Nothing else — the deck
arrives over the stream.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | yes | What to generate, in plain language. |
template_id | string | no | Brand template to apply. Takes precedence over settings.template_id; falls back to your key's configured template. |
audience_id | string | no | Audience profile to tailor tone and detail to. See Audiences. Rejected with 422 when settings.ignore_audience is true. |
skill_id | string | no | Skill to generate with — a skill_id from /api/v2/autogenerator/skills. A skill that is not available to you is rejected with 422. |
files | array | no | [{ "file_id": "…" }] — files to ground the deck in. Upload first via POST /api/v1/preprocess, then call POST /api/v1/validate and pass the file_id it returns. |
web_links | array | no | URLs for the generator to read. |
text | string | no | A block of text as source material. |
websearch | boolean | no | Let the generator search the web. Takes precedence over settings.websearch. Default false. |
externalContext | boolean | no | Alias for websearch. |
settings | object | no | Generation settings — see below. |
Be specific in the prompt. "A 10-slide deck on renewable-energy market trends for a board audience" produces a better result than "renewable energy".
Settings
Every key in settings is optional. An omitted key falls back to
the default configured on your API key, then to the documented default —
so a fully configured key needs no settings object at all.
| Key | Type | Accepted values / default |
|---|---|---|
template_id | string | Any template you can access. Root template_id wins. |
language | string | A locale from /api/v2/autogenerator/languages. Default en. |
websearch | boolean | Default false. Also settable at the root of the request, which takes precedence. |
add_sources_to_footer | boolean | Default false. |
add_sources_to_slides_note | boolean | Default false. Takes precedence over add_speaker_notes_to_slides_note. |
generate_speaker_notes | boolean | Default false. |
add_speaker_notes_to_slides_note | boolean | Default false. Ignored when add_sources_to_slides_note is enabled. |
image_library | object | { brand_library, prezent_library, ai_images, my_workspace, additional_context }, each a boolean. Omitted keys default to false, except ai_images, which defaults to true when image_library itself is omitted. company_library and brand_library are the same library — set brand_library. |
voice_settings | object | { "type": "standard" } — brand-voice profile. |
deck_default_size | integer | 1–200, default 7. The prompt can override it. |
deck_max_size | integer | 1–200, default 100. Must be ≥ deck_default_size. |
export_type | string | pptx or pdf. Default pptx. |
enable_mcp_context | boolean | Default false. Pull context from connected apps. |
preserve_text | boolean | Default false. Use the text you supply (prompt, text, files) exactly as written — no rewording, and no facts, figures, web content or made-up sources added. Thin input makes a short deck. |
ignore_audience | boolean | Default false. Generate with no audience — not your own profile, and not one named in the prompt. Cannot be combined with audience_id (422). |
preserve_text and ignore_audience are not stored on your API key — send
them on the request. Once set, both stay in effect for later
edits of the same deck.
Example
- cURL
- Python
- Node.js
curl -X POST https://api.prezent.ai/api/v2/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A 10-slide deck on renewable-energy market trends for 2026",
"template_id": "your-template-id",
"settings": {
"language": "en",
"websearch": true,
"generate_speaker_notes": true
}
}'
import requests
resp = requests.post(
"https://api.prezent.ai/api/v2/generate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"prompt": "A 10-slide deck on renewable-energy market trends for 2026",
"template_id": "your-template-id",
"settings": {
"language": "en",
"websearch": True,
"generate_speaker_notes": True,
},
},
)
resp.raise_for_status()
callback_id = resp.json()["resData"]["callback_id"]
const res = await fetch('https://api.prezent.ai/api/v2/generate', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: 'A 10-slide deck on renewable-energy market trends for 2026',
template_id: 'your-template-id',
settings: { language: 'en', websearch: true, generate_speaker_notes: true },
}),
});
const { resData } = await res.json();
const callbackId = resData.callback_id;
Success response (200)
{
"message": "Job submitted successfully",
"resData": {
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91"
},
"error": null
}
The payload is under resData, not data.
callback_id is valid for about 3 hours and is what you pass to
streams, edit, and download.
Validation errors (422)
Field-level failures return INVALID_INPUT with error.details as an
array of messages, one per failed field:
{
"success": false,
"data": null,
"error": {
"code": "INVALID_INPUT",
"message": "The request contains invalid input.",
"details": [
"prompt is required",
"settings.language: 'xx' is not a supported language locale"
]
}
}
POST /api/v2/autogenerator/edit — Revise a presentation
Applies a natural-language edit. One endpoint replaces 1.0's
regenerate, node-change, and slide-actions — describe the change
instead of choosing an operation.
Edits are conversational: each builds on the last. Pass the
callback_id of the most recent turn, and use the new id you get
back for the next edit.
A slide can only be addressed once the deck size is known, so editing a
callback_id that is still generating returns 400. Wait for the
stream's terminal event first.
Only one turn runs at a time — if a previous edit is still in flight,
the request is rejected with that reason in error.message.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
callback_id | string | yes | The presentation to edit — the id of the original generation, or of the most recent edit. |
prompt | string | yes, unless action_type is sent | The change to make, in plain language. |
slideIndex | integer | no | Which slide to edit, counting from 0. Omit to edit the whole deck. |
action_type | string | no | Apply a specific change with an exact value instead of a prompt — see Actions. |
value | string | integer | object | with action_type | The exact value for the action. |
files | array | no | [{ "file_id": "…" }] — context for this edit. |
web_links | array | no | URLs to read as context. |
text | string | no | A block of text as context. |
slideIndex is validated against the actual deck — a value past the
last slide returns 400 reporting the real slide count.
Actions
Any of these changes can be asked for in a prompt. When you already
know the exact value, send action_type and value instead, and the
change is applied as given.
action_type | value | slideIndex |
|---|---|---|
node_change | Integer 1–10 — the new number of nodes in the slide's infographic. | required |
audience_change | An audience id from GET /api/v1/audiences. Re-tailors the whole deck. | not used |
template_change | A template code from GET /api/v1/autogenerator/templates. Re-themes the whole deck. | not used |
voice_change | A voice object — see Voice. Rewrites the whole deck in that voice. | not used |
generate_sources | { "add_sources_to_footer": boolean, "add_sources_to_slides_note": boolean } — see Sources. Recreates the slides with citations. | optional |
With action_type, do not send prompt, files, web_links, or
text — they are rejected with 400. A value that cannot be applied
(an unknown audience, an unavailable template, a slide without an
infographic, the node count it already has, or a brand voice that is not
available) is also rejected with 400.
Voice
voice_change takes the same shape as the voice_settings generate
setting:
value | Meaning |
|---|---|
{ "type": "standard" } | The standard voice. |
{ "type": "brand" } | Your company's brand voice. Rejected with 400 when neither your company nor the deck's template has one. |
{ "type": "custom", "details": { "tone": "…", "emotion": "…" } } | A specific tone and emotion. Both are required. |
For a custom voice, tone is one of neutral, factual, or
implicative, and emotion is one of optimistic, uplifting,
assertive, persuasive, or cooperative.
Sources
generate_sources recreates the slides with citations and sets where
those citations appear. Both flags are required:
| Key | Type | Description |
|---|---|---|
add_sources_to_footer | boolean | Cite sources in each slide's footer. |
add_sources_to_slides_note | boolean | Cite sources in each slide's notes. Replaces speaker notes in the slide notes, as in Settings. |
Omit slideIndex to recreate the whole deck, or supply it to target one
slide. The chosen display carries over to every later edit of the
presentation until another generate_sources changes it.
Example
# Edit the whole deck
curl -X POST https://api.prezent.ai/api/v2/autogenerator/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"prompt": "Make the tone more formal and shorten every bullet"
}'
# Edit slide 5 (index 4)
curl -X POST https://api.prezent.ai/api/v2/autogenerator/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"prompt": "Replace the chart with a comparison table",
"slideIndex": 4
}'
# Set slide 3's infographic to 5 nodes
curl -X POST https://api.prezent.ai/api/v2/autogenerator/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"action_type": "node_change",
"value": 5,
"slideIndex": 2
}'
# Switch the whole deck to another template
curl -X POST https://api.prezent.ai/api/v2/autogenerator/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"action_type": "template_change",
"value": "CORP24"
}'
# Rewrite the whole deck in a custom voice
curl -X POST https://api.prezent.ai/api/v2/autogenerator/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"action_type": "voice_change",
"value": { "type": "custom", "details": { "tone": "factual", "emotion": "assertive" } }
}'
# Recreate the deck with sources cited in the footer
curl -X POST https://api.prezent.ai/api/v2/autogenerator/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"action_type": "generate_sources",
"value": { "add_sources_to_footer": true, "add_sources_to_slides_note": false }
}'
Success response (200)
{
"message": "Edit submitted successfully",
"resData": {
"callback_id": "8c1d4b92-6f37-4e2a-a95c-1b0e7d3f6a48"
},
"error": null
}
This callback_id is new — not the one you sent. Stream it to watch
the edit, and pass it as the callback_id of your next edit to keep
building on this version.
POST /api/v2/autogenerator/download — Download the file
Returns a stream_url directly — no /streams/sessions step. Open
it and read the terminal event for the download_url.
A stream rather than an inline URL because the file may not exist yet:
| Case | What you see |
|---|---|
| Already exported in this format | terminal event immediately, with the download_url |
| Needs exporting | progress events, then the terminal event with the new URL |
An export can take several minutes — far longer than an HTTP response allows — which is why both cases are delivered the same way.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
callback_id | string | yes | The presentation to download. |
export_type | string | no | pptx or pdf. Defaults to your key's configured format, then pptx. |
Example
curl -X POST https://api.prezent.ai/api/v2/autogenerator/download \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"export_type": "pptx"
}'
Success response (200)
{
"message": "Connect to stream_url to receive the download URL on the done event",
"status": "success",
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"export_type": "pptx",
"stream_url": "https://stream-api-prod.myprezent.com/v2/streams/a1b2c3?token=eyJhbGciOi...&turn_id=3f8e7d61&stream_type=export&export_type=pptx",
"expires_at": "2026-08-05T12:34:56.000Z"
}
Fields are at the top level, not under data.
status: "success" confirms the stream was minted — it does not
mean the file is ready. Read the stream's terminal event for that.
stream_url expires at expires_at (about 5 minutes). Call the
endpoint again for a fresh one.
Quota (429)
Download quota is checked before the stream is minted, so a key without room never receives a URL it cannot redeem:
{
"success": false,
"data": null,
"error": {
"code": "USAGE_LIMIT_EXCEEDED",
"message": "Usage limit exceeded.",
"details": "This presentation has 12 slide(s), but only 5 download slide(s) remain on your plan (limit 50000)."
}
}
POST /api/v2/streams/sessions — Get a stream URL
Exchanges a callback_id from generate or edit for an authenticated SSE
URL.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
callback_id | string | yes | The id from generate or edit. |
Example
curl -X POST https://api.prezent.ai/api/v2/streams/sessions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91" }'
Success response (201)
{
"success": true,
"data": {
"callback_id": "3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91",
"stream_url": "https://stream-api-prod.myprezent.com/v2/streams/a1b2c3?token=eyJhbGciOi...&turn_id=3f8e7d61",
"expires_at": "2026-08-05T12:34:56.000Z"
}
}
The token is in the URL, so send no Authorization header when
opening it — browsers' EventSource cannot set headers anyway.
stream_url expires in about 5 minutes. Calling this endpoint again
mints a fresh URL, and the stream replays from the start of the
turn — so a late reconnect loses nothing.
For an edit, the URL also replays from the point the edit was queued, so you see the whole edit even if you connect a moment late.
Errors
| Status | error.code | Meaning |
|---|---|---|
400 | MISSING_REQUIRED_FIELD | callback_id absent or not a string. |
404 | STREAM_CALLBACK_NOT_FOUND | No generation found for this id under your key, or its session expired (~3h). |
GET /api/v2/autogenerator/status — Get a turn's status
Reads the state of one generation or edit turn. This is the polling alternative to the streaming API — same question, answered as a single stateless call instead of a held-open connection.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
callback_id | string | yes | The id from generate or edit. |
Example
curl -s "https://api.prezent.ai/api/v2/autogenerator/status?callback_id=3f8e7d61-9a2b-4c5e-b013-7d4a6f2c8e91" \
-H "Authorization: Bearer YOUR_API_KEY"
Success response (200)
{
"message": "Workflow status polling completed. Your presentation is ready to download.",
"status": "success",
"download_url": "https://cdn.prezent.ai/exports/a1b2c3/deck.pptx?token=..."
}
Note this endpoint returns the three fields flat — not wrapped in the
{ success, data } envelope the other endpoints use.
status is one of:
| Value | Meaning |
|---|---|
in_progress | The turn is still running, or the file is still being exported. |
success | The turn finished and download_url is populated. |
failed | The turn is terminal with no artefact. message carries the reason, including a cancellation or a clarifying question. |
download_url is an empty string on any status other than success.
Errors
| Status | error.code | Meaning |
|---|---|---|
400 | MISSING_REQUIRED_FIELD | callback_id absent or not a string. |
400 | BAD_REQUEST | callback_id is not a valid id, or belongs to a poster — poll GET /api/v1/posters/status instead. |
404 | STREAM_CALLBACK_NOT_FOUND | No generation with this id was issued to your API key. |
POST /api/v2/autogenerator/feedback — Like or dislike a turn
Records a like or a dislike on one generation or edit turn, so you can pass your users' reactions back to Prezent. Either rating can carry an optional free-text comment about the result.
Each call replaces the turn's previous feedback, so a rating can be
changed at any time — switch a like to a dislike, or send clear to
remove the rating altogether. Feedback is not metered.
The turn must have finished. Feedback is only accepted once the turn's generation or edit has completed. Rating a
callback_idthat is still running returns400.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
callback_id | string | yes | The turn to rate — the id from generate, or the new id an edit returned. |
action | string | yes | like, dislike, or clear (removes the rating). |
feedback_text | string | no | Optional free-text comment about the result, up to 5000 characters. |
Example
# Like a turn
curl -X POST https://api.prezent.ai/api/v2/autogenerator/feedback \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "8c1d4b92-6f37-4e2a-a95c-1b0e7d3f6a48",
"action": "like"
}'
# Dislike a turn, with details
curl -X POST https://api.prezent.ai/api/v2/autogenerator/feedback \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "8c1d4b92-6f37-4e2a-a95c-1b0e7d3f6a48",
"action": "dislike",
"feedback_text": "The chart on slide 3 overlaps the title."
}'
# Remove the rating
curl -X POST https://api.prezent.ai/api/v2/autogenerator/feedback \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callback_id": "8c1d4b92-6f37-4e2a-a95c-1b0e7d3f6a48",
"action": "clear"
}'
Success response (200)
{
"message": "Feedback recorded successfully",
"resData": {
"callback_id": "8c1d4b92-6f37-4e2a-a95c-1b0e7d3f6a48",
"action": "dislike",
"feedback_text": "The chart on slide 3 overlaps the title.",
"feedback_at": "2026-10-07T10:42:15.123Z"
},
"error": null
}
feedback_text is null when no comment was sent. feedback_at is when the feedback was recorded, in UTC.
Errors
| Status | error.code | Meaning |
|---|---|---|
400 | INVALID_JSON | The body is not valid JSON. |
400 | BAD_REQUEST | callback_id is missing or not a valid id, action is not one of the three values, or the turn has not finished yet. error.details says which. |
400 | BAD_REQUEST | callback_id was not issued to your API key, or its session has expired. |
GET /api/v1/autogenerator/templates — List templates
Returns the brand templates available for generation — the values you
pass as template_id. Unchanged from 1.0, and still on the v1 path.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | no | Case-insensitive name filter. |
sort | string | no | Sort expression (for example name:asc). |
Success response (200)
{
"status": "success",
"log": "success",
"data": [
{ "code": "CORP24", "name": "Corporate 2024", "isDisabled": false }
]
}
Pass a template's code as template_id. Results are always scoped to
the auto_generator feature server-side; the caller cannot override the
scoping.
GET /api/v2/autogenerator/languages — List supported languages
The languages a deck can be generated in. Pass a locale from this list
as settings.language; an unsupported value is rejected with 422.
The list is static — cache it rather than calling this before every generation.
Example
curl -s https://api.prezent.ai/api/v2/autogenerator/languages \
-H "Authorization: Bearer YOUR_API_KEY"
Success response (200)
{
"status": "success",
"message": "Supported languages retrieved successfully",
"data": [
{ "language": "Arabic", "locale": "ar" },
{ "language": "Chinese (Simplified)", "locale": "zh" },
{ "language": "English (UK)", "locale": "en-uk" },
{ "language": "English (US)", "locale": "en" },
{ "language": "French", "locale": "fr" },
{ "language": "German", "locale": "de" },
{ "language": "Hindi", "locale": "hi" },
{ "language": "Indonesian", "locale": "id" },
{ "language": "Italian", "locale": "it" },
{ "language": "Japanese", "locale": "ja" },
{ "language": "Korean", "locale": "ko" },
{ "language": "Portuguese (Brazil)", "locale": "pt" },
{ "language": "Spanish", "locale": "es" }
]
}
GET /api/v2/autogenerator/skills — List skills
The presentation skills available to the caller — the values you pass as
skill_id on generate.
| List | Contents |
|---|---|
default_skills | Prezent's skills for your industry, including any you have customized. |
my_skills | Skills you created from scratch. |
shared_skills | Skills other people in your company shared with you. |
Example
curl -s https://api.prezent.ai/api/v2/autogenerator/skills \
-H "Authorization: Bearer YOUR_API_KEY"
Success response (200)
{
"status": "success",
"log": "Skills retrieved successfully",
"data": {
"default_skills": [
{
"skill_id": "executive_briefing",
"skill_name": "Executive Briefing",
"description": "Concise, decision-oriented decks for leadership audiences.",
"display_description": null,
"instructions": "Lead with the recommendation, then the supporting evidence.",
"industry": "Technology",
"function": null
}
],
"my_skills": [
{
"skill_id": "612a9f7d-c2b8-48ba-8f5a-8acdefade314",
"skill_name": "Quarterly Business Review",
"description": "QBR decks in our house structure.",
"display_description": null,
"instructions": "Open with KPIs versus target, then wins, risks, and next-quarter priorities.",
"industry": null,
"function": null
}
],
"shared_skills": [
{
"skill_id": "b47e2c19-8a3d-4f6b-9c1e-5d7a2f3b8e60",
"skill_name": "Board Update",
"description": "Board decks in the finance team's format.",
"display_description": null,
"instructions": "Start with the financial summary, then strategic updates and asks of the board.",
"industry": null,
"function": null
}
]
}
}
GET /api/v2/integrations — List your apps
The third-party apps your team has enabled, with whether each one is
connected for you. Use an app's mcp_id to connect it.
Apps are listed for the user who owns the API key.
Example
curl -s "https://api.prezent.ai/api/v2/integrations" \
-H "Authorization: Bearer YOUR_API_KEY"
Success response (200)
{
"mcps": [
{
"mcp_id": "f4623c46-74d3-412e-8213-4f68a9606c97",
"mcp_name": "PubMed",
"description": "Search biomedical literature on PubMed.",
"category": "Life Sciences",
"auth_type": "no_auth",
"sample_prompt": "Build a 4-slide evidence deck. Search PubMed for ...",
"connection_state": "connected"
}
],
"count": 1
}
| Field | Description |
|---|---|
mcp_id | The app's ID. Pass it to /integrations/auth. |
mcp_name | The app's display name, e.g. PubMed. May be null. |
description | What the app does. May be null. |
category | App category, e.g. Life Sciences, Productivity. |
auth_type | How the app connects: dcr / standard (authorization URL), api_key (your API key), no_auth (nothing needed). |
sample_prompt | An example prompt that uses the app. May be null. |
connection_state | connected or not_connected. |
POST /api/v2/integrations/auth — Connect or disconnect an app
Connects a third-party app to the caller's Prezent account, or
disconnects it. Once connected, a generation can pull context from it by
setting settings.enable_mcp_context to true.
The connection is made for the user who owns the API key — there is no parameter to connect an app on someone else's behalf.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mcp_id | string (UUID) | yes | The app's ID, from GET /api/v2/integrations. |
action | string | no | connect (default) or disconnect. |
api_key | string | for api_key apps | Your API key for the app. |
instance_url | string | for some apps | Your company's MCP URL, for apps that need it (e.g. https://acme.veevavault.com/api/ai/mcp). |
GET with query parameters also works for connecting, except for
api_key apps — an API key is only accepted in a POST body.
Example
curl -s -X POST "https://api.prezent.ai/api/v2/integrations/auth" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mcp_id": "6a511689-7e64-42dc-9ca8-cce9bbebd73d",
"api_key": "YOUR_VEEVA_API_KEY",
"instance_url": "https://acme.veevavault.com/api/ai/mcp"
}'
Responses (200)
Authorization required (dcr / standard apps) — send the user to the URL:
{ "auth_url": "https://accounts.example.com/authorize?client_id=...&state=...", "connected": false }
The URL is single-use and time-limited. After the user authorizes,
confirm with
/auth/status.
Connected (api_key and no_auth apps, or any app that is already connected):
{ "status": "connected", "connected": true, "message": "MCP connection successful" }
If the app was already connected — whatever its auth_type — you get
this same response (no auth_url for dcr / standard apps), the
message says so, and the existing connection is kept. To reconnect an
app or change its API key, disconnect it first, then connect again.
Disconnected (action: "disconnect"):
{ "status": "disconnected", "message": "MCP disconnected successfully" }
Errors
| Status | error.code | Meaning |
|---|---|---|
400 | MISSING_REQUIRED_FIELD | mcp_id missing, or the app needs an api_key or instance_url that was not sent. error.details.field names it. |
400 | MCP_NOT_FOUND | No app with this mcp_id. |
400 | MCP_NOT_CONNECTED | disconnect on an app that is not connected. |
422 | INVALID_INPUT | A field is invalid, e.g. instance_url doesn't match the app's address, or api_key sent to an app that doesn't use one. |
503 | SERVICE_UNAVAILABLE | The integrations service is temporarily unreachable. |
GET /api/v2/integrations/auth/status — Check an app's connection
Whether an app is currently connected for the caller. Use it after sending a user through an authorization URL, and before a generation that depends on the app.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mcp_id | string (UUID) | yes | The app's ID. |
Example
curl -s "https://api.prezent.ai/api/v2/integrations/auth/status?mcp_id=f4623c46-74d3-412e-8213-4f68a9606c97" \
-H "Authorization: Bearer YOUR_API_KEY"
Success response (200)
{ "connected": false }
End-to-end example
Generate a deck, stream it to completion, then download it.
- Python
- Node.js
import json
import httpx # pip install httpx httpx-sse
from httpx_sse import connect_sse
BASE = "https://api.prezent.ai"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
def read_stream(stream_url):
"""Read a v2 stream to its terminal event; return the download_url."""
# The token is in the URL — send no auth header here.
with httpx.Client(timeout=None) as sc:
with connect_sse(sc, "GET", stream_url) as events:
for sse in events.iter_sse():
# The server sends a `:ping` comment every 15s to hold the
# connection open. httpx-sse surfaces those as events with an
# empty `data`, so skip them or json.loads raises.
if not sse.data.strip():
continue
event = json.loads(sse.data)
print(event["status"], "-", event["message"])
if event["status"] == "inprogress":
continue
if event["status"] != "success":
raise RuntimeError(f"{event['status']}: {event['message']}")
return event.get("download_url")
raise RuntimeError("stream closed without a terminal event")
with httpx.Client(base_url=BASE, headers=HEADERS, timeout=30) as c:
# 1. start the generation
gen = c.post("/api/v2/generate", json={
"prompt": "A 10-slide deck on renewable-energy market trends for 2026",
"template_id": "your-template-id",
})
gen.raise_for_status()
callback_id = gen.json()["resData"]["callback_id"]
# 2. mint a stream URL, 3. read it to completion
sess = c.post("/api/v2/streams/sessions", json={"callback_id": callback_id})
sess.raise_for_status()
download_url = read_stream(sess.json()["data"]["stream_url"])
# 4. the generation stream may finish before the file is exported.
# A null download_url means "ask for the export", not "failed".
if not download_url:
dl = c.post("/api/v2/autogenerator/download", json={
"callback_id": callback_id,
"export_type": "pptx",
})
dl.raise_for_status()
download_url = read_stream(dl.json()["stream_url"])
print("deck ready:", download_url)
import { EventSource } from 'eventsource'; // npm install eventsource
const BASE = 'https://api.prezent.ai';
const HEADERS = {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
};
const post = async (path, body) => {
const res = await fetch(`${BASE}${path}`, {
method: 'POST',
headers: HEADERS,
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`${path} → ${res.status} ${await res.text()}`);
return res.json();
};
// Read a v2 stream to its terminal event and resolve the download_url.
const readStream = (streamUrl) =>
new Promise((resolve, reject) => {
// The token is in the URL — no Authorization header here.
const es = new EventSource(streamUrl);
es.onmessage = (e) => {
const event = JSON.parse(e.data);
console.log(event.status, '-', event.message);
if (event.status === 'inprogress') return;
es.close();
if (event.status === 'success') resolve(event.download_url ?? null);
else reject(new Error(`${event.status}: ${event.message}`));
};
es.onerror = () => { es.close(); reject(new Error('stream failed')); };
});
// 1. start
const { resData } = await post('/api/v2/generate', {
prompt: 'A 10-slide deck on renewable-energy market trends for 2026',
template_id: 'your-template-id',
});
const callbackId = resData.callback_id;
// 2 + 3. stream to completion
const { data } = await post('/api/v2/streams/sessions', { callback_id: callbackId });
let downloadUrl = await readStream(data.stream_url);
// 4. a null download_url means "ask for the export", not "failed"
if (!downloadUrl) {
const dl = await post('/api/v2/autogenerator/download', {
callback_id: callbackId,
export_type: 'pptx',
});
downloadUrl = await readStream(dl.stream_url);
}
console.log('deck ready:', downloadUrl);
On a generation stream, download_url can be null — the deck is built
but not yet exported to a file. Treat null as "call download", not as
an error. On a download stream it is always populated.
What changed from 1.0
| 1.0 | 2.0 | |
|---|---|---|
| Generate | POST /api/v1/autogenerator | POST /api/v2/generate |
| Track progress | poll GET /api/v1/autogenerator/status | open an SSE stream |
| Revise | regenerate, node-change, slide-actions | POST /api/v2/autogenerator/edit |
| Download | POST /api/v1/autogenerator/download | POST /api/v2/autogenerator/download |
| Feedback | POST /api/v1/autogenerator/reaction-feedback | POST /api/v2/autogenerator/feedback |
| Templates | GET /api/v1/autogenerator/templates | unchanged |
Editing is one endpoint. Rather than choosing between regenerate, node-change, and slide-actions, describe the change you want. Edits chain, so a sequence of revisions is a conversation.
These 1.0 endpoints have no 2.0 equivalent: status-bulk, meta,
slide-data, extract-images, brand-image-search,
library-image-search, and replace-image. If you
depend on any of them, stay on
1.0 — both versions run side by side and
there is no forced migration.
Errors
Every error uses the canonical envelope. The codes you are most likely to see on this surface:
| Status | error.code | Cause |
|---|---|---|
400 | BAD_REQUEST, INVALID_JSON, MISSING_CALLBACK_ID, MISSING_REQUIRED_FIELD, INVALID_DATA_TYPE | Malformed request, unknown callback_id, deck not ready to edit, slideIndex out of range. |
401 | UNAUTHORIZED, INVALID_API_KEY, EXPIRED_API_KEY | Missing, invalid, or expired key. |
404 | ENDPOINT_NOT_FOUND, STREAM_CALLBACK_NOT_FOUND, MCP_NOT_FOUND | Key not scoped to this path, expired session, or unknown app. |
422 | INVALID_INPUT | Field validation failed — error.details is an array of messages. |
429 | TOO_MANY_REQUESTS, RATE_LIMIT_EXCEEDED, USAGE_LIMIT_EXCEEDED | Gateway throttle, per-category limit, or annual quota. |
500 | INTERNAL_SERVER_ERROR | Unexpected server error. |
503 | SERVICE_UNAVAILABLE | A downstream service is temporarily unreachable. |
Full catalog: Error Reference.
Where to go next
- Streaming (SSE) — reconnection, timeouts, and production-ready client patterns.
- API Reference — every field, interactively.
- Rate Limits — the three limit tiers and how to back off.
- Template Converter — apply a brand template to an existing deck (unchanged in 2.0).