---
title: "Swap a product in a reference video"
method: POST
path: "/v1/recipes/product_swap"
tags: ["Recipes"]
---

# Swap a product in a reference video

`POST /v1/recipes/product_swap`

Replace the product in a reference video with a new product, preserving camera motion, lighting, and scene composition.

## Headers

- `X-Runway-Version` '2024-11-06', required

## Request body

- object
  - `version` '2026-06' | 'unsafe-latest', required — Workflow version. Use a dated version (e.g. "2026-06") to pin behavior, or "unsafe-latest" to track the newest stable version (may break without notice).
  - `referenceVideo` object, required — Reference video containing the product to swap. Duration must be between 1.8 and 15 seconds. See [our docs](/assets/inputs#videos) on video inputs.
    - `uri` union, required — A HTTPS URL, Runway or data URI containing an encoded video. See [our docs](/assets/inputs#videos) on video inputs for more information.
      - string — A HTTPS URL, Runway upload URI, or base64 data URI (e.g. `data:video/mp4;base64,...`, up to 16MB) containing an encoded video. See [our docs](/assets/inputs#videos) on video inputs for more information.
      - string — A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.
      - string — A data URI containing encoded media.
  - `originalProductImage` object, required — Image of the original product being swapped out. See [our docs](/assets/inputs#images) on image inputs.
    - `uri` union, required — A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.
      - string — A HTTPS URL, Runway upload URI, or base64 data URI (e.g. `data:image/png;base64,...`, up to 5MB) containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.
      - string — A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.
      - string — A data URI containing encoded media.
  - `newProductImages` object[], required — Reference images of the new product (1-10). Supply multiple angles when the reference video shows the product from different views - optionally label each with `view` ("front", "side", or "back"). A single pre-composed reference sheet is also supported (omit `view`). See [our docs](/assets/inputs#images) on image inputs.
    - `uri` union, required — A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.
      - string — A HTTPS URL, Runway upload URI, or base64 data URI (e.g. `data:image/png;base64,...`, up to 5MB) containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.
      - string — A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.
      - string — A data URI containing encoded media.
    - `view` 'front' | 'side' | 'back' — Optional view label for this reference (front, side, or back). Omit when supplying a single reference sheet or when view labels are unknown.
  - `duration` integer — Duration of the output video in seconds (4-15). Defaults to 10 seconds.
  - `resolution` '720p' | '1080p' — Output video resolution. Defaults to 720p.
  - `audio` boolean — Whether to generate audio for the video.

## Response `200`

The task that was created.

- object
  - `id` string, uuid, required — The ID of the task that was created. Use this to retrieve the task later.

## Other responses

- `429` — You have exceeded the rate limit for this endpoint.

---

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