---
title: "Edit an existing video without re-rendering unchanged clips"
method: POST
path: "/api/update_video"
tags: ["Video"]
---

# Edit an existing video without re-rendering unchanged clips

`POST /api/update_video`

## Request

- Base URL: `https://app.pedra.ai`
- URL: `https://app.pedra.ai/api/update_video`
- Auth: none required

Edits a video (by videoId) created with create_video. Clips whose source photo + effect (+ second photo for transitions) are unchanged reuse their already-rendered clip — no re-animation, no credits. Only new or changed AI frames re-animate at 5 credits each. Omit `images` to change only audio/text/branding (a free re-stitch). Omitted music/voice/branding/ending fields keep their stored values. Synchronous — blocks until the new video is rendered. If the video was created with a `propertyId`, that link is inherited automatically — no need to pass it again.

## Request body

- object
  - `apiKey` string, required: Account API key, sent in the request body. Get one at https://app.pedra.ai under Settings → API.
  - `videoId` string, required: Id of the video to edit (the videoId returned by create_video).
  - `images` VideoFrame[]: Full ordered frame list to rebuild the timeline; matching photo+effect clips are reused. Omit to keep the current timeline and edit only audio/text/branding.
    - `imageUrl` string, required: A publicly accessible HTTPS image URL or a base64 data URI (`data:image/png;base64,...`). Remote URLs are fetched within ~20s; use base64 for auth-walled or short-lived presigned URLs.
    - `effect` 'zoom-in' | 'zoom-out' | 'transition' | 'sky-transition' | 'lite-zoom-in' | 'lite-zoom-out' | 'static', required: Frame animation. "zoom-in" (default) and "zoom-out" are AI zooms (5 credits). "transition" morphs into `secondImageUrl`; "sky-transition" keeps the scene still and changes only the sky and light into `secondImageUrl` (same shot, e.g. day to night); both 5 credits. "lite-zoom-in" / "lite-zoom-out" are a free, subtler 3D push (no AI video, 0 credits). "static" is a still frame (0 credits).
    - `secondImageUrl` string: A publicly accessible HTTPS image URL or a base64 data URI (`data:image/png;base64,...`). Remote URLs are fetched within ~20s; use base64 for auth-walled or short-lived presigned URLs.
    - `subtitle` string: Caption shown over the frame.
    - `title` string: Large title overlay on the frame, e.g. "Living Room".
    - `watermark` Watermark: Per-frame watermark settings.
      - `enabled` boolean: Show a watermark on this frame.
      - `position` 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right': Watermark placement.
      - `opacity` number: Watermark opacity, 0.0–1.0.
    - `characteristics` object: Per-frame toggle for the property-characteristics overlay.
      - `enabled` boolean: Show the `propertyCharacteristics` overlay on this frame.
  - `isVertical` boolean: Render 9:16 vertical instead of horizontal (only applied when `images` is sent).
  - `propertyCharacteristics` PropertyCharacteristic[]
    - `label` string, required: Characteristic name. Built-in labels (Bedrooms, Bathrooms, Surface, Price, Location, Parking, Heating, Outdoor) render with an icon.
    - `value` string, required
  - `music` Music: Background music settings.
    - `enabled` boolean, required
    - `track` 'acoustic' | 'chill' | 'cinematic' | 'electronic' | 'upbeat': Music genre. One of the keys from GET /api/music_library. Required when `enabled` is true. Legacy values (calm, uplifting, corporate, piano) are still accepted.
  - `voice` Voice: Voiceover settings. Generate the audioId with POST /api/generate_voice.
    - `enabled` boolean, required
    - `audioId` string: Id of a voiceover from /api/generate_voice. Required when `enabled` is true. Attaches the narration and drives synced subtitles.
    - `audioUrl` string: Legacy alias for audioId.
    - `showSubtitles` boolean: Burn in word-synced subtitles from the voiceover.
  - `branding` Branding: Agency/agent branding applied to the video.
    - `showWatermark` boolean: Use a custom logo as the watermark.
    - `watermarkUrl` string: URL to the logo (PNG with transparency recommended).
    - `showProfessionalPicture` boolean: Show the agent photo on the ending card.
    - `professionalPictureUrl` string: URL to the agent headshot.
    - `primaryColor` string: Hex color for overlays. Defaults to white (#ffffff).
  - `endingTitle` string: Headline shown on the final card.
  - `endingSubtitle` string: Subtitle shown on the final card.

## Response `200`

Video re-rendered.

- VideoResult
  - `message` string
  - `videoId` string: Identifier of the rendered video.
  - `videoUrl` string: URL of the rendered video.

## Other responses

- `400`: Invalid request — bad or unreachable image URL, missing required field, or validation error.
- `403`: Not enough credits for the requested generation.
- `404`: Missing, invalid, or revoked API key.
- `405`: Wrong HTTP method — all endpoints accept POST (credits also accepts GET).

---

[API](https://skmtc.dev/pedra/apis/pedra-api.md) · [All operations](https://skmtc.dev/pedra/apis/pedra-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pedra/apis/pedra-api/revisions/87b2e76912c8?raw)
