Skip to main content

Getting Started with the Prezent API

The Prezent Platform API exposes Prezent's AutoGenerator, Template Converter, Audiences, Themes, and File-upload services behind a single uniform JSON HTTP API.

This page walks you through the minimum you need to make a successful first call: the base URL, how to authenticate, what every response looks like, and how to drive long-running operations.

Looking for the full interactive API reference? Open the API Reference page or download the raw OpenAPI YAML.

Overview

  • All endpoints accept and return application/json.
  • All endpoints use a single uniform success envelope and a single uniform error envelope (see Response envelopes).
  • Long-running endpoints return a callback_id you poll against a corresponding status endpoint (see Async operations).
  • Authentication is Bearer-token based: Authorization: Bearer <api_key>.
  • Identifiers in new endpoints and new fields use snake_case (for example callback_id).

Base URL

EnvironmentHost
Production (canonical)https://api.prezent.ai
UAThttps://uatstage-api.myprezent.com
Developmenthttps://devstage-api.myprezent.com

All examples in this documentation use the canonical production host.

Authentication

The Prezent API uses API key (Bearer) authentication. Include your API key on every request in the Authorization header:

Authorization: Bearer YOUR_API_KEY
  • API keys are issued by your Customer Success Manager. Self-service key generation is not currently supported.
  • Keys may have an expiry_date and a status. An expired key returns 401 EXPIRED_API_KEY.
  • Keys are scoped to specific endpoint paths. Calling an endpoint outside your key's scope returns 404 ENDPOINT_NOT_FOUND.
  • API keys are masked after generation. Download and store your key securely; you will not be able to view it again.

For the full security model across every surface (Bearer vs. OAuth, key scoping, transport security, and webhook payload integrity), see Authentication & Security.

Making your first request

Verify your key is working with a simple call to the AutoGenerator service.

curl -X POST https://api.prezent.ai/api/v1/autogenerator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Generate a presentation on AI trends",
"template_id": "your-template-id"
}'

Response envelopes

Every documented endpoint returns one of two shapes.

Success envelope

{
"success": true,
"data": {
"...endpoint-specific payload..."
}
}
  • success is always true on a successful response.
  • data is the endpoint-specific payload (its shape is documented per endpoint in the API Reference).
  • The handler may emit additional legacy keys alongside success and data for backwards compatibility. These are not part of the contract and may be removed in a future major version.

Error envelope

{
"success": false,
"data": null,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "The requested resource does not exist.",
"details": {
"callback_id": "abc-123"
}
}
}
  • success is always false on an error response.
  • data is always null on an error response.
  • error.code is a stable string identifier drawn from the error catalog. Codes never change meaning or HTTP status once published.
  • error.message is a human-readable English description.
  • error.details is optional and may carry structured information (validation failures, downstream-service info, etc.).

The same envelope is returned by both in-handler errors and gateway-level errors (UNAUTHORIZED, TOO_MANY_REQUESTS, etc.).

Status codes

StatusMeaning
200 OKThe call succeeded.
202 AcceptedThe async operation is still in progress (v2 status endpoints only).
400 Bad RequestRequest shape or input is invalid.
401 UnauthorizedMissing, invalid, or expired API key.
403 ForbiddenCaller is authenticated but not allowed to perform this operation.
404 Not FoundEndpoint or resource not found, or key is not scoped to this path.
405 Method Not AllowedHTTP method not supported on this path.
415 Unsupported Media TypeFile extension or MIME type rejected.
422 Unprocessable EntitySemantically invalid request body.
429 Too Many RequestsRate or usage limit exceeded; see Rate Limits.
500 Internal Server ErrorUnexpected server error.
502 Bad GatewayA downstream service returned an error.
503 Service UnavailableService temporarily unavailable.
504 Gateway TimeoutUpstream timeout.

Error catalog

See the full list of stable error codes (per HTTP status) in the canonical Error Reference.

Rate limits

Three independent limits apply, each returning 429 with the standard error envelope. Default values (all configurable per company):

TierDefaulterror.code
Gateway throttle (per key)10 req/s, 5 burst, 1,000 req/dayTOO_MANY_REQUESTS
Per-company × category, 60-second sliding windowconfigured per companyRATE_LIMIT_EXCEEDED
Annual usage quota50,000 slide generations/yr · 1,000,000 downloads/yrUSAGE_LIMIT_EXCEEDED

Read X-RateLimit-Remaining to pace yourself and honour Retry-After on a 429. The full table, response-header reference, and a copy-pasteable backoff loop are on the dedicated Rate Limits page.

Async operations

Several endpoints kick off long-running background work and return a callback_id. The flow:

  1. POST to the entry endpoint (for example POST /api/v1/template-converter/start). The response includes data.callback_id.
  2. Poll the corresponding status endpoint until you reach a terminal state.
  3. Use the resulting callback_id with downstream operations (download, regenerate, layout change, etc.).

For the Template Converter family, agents should use the v2 status endpoint because it uses strict HTTP-status mapping:

  • GET /api/v2/template-converter/status/{callback_id} returns:
    • 200 only when the conversion has completed successfully.
    • 202 while the pipeline is still in progress.
    • 4xx or 5xx on workflow failure, with the standard error envelope.

With strict mapping you can branch on HTTP status alone — no need to inspect a status field in the body to distinguish success from failure.

AutoGenerator polling

AutoGenerator uses a single status endpoint at GET /api/v1/autogenerator/status?callback_id=.... The data.status field is one of in_progress, success, or failed. Once status=success, the same payload is cached and returned for subsequent polls of the same callback_id.

Polling pattern (cURL)

# 1. Start the job and capture the callback_id
curl -s -X POST https://api.prezent.ai/api/v1/autogenerator \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"Generate a presentation on AI trends","template_id":"tmpl-1"}'

# Response:
# { "success": true, "data": { "callback_id": "cb_123" } }

# 2. Poll for status
curl -s -X GET "https://api.prezent.ai/api/v1/autogenerator/status?callback_id=cb_123" \
-H "Authorization: Bearer $API_KEY"

# When done:
# { "success": true, "data": { "status": "success", "allSlides": [ ... ] } }

Recommended polling interval: 2–5 seconds. Use exponential backoff for long-running jobs.

Next steps