Skip to content

Product Swap

The Product Swap recipe takes a reference video and replaces the product featured in it with a new product, preserving the original camera motion, lighting, and scene composition. It’s the fastest way to reuse a proven ad or template across a catalog of products.

Provide a reference video that already shows a product in action, an image of the original product being swapped out, and reference images of the new product. The recipe swaps the product while preserving the original motion, framing, and scene. It returns a task id you poll for the finished output.

InputRequiredDescription
versionYesWorkflow version. Use a dated version like 2026-06 to pin behavior, or unsafe-latest to track the newest stable version.
referenceVideoYesReference video containing the product to swap, as { uri }. Duration must be between 1.8 and 15 seconds.
originalProductImageYesImage of the original product being swapped out, as { uri }.
newProductImagesYesOne to ten reference images of the new product. Each is { uri } with an optional view of front, side, or back. A single pre-composed reference sheet is also supported (omit view).
durationNoOutput length in seconds (4–15). Defaults to 10.
resolutionNoOutput resolution: 720p or 1080p. Defaults to 720p.
audioNoWhether to generate audio. Defaults to true.

uri accepts an HTTPS URL, a Runway upload URI, or a data URI.

import RunwayML from '@runwayml/sdk';
const client = new RunwayML();
const task = await client.recipes.productSwap({
version: '2026-06',
referenceVideo: { uri: 'https://example.com/reference-ad.mp4' },
originalProductImage: { uri: 'https://example.com/original-product.jpg' },
newProductImages: [
{ uri: 'https://example.com/new-product-front.jpg', view: 'front' },
{ uri: 'https://example.com/new-product-side.jpg', view: 'side' },
],
duration: 10,
});
console.log(task);

The recipe returns a task id. Poll GET /v1/tasks/{id} for status and the output video URL — see Using the API for the task workflow.

  • Best for like-for-like swaps. Product Swap works best when the new product fits the same context as the original — for example, swapping one style of water bottle for another in the same video. Swaps struggle when the reference video shows an action the new product wouldn’t perform, like replacing a water bottle someone is drinking from with a hairbrush.
  • Match the new product’s reference angles to the video. When the reference video shows the product from different views, supply multiple newProductImages and label each with its view (front, side, or back) so the model can depict the product accurately throughout.
  • Choose a reference video where the product is clearly visible and consistently framed.
  • Match the new product’s category and rough shape to the one in the video for the most natural swap.
  • Use clean, well-lit product images with the product isolated from its background.
  • See Reference media guidelines for more.