---
title: "Create a regeneration of an AutoGenerator deck"
method: POST
path: "/api/v1/autogenerator/regenerate"
tags: ["AutoGenerator"]
---

# Create a regeneration of an AutoGenerator deck

`POST /api/v1/autogenerator/regenerate`

Re-runs a portion of an existing AutoGenerator deck — typically a
slide, node, or section — and returns a new `callback_id` to poll.
Counted as a fresh generation against the `AUTO_GEN` usage cap.

The `operation` query parameter selects what is regenerated, and
each operation requires its own additional body fields. See
`AutoGeneratorRegenerateRequest` for the per-operation requirements.

## Query parameters

- `operation` 'audience_change' | 'template_change' | 'slide_change' | 'context_change' | 'smart_chart_change' | 'node_change' | 'story_content_change' | 'add_slide' | 'duration_change' | 'slides_footer_change' | 'voice_change' | 'generate_speaker_notes', required

## Request body

- AutoGeneratorRegenerateRequest — Request body for `POST /api/v1/autogenerator/regenerate`. `callback_id` is always required. Which of the remaining fields are required depends on the `operation` query parameter: | `operation` | Additionally required | |---|---| | `audience_change` | `audience` | | `template_change` | `template_code` | | `slide_change` | `slide_override` | | `context_change` | `context` and `slide_override` | | `smart_chart_change` | `slide_override` (with `workflow` and `slide_type`) | | `node_change` | `slide_override` | | `story_content_change` | `story_content_override` | | `add_slide` | `context` (with `context.context` prompt) and `slide_position` | | `duration_change` | `duration` (with `duration.no_of_slides`) |
  - `callback_id` string, required — Existing deck callback id. Must be a non-empty string.
  - `audience` object — Override audience for the regenerated portion. Required for `audience_change`. When omitted, the audience is resolved automatically from the original deck.
    - `id` string, required
    - `num_id` integer, required
  - `template_code` string — Override template code. Required for `template_change`.
  - `slide_override` object — Slide-level overrides. Required for `slide_change`, `context_change`, `smart_chart_change`, and `node_change`. For `smart_chart_change`, `workflow` (string) and `slide_type` (string) are both required. For `node_change`, pass the target slide as `unique_id` (or `slide`).
  - `story_content_override` object — Narrative-content overrides. Required for `story_content_change`. May also be supplied as an array.
  - `context` object — Additional context to inject into the regenerate pass. Required for `context_change` and `add_slide`; for `add_slide`, the nested `context` property carries the prompt and must be a non-empty string.
    - `context` string — Prompt text. Required for `add_slide`.
  - `slide_position` integer — Zero-based position at which to insert the new slide. Required for `add_slide`.
  - `duration` object — Desired length of the regenerated deck. Required for `duration_change`.
    - `no_of_slides` integer, required — Target slide count. Must be a positive number.
  - `voice_settings` object — Voice/tone settings.
  - `data_sources_settings` object — Source-attribution configuration. Defaults to both flags `false` when omitted.
    - `add_sources_to_footer` boolean
    - `add_sources_to_slides_note` boolean
  - `preserve_text` boolean — Preserve existing text where possible. When omitted, the behaviour is inherited from the original deck's workflow.

## Response `200`

Regenerate job accepted; poll the returned `new_callback_id`.

- AutoGeneratorRegenerateResponse — Standard success envelope. Endpoint-specific schemas extend this and constrain the `data` property to their concrete shape. Additional legacy keys (`status`, `log`, …) may appear alongside `success`/`data` for backwards compatibility, and some legacy handlers omit `success`, so it is not marked required.
  - `success` boolean — `true` on success (omitted by some legacy handlers).
  - `data` object, required — Endpoint-specific payload.
    - `new_callback_id` string, required — Callback id to poll for the regenerate sub-job.
    - `message` string — Human-readable confirmation.

## Other responses

- `400` — Generic client error. `error.code` is one of `BAD_REQUEST`, `INVALID_JSON`, `MISSING_REQUIRED_FIELD`, `MISSING_QUERY_PARAM`, `MISSING_CALLBACK_ID`, `MISSING_SLIDES_ARRAY`, `MISSING_PROMPT`, `MISSING_TEMPLATE_ID`, `MISSING_FILE_CONTENT`, `MISSING_SHARE_DETAILS`, `INVALID_TYPE`, `INVALID_DATA`, `INVALID_DATA_TYPE`, `INVALID_PAYLOAD`, `INVALID_REQUEST`, `API_REQUEST_FAILED`, or `FILE_UPLOAD_FAILED`.
- `401` — Caller did not present a valid Bearer token, or the token has expired. `error.code` is one of `UNAUTHORIZED`, `INVALID_API_KEY`, `EXPIRED_API_KEY`.
- `403` — Caller is authenticated but not allowed to perform this operation. `error.code` is `FORBIDDEN`.
- `404` — Requested endpoint or resource does not exist. `error.code` is one of `ENDPOINT_NOT_FOUND`, `RESOURCE_NOT_FOUND`, `NOT_FOUND`.
- `422` — Request was well-formed but failed semantic validation. `error.code` is one of `INVALID_INPUT`, `UNPROCESSABLE_ENTITY`.
- `429` — Rate limit, usage limit, or gateway-level throttle exceeded. `error.code` is `TOO_MANY_REQUESTS` (gateway throttle), `RATE_LIMIT_EXCEEDED` (per-category), or `USAGE_LIMIT_EXCEEDED` (annual quota). Default limits (all configurable per company/key): - Gateway throttle (per API key) → `TOO_MANY_REQUESTS`: 10 requests/second sustained, 5 burst, 1,000 requests/day. - Per-company, per-category sliding 60-second window → `RATE_LIMIT_EXCEEDED`. The applicable category is given by each operation's `x-rate-limit-category`. - Annual usage quota → `USAGE_LIMIT_EXCEEDED`: 50,000 slide generations/year and 1,000,000 presentation downloads/year. `X-RateLimit-Limit`/`X-RateLimit-Remaining`/`X-RateLimit-Reset` are returned on successful (2xx) responses from rate-limited endpoints and, with `Retry-After`, on the per-category `RATE_LIMIT_EXCEEDED` 429 (the headers declared below). The gateway `TOO_MANY_REQUESTS` and annual `USAGE_LIMIT_EXCEEDED` responses do not carry them. Read `X-RateLimit-Remaining` to self-throttle and honour `Retry-After` on a 429.
- `500` — Unexpected server error. `error.code` is `INTERNAL_SERVER_ERROR`.
- `503` — Service is temporarily unavailable (downstream dependency unhealthy). `error.code` is `SERVICE_UNAVAILABLE` or `EXTERNAL_SERVICE_ERROR`.
- `504` — A downstream call timed out. `error.code` is `GATEWAY_TIMEOUT`.

---

[API](https://skmtc.net/prezent/apis/prezent-platform-api.md) · [All operations](https://skmtc.net/prezent/apis/prezent-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prezent/prezent-platform-api/revisions/a01cb764a085/schema)
