> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genviral.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Regenerate Slide

> Regenerate text for one slide while preserving layout

Regenerates text content for a single slide.

The service keeps the original text-element structure and only replaces content,
so positional and style metadata remain intact.

## Path Parameters

<ParamField path="slideshowId" type="string" required>
  Slideshow UUID.
</ParamField>

<ParamField path="slideIndex" type="number" required>
  Zero-based slide index (`0, 1, 2, ...`). Must be a non-negative integer.
</ParamField>

## Body Parameters

<ParamField body="instruction" type="string">
  Optional rewrite instruction (`1-500` chars), for example
  `"Make it punchier"`.
</ParamField>

<Note>
  Empty body is valid (`{}` behavior). In that case the API generates a subtle
  variation automatically.
</Note>

## Preconditions

* Slideshow must be in `draft` status.
* Slideshow must have `original_prompt`.
* Target slide index must exist.
* Target slide must contain at least one text element.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://www.genviral.io/api/partner/v1/slideshows/2ab58bb0-0c39-45c0-a4d5-b6852f9d7fc0/slides/0/regenerate \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
    "instruction": "Make the hook shorter and more direct"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Slide regenerated",
    "data": {
      "slide_index": 0,
      "slideshow": {
        "id": "2ab58bb0-0c39-45c0-a4d5-b6852f9d7fc0",
        "status": "draft",
        "slide_count": 5
      }
    }
  }
  ```
</ResponseExample>

## Error Responses

* `400 missing_slideshow_id` - path param missing
* `400 missing_slide_index` - path param missing
* `400 invalid_slide_index` - `slideIndex` is not a non-negative integer
* `400 invalid_json` - body is not valid JSON
* `422 invalid_payload` - body schema validation failed
* `404 not_found` - slideshow is missing/outside key scope
* `422 regeneration_precondition_failed` - slideshow/slide failed preconditions (non-draft status, missing prompt, out-of-range index, or slide has no text)
* `401` - authentication failed (missing/invalid/revoked token)
* `402 subscription_required` - active Creator/Professional/Business plan required
* `403 tier_not_allowed` - Scheduler tier cannot use Partner API
* `500 regenerate_failed` - unexpected regeneration failure
