# Requests (/docs/api/requests)

Poll deck generation by caller request ID, including its stage, warnings, terminal error, and completed export.

## Get Generation Request

`GET https://api.presentations.ai/api/v1/requests/{request_id}`

Get deck-generation status by the caller's request ID.

**Path parameters**

- `request_id` (string, required, max length 255, pattern `^[A-Za-z0-9][A-Za-z0-9._:~-]{0,254}$`) — The `Request-Id` sent with `POST /decks`.

**Responses**

- `200`: DeckGenerationRequestResponse — Successful Response
- `401`: APIErrorResponse — Missing, malformed, expired, or revoked Bearer API key. `error.code`: `UNAUTHENTICATED`, `INVALID_TOKEN`.
- `403`: APIErrorResponse — The API key, workspace role, project scope, or plan lacks permission. `error.code`: `FORBIDDEN`, `FEATURE_NOT_IN_PLAN`, `PLAN_LIMIT_EXCEEDED`.
- `404`: APIErrorResponse — The resource does not exist or is outside the caller's scope. `error.code`: `NOT_FOUND`.
- `422`: RequestValidationErrorResponse — A path, query, header, or request-body field failed validation. `error.code`: `VALIDATION_FAILED`.
- `429`: APIErrorResponse — The caller exceeded the API rate limit. `error.code`: `RATE_LIMITED`.
- `500`: APIErrorResponse — Unexpected server failure. Retry only idempotent operations and retain trace_id. `error.code`: `INTERNAL_ERROR`.

# Schemas

### AsyncTaskStatus

Lifecycle state of an async task: CREATED (queued), RUNNING, then COMPLETED or FAILED.

One of: `CREATED`, `RUNNING`, `COMPLETED`, `FAILED`

### DeckExportFormat

Export artifact format: PPTX, PDF, or IMAGE (a ZIP with one image per slide).

One of: `PPTX`, `PDF`, `IMAGE`

### DeckGenerationRequestResponse

Public generation lifecycle keyed only by request ID and deck ID.

- `request_id` (string, required, max length 255) — Caller request ID used to safely replay this deck creation.
- `deck_id` (string (uuid), required) — Deck being generated.
- `status` (AsyncTaskStatus, required) — Durable lifecycle state for this request.
- `stage` (GenerationStage, required) — Current generation stage for progress display.
- `status_url` (string (uri), required) — Canonical URL to poll for this request.
- `deck_url` (string (uri), required) — Opens the deck in the PresentationsAI app; requires signing in as a member with access. Not a public link: share one with `POST /decks/{deck_id}/share-link`.
- `error` (string, required) — Sanitized terminal failure message; non-null only when status is FAILED.
- `created_at` (string (date-time), required) — When the request was accepted.
- `updated_at` (string (date-time), required) — Last change to status, stage or warnings.
- `warnings` (TaskWarning[], optional) — Nonterminal degradations encountered while generation continued.
- `export` (ExternalDeckExportResponse, optional) — Finished artifact; non-null after successful export persistence.

### ExternalDeckExportResponse

External export artifact projection.

- `id` (string (uuid), required) — Export id.
- `deck_id` (string (uuid), required) — Deck the artifact was exported from.
- `format` (DeckExportFormat, required) — Artifact format.
- `content_type` (string, required) — MIME type of the artifact.
- `size_bytes` (integer, required) — Artifact size in bytes.
- `download_url` (string, required) — Absolute URL of the artifact bytes; authenticate with the same Bearer credential.
- `created_at` (string (date-time), required) — When the artifact was produced.

### GenerationStage

Deck generation moves QUEUED, OUTLINE, SLIDES, EXPORT, then COMPLETED or FAILED.

One of: `QUEUED`, `OUTLINE`, `SLIDES`, `EXPORT`, `COMPLETED`, `FAILED`

### TaskWarning

A generation warning persisted on an async task.

- `message` (string, required, max length 500) — Sanitized description.
- `stage` (string, required, max length 100) — Pipeline step that degraded (free-form).
- `source` (string, required, max length 100) — Component that reported it (free-form).
- `retryable` (boolean, optional, default `false`) — Whether a retry of the generation may avoid it.
- `occurred_at` (string (date-time), required) — When the warning was recorded.