---
title: Replacing elements with reference images — Gemini Omni Flash 1.2 | Runware Docs
url: https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images
description: "How to edit a clip with Gemini Omni Flash 1.2 and a reference image: swap a garment for virtual try-on, swap a product for ad variations, or add furniture to a room."
---
### [Introduction](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images#introduction)

Gemini Omni Flash 1.2 can **edit a clip you already have with a reference image**. The footage keeps its motion and its camera move, and **the image supplies the element** you name in the prompt. You send the clip and one product photo, with a short prompt that says what to replace.

**Source**:

[Watch video](https://runware.ai/docs/assets/source-hero.C5y6fwp6.mp4)

**Edited**:

[Watch video](https://runware.ai/docs/assets/hero.BhC_jzQF.mp4)

> **Prompt**: Replace the white running shoes she is wearing with the running shoe in the reference image, on both feet. Keep everything else the same.

**Running shoe**:

![A running shoe in side profile with a coral knit upper, a white foam midsole, a black heel tab and black laces on a white background](https://runware.ai/docs/assets/source-sneaker.CtOQbLFf_ZgQJS6.jpg)

> **Prompt**: A single running shoe in side profile facing right on a plain white background, with a coral knit upper, a thick white foam midsole, a black heel tab and black laces. Clean e-commerce packshot, soft even studio light, a faint contact shadow, no text, no logos.

The sections below use the same request to dress a model in a new garment, turn one product clip into a set of ads, and stage a room with new furniture. Edits that **need no image**, such as relighting or removing an object, are covered in [Editing video](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/editing-video). **New clips built from references** are covered in [Reference images and videos](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/reference-driven-video).

### [Request shape](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images#request-shape)

An edit takes the clip in `inputs.video`, as a URL or the UUID of an earlier generation, and the image in `inputs.referenceImages`. The payload has no `duration`, and leaving it out is what **makes the request an edit**:

**TypeScript**:

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'google:gemini@omni-flash-1.2',
  positivePrompt: 'Replace the white running shoes she is wearing with the running shoe in the reference image, on both feet. Keep everything else the same.',
  resolution: '720p',
  inputs: {
    video: 'https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-hero.mp4',
    referenceImages: [
      'https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-sneaker.jpg'
    ]
  }
})
```

**Python**:

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "google:gemini@omni-flash-1.2",
            "positivePrompt": "Replace the white running shoes she is wearing with the running shoe in the reference image, on both feet. Keep everything else the same.",
            "resolution": "720p",
            "inputs": {
                "video": "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-hero.mp4",
                "referenceImages": [
                    "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-sneaker.jpg"
                ]
            }
        })

asyncio.run(main())
```

**cURL**:

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "c83d9ca5-4a3f-473d-85ba-026089ca4bcc",
      "model": "google:gemini@omni-flash-1.2",
      "positivePrompt": "Replace the white running shoes she is wearing with the running shoe in the reference image, on both feet. Keep everything else the same.",
      "resolution": "720p",
      "inputs": {
        "video": "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-hero.mp4",
        "referenceImages": [
          "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-sneaker.jpg"
        ]
      }
    }
  ]'
```

**CLI**:

```bash
runware run google:gemini@omni-flash-1.2 \
  positivePrompt="Replace the white running shoes she is wearing with the running shoe in the reference image, on both feet. Keep everything else the same." \
  resolution=720p \
  inputs.video=https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-hero.mp4 \
  inputs.referenceImages.0=https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-sneaker.jpg
```

**JSON**:

```json
{
  "taskType": "videoInference",
  "taskUUID": "c83d9ca5-4a3f-473d-85ba-026089ca4bcc",
  "model": "google:gemini@omni-flash-1.2",
  "positivePrompt": "Replace the white running shoes she is wearing with the running shoe in the reference image, on both feet. Keep everything else the same.",
  "resolution": "720p",
  "inputs": {
    "video": "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-hero.mp4",
    "referenceImages": [
      "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-sneaker.jpg"
    ]
  }
}
```

The **source clip** runs 3 to 15 seconds, up to 32 MiB, and the reference image can be up to 4096 px per side and 20 MiB. For the output, `resolution` picks the tier from `360p` to `4K`, while `width` and `height` **are rejected** whenever `inputs.video` is in the request. The source clips in this guide are 720p generations of six to eight seconds, and every edit asks for `720p`.

> [!WARNING]
> Sending `duration` with `inputs.video` turns the request into an extension, and an extension takes no reference images. A request that has `duration`, `inputs.video` and `inputs.referenceImages` together is rejected.

### [Writing the edit prompt](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images#writing-the-edit-prompt)

Name **the element in the footage**, then **point at the image** that replaces it. Close with "Keep everything else the same.", the line Google recommends for Omni edits:

**[Element in the footage]** Replace the white running shoes she is wearing, **[Taken from the image]** with the running shoe in the reference image, on both feet., **[What stays]** Keep everything else the same.

**Refer to the image in plain words**, as in "the running shoe in the reference image". Google's guidance for Omni is to say what each image is for in natural language, without tags such as `<IMAGE_REF_0>`.

**Leave the product's description to the image**, since the packshot already shows the shoe's color and materials. The prompt names neither and spends its words on what the image cannot say: which shoes in the clip change, and that both feet do.

**Keep each prompt to one change**: Google notes that long edit prompts asking for several changes tend to alter parts of the shot nobody asked about. Every example in this guide changes one element with one image.

### [Virtual try-on](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images#virtual-try-on)

Start from **footage of a model in a garment of the same type**, here a jacket, and swap it for the one in the product photo. The walk and the turn stay as they were, so one clip can show **every jacket in a collection**.

```text
Replace the black bomber jacket she is wearing with the jacket in the reference image. Keep everything else the same.
```

**Source**:

[Watch video](https://runware.ai/docs/assets/source-tryon.DqnWClmC.mp4)

**Edited**:

[Watch video](https://runware.ai/docs/assets/output-tryon.BJDyYhy7.mp4)

> **Prompt**: Replace the black bomber jacket she is wearing with the jacket in the reference image. Keep everything else the same.

**Jacket**:

![A camel suede trucker jacket with a button front and two flap chest pockets laid flat on an off-white background, seen from above](https://runware.ai/docs/assets/source-jacket.C9K-QZ3V_Z142uJK.jpg)

> **Prompt**: A camel suede trucker jacket laid flat on a plain off-white background, photographed from directly above, front view with the sleeves straight at the sides, a button front and two flap chest pockets. Clean e-commerce flat-lay, soft even light, no hanger, no text, no logos.

Name the garment **the way it appears in the clip**, "the black bomber jacket she is wearing". The outfit has several layers, and the description points at the one to replace.

For the product image, use a **flat-lay or packshot of the whole garment** on a plain background. It gives the model the full front of the piece with nothing else in the frame.

### [Ad variations](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images#ad-variations)

One product clip can carry a whole range: the clip and the prompt stay fixed, and **only the image changes**. Each flavor is one request against the same source clip, with its own packshot:

![A matte lime green sparkling water can with a white KOVA wordmark and a lime-slice icon on a light gray background](https://runware.ai/docs/assets/source-lime._G2xr8FE_Z1dmgve.jpg)

*Lime*

> **Prompt**: A slim aluminum can of sparkling water standing upright on a plain light gray background, front view at eye level. The can is matte lime green with the white wordmark "KOVA" across the middle and a small white lime-slice icon below it, with fine beads of condensation on the metal. Clean e-commerce packshot, soft even studio light, a faint contact shadow.

![A matte pale pink sparkling water can with a white KOVA wordmark and a grapefruit-slice icon on a light gray background](https://runware.ai/docs/assets/source-grapefruit.CO1aFGhI_yVzYo.jpg)

*Grapefruit*

> **Prompt**: A slim aluminum can of sparkling water standing upright on a plain light gray background, front view at eye level. The can is matte pale pink with the white wordmark "KOVA" across the middle and a small white grapefruit-slice icon below it, with fine beads of condensation on the metal. Clean e-commerce packshot, soft even studio light, a faint contact shadow.

![A matte deep purple sparkling water can with a white KOVA wordmark and a blackberry icon on a light gray background](https://runware.ai/docs/assets/source-blackberry.D7o6JotN_26THX6.jpg)

*Blackberry*

> **Prompt**: A slim aluminum can of sparkling water standing upright on a plain light gray background, front view at eye level. The can is matte deep purple with the white wordmark "KOVA" across the middle and a small white blackberry icon below it, with fine beads of condensation on the metal. Clean e-commerce packshot, soft even studio light, a faint contact shadow.

**TypeScript**:

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'google:gemini@omni-flash-1.2',
  positivePrompt: 'Replace the white can with the can in the reference image. Keep everything else the same.',
  resolution: '720p',
  inputs: {
    video: 'https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-can.mp4',
    referenceImages: [
      'https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-lime.jpg'
    ]
  }
})
```

**Python**:

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "google:gemini@omni-flash-1.2",
            "positivePrompt": "Replace the white can with the can in the reference image. Keep everything else the same.",
            "resolution": "720p",
            "inputs": {
                "video": "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-can.mp4",
                "referenceImages": [
                    "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-lime.jpg"
                ]
            }
        })

asyncio.run(main())
```

**cURL**:

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "videoInference",
      "taskUUID": "511e785e-9623-40ca-aeef-1f1acd761206",
      "model": "google:gemini@omni-flash-1.2",
      "positivePrompt": "Replace the white can with the can in the reference image. Keep everything else the same.",
      "resolution": "720p",
      "inputs": {
        "video": "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-can.mp4",
        "referenceImages": [
          "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-lime.jpg"
        ]
      }
    }
  ]'
```

**CLI**:

```bash
runware run google:gemini@omni-flash-1.2 \
  positivePrompt="Replace the white can with the can in the reference image. Keep everything else the same." \
  resolution=720p \
  inputs.video=https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-can.mp4 \
  inputs.referenceImages.0=https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-lime.jpg
```

**JSON**:

```json
{
  "taskType": "videoInference",
  "taskUUID": "511e785e-9623-40ca-aeef-1f1acd761206",
  "model": "google:gemini@omni-flash-1.2",
  "positivePrompt": "Replace the white can with the can in the reference image. Keep everything else the same.",
  "resolution": "720p",
  "inputs": {
    "video": "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-can.mp4",
    "referenceImages": [
      "https://assets.runware.ai/guides/google-gemini-omni-flash-1-2/replacing-with-reference-images/source-lime.jpg"
    ]
  }
}
```

The grapefruit and blackberry requests are the same except for the URL in `inputs.referenceImages`. Pick **Original** to see the source clip:

**Original**:

[Watch video](https://runware.ai/docs/assets/source-can.5dXIwqZm.mp4)

> **Prompt**: A close-up of a slim matte white aluminum can with no label standing in a bed of crushed ice on a pale stone counter, beads of condensation running down the metal, bright window light from the left. A hand enters from the right, lifts the can a few inches out of the ice and turns it slowly toward the camera, then holds it still. Static camera, shallow depth of field. Single continuous shot, no scene cuts. Audio: ice shifting and a faint fizz. No music, no dialogue, no on-screen text.

**Lime**:

[Watch video](https://runware.ai/docs/assets/output-lime.ClqiAzV8.mp4)

> **Prompt**: Replace the white can with the can in the reference image. Keep everything else the same.

**Grapefruit**:

[Watch video](https://runware.ai/docs/assets/output-grapefruit.Bbr_v4Xk.mp4)

> **Prompt**: Replace the white can with the can in the reference image. Keep everything else the same.

**Blackberry**:

[Watch video](https://runware.ai/docs/assets/output-blackberry.SySSTj5O.mp4)

> **Prompt**: Replace the white can with the can in the reference image. Keep everything else the same.

Use a source clip of a **plain product with no label**, so the color and the wordmark of each variant come from its packshot alone. That is also why one prompt, "the can in the reference image", **works for the whole set**.

### [Adding an object](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images#adding-an-object)

An edit can also **bring in something the footage never had**. For virtual staging, a furniture packshot goes into an existing walkthrough of a hotel room, and the prompt opens with "Add" since nothing in the room is being replaced:

```text
Add the armchair from the reference image to the empty corner beside the window, angled toward the bed. Keep everything else the same.
```

**Source**:

[Watch video](https://runware.ai/docs/assets/source-room.eMFR_Vb6.mp4)

**Edited**:

[Watch video](https://runware.ai/docs/assets/output-add.w71-EPUi.mp4)

> **Prompt**: Add the armchair from the reference image to the empty corner beside the window, angled toward the bed. Keep everything else the same.

**Armchair**:

![A mid-century lounge armchair in mustard-yellow bouclé with a curved back and walnut legs, three-quarter view on a white background](https://runware.ai/docs/assets/source-armchair.KN64XhGP_ZAu1c7.jpg)

> **Prompt**: A mid-century lounge armchair upholstered in mustard-yellow bouclé, with a curved back, wide arms and tapered walnut legs, three-quarter front view on a plain white background. Clean e-commerce furniture packshot, soft even studio light, a faint contact shadow, no text, no logos.

Place the object **relative to something already in the shot**. "The empty corner beside the window" names one spot on the floor, and "angled toward the bed" sets which way the chair faces. Aim for **a spot that is already empty** in the source clip, like this corner, so nothing else in the room has to move.

### [Tips](https://runware.ai/docs/models/google-gemini-omni-flash-1-2/guides/replacing-with-reference-images#tips)

1. **Leave the length out of every edit.** With `duration`, the request becomes an extension, which takes no reference images.
    
2. **Name the element as it appears in the clip.** "The white running shoes she is wearing" gives the edit one clear target.
    
3. **Let the image describe the item.** Point at it in plain words and leave its color and materials to the packshot.
    
4. **Make one change per request.** For a set of variants, send one request per image with the same clip and prompt.
    
5. **Close with "Keep everything else the same."** It is the line Google recommends to hold the rest of the shot.
    
6. **Use a clean product image.** A packshot or flat-lay of the whole item on a plain background, up to 4096 px per side and 20 MiB.