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

# Re-record demo with updated presentation

Uses the existing action script and records the demo again with a new presentation config. This is useful for changing background, mockup, cursor, click effects, fade, or template metadata without re-planning the whole demo.

` POST /api/v1/demos/{id}/restyle `

Re-record demo with updated presentation

Uses the existing action script and records the demo again with a new presentation config. This is useful for changing background, mockup, cursor, click effects, fade, or template metadata without re-planning the whole demo.

## Servers

- ` https://littledemo.com ` — Production

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` bearerAuth `: ` http `

  - HTTP scheme: ` bearer `

  - Live API key, for example `Authorization: Bearer ld_live_...`.

### Alternative 2

- ` cookieAuth `: ` apiKey `

  - Credential: ` better-auth.session_token ` in ` cookie `

  - Dashboard session cookie.

## Parameters

### ` id ` (path, required)

- ` value `: type ` string `

## Request body (optional)

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` presentation `

  - ` presentation `: type ` object `

    - ` background `: type ` unknown `

      - ` anyOf alternative 1 `: type ` string `

      - ` anyOf alternative 2 `: type ` object `

        - Required fields: ` from `, ` to `

        - ` from `: type ` string `

        - ` to `: type ` string `

        - ` angle `: type ` number `

      - ` anyOf alternative 3 `: type ` object `

        - Required fields: ` imageUrl `

        - ` imageUrl `: type ` string `; format ` uri `

          - maxLength: ` 2048 `

    - ` mockup `: type ` string `

      - enum: ` ["macos-light","macos-dark","minimal","none"] `

    - ` zoom `: type ` object `

      - Required fields: ` enabled `

      - ` enabled `: type ` boolean `

      - ` intensity `: type ` number `

        - minimum: ` 1 `

        - maximum: ` 3 `

      - ` transitionMs `: type ` number `

        - minimum: ` 100 `

        - maximum: ` 2000 `

    - ` padding `: type ` number `

      - minimum: ` 0 `

      - maximum: ` 0.3 `

    - ` cursor `: type ` object `

      - ` style `: type ` string `

        - enum: ` ["dot","arrow","crosshair","circle","none"] `

      - ` color `: type ` string `

        - maxLength: ` 50 `

      - ` size `: type ` number `

        - minimum: ` 8 `

        - maximum: ` 64 `

    - ` clickEffect `: type ` object `

      - ` style `: type ` string `

        - enum: ` ["pulse","ripple","glow","none"] `

      - ` color `: type ` string `

        - maxLength: ` 50 `

      - ` scale `: type ` number `

        - minimum: ` 0.2 `

        - maximum: ` 3 `

    - ` fade `: type ` object `

      - ` inMs `: type ` number `

        - minimum: ` 0 `

        - maximum: ` 3000 `

      - ` outMs `: type ` number `

        - minimum: ` 0 `

        - maximum: ` 3000 `

      - ` color `: type ` string `

        - enum: ` ["black","white"] `

    - ` windowAnimation `: type ` object `

      - ` intro `: type ` boolean `

      - ` outro `: type ` boolean `

      - ` introDurationMs `: type ` number `

        - minimum: ` 200 `

        - maximum: ` 2000 `

      - ` outroDurationMs `: type ` number `

        - minimum: ` 200 `

        - maximum: ` 2000 `

    - ` recordingTemplate `: type ` object `

      - Required fields: ` id `

      - ` id `: type ` string `

        - enum: ` ["auto","cinematic","guided-tour","plain-scroll","section-focus","hero-spotlight","feature-sweep","conversion-flow","pricing-focus","proof-scroll"] `

      - ` sectionHint `: type ` string `

        - minLength: ` 1 `

        - maxLength: ` 120 `

      - ` effectiveId `: type ` string `

        - enum: ` ["cinematic","guided-tour","plain-scroll","section-focus","hero-spotlight","feature-sweep","conversion-flow","pricing-focus","proof-scroll"] `

      - ` autoSelection `: type ` object `

        - Required fields: ` selectedId `, ` confidence `, ` reason `, ` source `

        - ` selectedId `: type ` string `

          - enum: ` ["cinematic","guided-tour","plain-scroll","section-focus","hero-spotlight","feature-sweep","conversion-flow","pricing-focus","proof-scroll"] `

        - ` sectionHint `: type ` string `

          - minLength: ` 1 `

          - maxLength: ` 120 `

        - ` confidence `: type ` number `

          - minimum: ` 0 `

          - maximum: ` 1 `

        - ` reason `: type ` string `

          - minLength: ` 1 `

          - maxLength: ` 500 `

        - ` source `: type ` string `

          - enum: ` ["heuristic","ai","fallback"] `

        - ` signals `: type ` array `

          - ` array item `: type ` string `

            - minLength: ` 1 `

            - maxLength: ` 240 `

    - ` debugHud `: type ` boolean `

## Responses

### ` 202 ` — Restyle recording started

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` id `, ` status `, ` jobId `

  - ` id `: type ` string `

  - ` status `: type ` string `

    - enum: ` ["refreshing","recording"] `

  - ` jobId `: type ` string `

### ` 400 ` — Demo has no recorded script or validation failed

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

### ` 404 ` — Not found

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

### ` 429 ` — Quota exceeded

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

## Request examples

### cURL

```curl
curl -X POST 'https://littledemo.com/api/v1/demos/string/restyle' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "presentation": {
    "background": "string",
    "mockup": "macos-light",
    "zoom": {
      "enabled": true,
      "intensity": 1,
      "transitionMs": 100
    },
    "padding": 0,
    "cursor": {
      "style": "dot",
      "color": "string",
      "size": 8
    },
    "clickEffect": {
      "style": "pulse",
      "color": "string",
      "scale": 0.2
    },
    "fade": {
      "inMs": 0,
      "outMs": 0,
      "color": "black"
    },
    "windowAnimation": {
      "intro": true,
      "outro": true,
      "introDurationMs": 200,
      "outroDurationMs": 200
    },
    "recordingTemplate": {
      "id": "auto",
      "sectionHint": "string",
      "effectiveId": "cinematic",
      "autoSelection": {
        "selectedId": "cinematic",
        "sectionHint": "string",
        "confidence": 0,
        "reason": "string",
        "source": "heuristic",
        "signals": [
          "string"
        ]
      }
    },
    "debugHud": true
  }
}'
```

### JavaScript

```javascript
const response = await fetch('https://littledemo.com/api/v1/demos/string/restyle', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "presentation": {
      "background": "string",
      "mockup": "macos-light",
      "zoom": {
        "enabled": true,
        "intensity": 1,
        "transitionMs": 100
      },
      "padding": 0,
      "cursor": {
        "style": "dot",
        "color": "string",
        "size": 8
      },
      "clickEffect": {
        "style": "pulse",
        "color": "string",
        "scale": 0.2
      },
      "fade": {
        "inMs": 0,
        "outMs": 0,
        "color": "black"
      },
      "windowAnimation": {
        "intro": true,
        "outro": true,
        "introDurationMs": 200,
        "outroDurationMs": 200
      },
      "recordingTemplate": {
        "id": "auto",
        "sectionHint": "string",
        "effectiveId": "cinematic",
        "autoSelection": {
          "selectedId": "cinematic",
          "sectionHint": "string",
          "confidence": 0,
          "reason": "string",
          "source": "heuristic",
          "signals": [
            "string"
          ]
        }
      },
      "debugHud": true
    }
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://littledemo.com/api/v1/demos/string/restyle', headers=headers, json={
  "presentation": {
    "background": "string",
    "mockup": "macos-light",
    "zoom": {
      "enabled": true,
      "intensity": 1,
      "transitionMs": 100
    },
    "padding": 0,
    "cursor": {
      "style": "dot",
      "color": "string",
      "size": 8
    },
    "clickEffect": {
      "style": "pulse",
      "color": "string",
      "scale": 0.2
    },
    "fade": {
      "inMs": 0,
      "outMs": 0,
      "color": "black"
    },
    "windowAnimation": {
      "intro": true,
      "outro": true,
      "introDurationMs": 200,
      "outroDurationMs": 200
    },
    "recordingTemplate": {
      "id": "auto",
      "sectionHint": "string",
      "effectiveId": "cinematic",
      "autoSelection": {
        "selectedId": "cinematic",
        "sectionHint": "string",
        "confidence": 0,
        "reason": "string",
        "source": "heuristic",
        "signals": [
          "string"
        ]
      }
    },
    "debugHud": true
  }
})
print(response.json())
```