# Nano Banana 제품 사진: 프롬프트 8개 실측

> Nano Banana 2.1과 Pro에 제품 사진 프롬프트 8개를 돌려 흰 배경, 라이프스타일, 플랫레이, 착용 컷, 라벨 글자를 비교했습니다.

- Canonical HTML: https://omniakey.com/ko/blog/nano-banana-product-photography
- Markdown: https://omniakey.com/ko/blog/nano-banana-product-photography.md
- Published: 2026-11-02 (updated 2026-11-02)
- Author: Kiki, COO at OmniaKey
- Language: ko
- Category: Guide
- Reading time: 10 min
- All posts: https://omniakey.com/blog/llms.txt

---

Nano Banana 제품 사진은 제품을 말로 설명하는 대신 실물 사진을 편집하고, 라벨 글자를 바꾸지 말라고 프롬프트에 적는 방식으로 만듭니다. 2026년 11월 2일 [Nano Banana 2.1](https://omniakey.com/ko/gemini-nano-banana-2-1)과 [Nano Banana Pro](https://omniakey.com/ko/gemini-3-pro-image)에 프롬프트 8개를 돌린 결과, 라벨이 있는 14장 중 13장에서 모든 글자가 그대로 남았습니다. 빗나간 한 장은 글자를 이름으로 지정하자 바로 고쳐졌습니다.

## 먼저 결론

- **프롬프트 순서:** 용도, 바꾸지 않을 것, 배경, 빛, 구도 순서로 쓰고 마지막에 정확한 글자를 적습니다.
- **모델 선택:** 둘 다 압승하지 않았으므로 Nano Banana 2.1부터 시작합니다. Google [가격 페이지](https://ai.google.dev/gemini-api/docs/pricing) 기준 2K 이미지 한 장이 $0.0504이고 Pro는 $0.134입니다(2026년 11월 2일 확인).
- **라벨과 세부 묘사:** 물, 손, 소품이 제품에 가까이 오면 정확한 글자와 방향, 색을 프롬프트에 적습니다.
- **공개 전:** 이미지마다 실물과 비교합니다. 저희 실행에서는 신발이 좌우 반전됐고 커피 필터가 한 장 더 생겼습니다.

## Nano Banana 제품 사진 프롬프트 쓰는 법

실물 사진에서 출발해 아래 순서로 프롬프트를 씁니다. Google의 제품 컷 템플릿은 제품, 받침, 조명을 지정하는 방식이고([이미지 생성 가이드](https://ai.google.dev/gemini-api/docs/image-generation), 2026년 11월 2일 확인), 편집할 때는 바뀌면 안 되는 부분을 자세히 쓰라고 안내합니다.

|부분|적을 내용|저희가 보낸 프롬프트|
|-|-|-|
|용도|이 이미지를 어디에 쓰는지|"Turn this phone photo into a clean e-commerce main image."|
|바꾸지 않을 것|제품, 라벨, 모든 글자|"Keep the bottle, the dropper and every word on the label exactly as they are."|
|배경 또는 장면|흰색, 방, 표면|"a pure white background (#FFFFFF)"|
|빛|방향, 부드러움, 그림자|"Even studio lighting from the front and both sides"|
|구도|각도, 잘라낼 범위, 화면을 채우는 비율|"Center the bottle, straight on, filling about 85% of the frame height."|
|정확한 글자|어떤 글자를 어떻게|"the headline "Roasted every Monday" in a bold cream serif font"|

화면 높이 85%는 저희가 정한 구도이고, 쇼핑 플랫폼의 규정이 아닙니다.

## 어떻게 시험했나

모든 프롬프트는 2026년 11월 2일 OmniaKey API로 2K 원본 이미지를 두 모델에서 편집하는 방식으로 돌렸습니다. 프롬프트 6은 모델마다 두 번씩 돌려 총 18회 편집했고 실패는 없었습니다. 호출 시간 중앙값은 2.1이 41.9초, Pro가 46.0초입니다.

원본 사진은 휴대폰으로 찍은 것처럼 보이지만 [GPT Image 2](https://omniakey.com/ko/gpt-image-2)가 만들었고, AURELLE과 HILLTOP ROAST는 가상 브랜드입니다. 라벨은 모두 원본 크기로 눈으로 확인했습니다. 생성된 사진에 프롬프트당 1\~2회 실행한 결과이므로, 직접 촬영한 사진에서는 결과가 다를 수 있습니다.

![원본 이미지 세 장. 주방 조리대 위의 호박색 세럼 병, 나무 바닥 위 민트색 밑창의 흰색 스니커, 책상 위 크라프트 커피 봉투.](https://omniakey.com/_img/blog/nano-banana-product-photography/sources.cf7e6417.2400.webp)

_원본 이미지 세 장. 휴대폰 사진처럼 보이지만 GPT Image 2가 만들었고 브랜드는 가상입니다. 2026년 11월 2일 제작._

이미지에 찍힌 시간은 각 호출에 걸린 시간입니다.

## 프롬프트 8개와 결과

각 레시피는 저희가 보낸 프롬프트와 원본 크기로 본 결과입니다.

### 1. 흰 배경 대표 이미지

쇼핑 목록에 쓰는 대표 이미지입니다. 흰 배경에 병을 세웁니다.

```prompt
Turn this phone photo into a clean e-commerce main image. Keep the bottle, the dropper and every word on the label exactly as they are. Place it on a pure white background (#FFFFFF) with only a soft, natural contact shadow under the base. Even studio lighting from the front and both sides, no reflections of the kitchen in the glass. Center the bottle, straight on, filling about 85% of the frame height.
```

![두 모델이 만든 흰 배경 세럼 병. Nano Banana 2.1의 배경은 순수한 흰색이고 Nano Banana Pro의 배경은 위쪽이 연한 회색입니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t1-compare.56733ec2.1872.webp)

_왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 1:1, 2K, 2026년 11월 2일 제작._

설정: 편집, 1:1, 2K, 세럼 사진. Nano Banana 2.1 32.5초, Pro 38.2초.

2.1은 표본으로 잡은 배경 7곳이 모두 정확히 #FFFFFF였습니다. Pro는 왼쪽 위 #F0EEF1에서 오른쪽 아래 #FCFBFB로 가는 연한 회색이었고 라벨 글자는 정확했습니다.

팁: Pro에서는 "solid pure white (#FFFFFF) from edge to edge, with no gradient"라고 지정합니다.

### 2. 헤드라인 자리를 남긴 스튜디오 히어로 컷

헤드라인을 넣을 여백이 있는 히어로 이미지입니다.

```prompt
Use the serum bottle in this photo as the product for a premium studio hero shot. The bottle stands on a terracotta-colored stone block in front of a warm sand-colored seamless backdrop. A single hard key light from the upper left casts a crisp diagonal shadow to the right, and a thin rim light traces the edge of the amber glass. Keep the label text "AURELLE", "Vitamin C Serum" and "30 ml" unchanged. Leave clear empty space above the bottle for a headline.
```

![두 모델이 만든 세럼 병. 테라코타 색 석재 블록과 모래색 배경, 비스듬한 강한 그림자, 위쪽 여백.](https://omniakey.com/_img/blog/nano-banana-product-photography/t2-compare.70baf513.1522.webp)

_왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 4:5, 2K, 2026년 11월 2일 제작._

설정: 편집, 4:5, 2K, 세럼 사진. Nano Banana 2.1 35.3초, Pro 44.8초.

두 모델 모두 테라코타 블록, 모래색 배경, 비스듬한 그림자, 위쪽 여백을 냈고 라벨 글자도 정확했습니다.

### 3. 욕실 선반의 라이프스타일 컷

제품 페이지에 쓰는 라이프스타일 컷입니다.

```prompt
Place this exact serum bottle on a white marble bathroom shelf next to a folded oatmeal linen towel and a small sprig of eucalyptus. Soft morning sunlight comes through a frosted window on the right and casts gentle leaf shadows across the shelf. Shallow depth of field: the bottle is the sharpest thing in the frame, with the label facing the camera and fully readable. Photorealistic, shot like an 85 mm lens at eye level.
```

![두 모델이 만든 라이프스타일 컷. 흰 대리석 선반 위 세럼 병 옆에 개어 둔 린넨 타월과 유칼립투스, 부드러운 창빛.](https://omniakey.com/_img/blog/nano-banana-product-photography/t3-compare.4563687f.1522.webp)

_왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 4:5, 2K, 2026년 11월 2일 제작._

설정: 편집, 4:5, 2K, 세럼 사진. Nano Banana 2.1 82.9초, Pro 43.3초.

두 모델 모두 병을 대리석 선반에 놓고 타월과 유칼립투스, 부드러운 창빛을 살렸고 라벨도 읽혔습니다. 2.1의 82.9초 호출은 네트워크 오류를 한 번 기록했지만 끝까지 완료됐습니다.

### 4. 위에서 내려다본 플랫레이

커피 소품을 곁들인 위에서 내려다본 플랫레이입니다.

```prompt
Create an overhead flat lay for a coffee shop's product page using this coffee bag. Lay the bag flat in the center of a light oak table, surrounded by a ceramic pour-over dripper, a small pile of roasted coffee beans, a white cup of black coffee and a folded paper filter. Soft daylight from the top of the frame, gentle shadows, balanced spacing, nothing touching the edges. Keep the label design and all of its text exactly as in the photo.
```

![두 모델이 만든 플랫레이. 밝은 오크 책상 위 커피 봉투. Nano Banana 2.1은 흰 도자기 드리퍼와 종이 필터 두 장, Nano Banana Pro는 필터를 넣은 머그 같은 드리퍼에 여백이 더 많습니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t4-compare.894b0a7f.1872.webp)

_왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 1:1, 2K, 2026년 11월 2일 제작._

설정: 편집, 1:1, 2K, 커피 봉투 사진. Nano Banana 2.1 45.1초, Pro 48.4초.

라벨은 둘 다 정확했습니다. 2.1은 도자기 드리퍼를 제대로 그렸지만 종이 필터가 두 장이었습니다. Pro는 필터를 넣은 머그처럼 보였고 여백이 더 많았습니다.

### 5. 러너의 발

스포츠 광고에 쓰는 사용 컷입니다.

```prompt
Show this exact sneaker being worn by a runner mid-stride on a red running track at golden hour. Crop from the knee down with the camera low near the ground. The shoe is in sharp focus and keeps the white upper, the mint-green sole, laces and heel tab from the photo; the track lines behind are blurred with motion. Photorealistic sports campaign look, no logos added.
```

![두 모델이 만든 스니커. 노을 진 빨간 트랙 위 흰색 신발. Nano Banana 2.1은 정면에서 두 발과 먼지, Nano Banana Pro는 옆에서 한 발과 움직임 흐림.](https://omniakey.com/_img/blog/nano-banana-product-photography/t5-compare.892dc9ad.2400.webp)

_왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 3:2, 2K, 2026년 11월 2일 제작._

설정: 편집, 3:2, 2K, 스니커 사진. Nano Banana 2.1 29.8초, Pro 50.8초.

두 모델 모두 색이 맞았고 로고도 추가하지 않았습니다. 2.1은 정면에서 두 발을 그렸고 먼지가 일었습니다. Pro는 옆에서 한 발을 그렸고 움직임 흐림을 넣어 민트색 힐 탭을 지키며 원본에 더 가까웠습니다.

팁: 힐이 사진과 같아야 한다면 Pro를 씁니다.

### 6. 글자가 들어간 소셜 광고

헤드라인과 서브라인을 넣은 정사각형 소셜 광고입니다.

```prompt
Make a square social media ad for this coffee bag. Put the bag on the right side of the frame on a deep forest-green background with a few scattered coffee beans. On the left, set the headline "Roasted every Monday" in a bold cream serif font, and under it, in smaller cream sans-serif text, "Free shipping over $30". Keep the bag's own label unchanged. Clean layout with generous margins and no other text.
```

![정사각형 광고 네 장. 짙은 초록 배경에 커피 봉투, 헤드라인은 Roasted every Monday. Nano Banana Pro 1회차는 서브라인이 두 줄로 접혔고 Nano Banana 2.1 2회차는 바닥이 짙은 남색입니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t6-compare.b17a943f.2072.webp)

_모델마다 두 번. 왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 1:1, 2K, 2026년 11월 2일 제작._

설정: 편집, 1:1, 2K, 커피 봉투 사진. Nano Banana 2.1 46.5초와 41.9초, Pro 33.5초와 46.0초.

네 장 모두 헤드라인, 서브라인, 라벨이 정확했습니다. Pro 1회차는 서브라인이 두 줄로 접혔고, 2.1 2회차는 바닥이 짙은 남색이 되어 숲 초록이 아니었습니다.

팁: [Google의 프롬프트 팁](https://blog.google/products-and-platforms/products/gemini/prompting-tips-nano-banana-pro/)은 정확한 글자와 그 모양을 지정하라고 안내합니다.

### 7. 신발 한 켤레로 컬러웨이 세 가지

제품 페이지에 쓰는 세 가지 컬러웨이 라인업입니다.

```prompt
Using this sneaker as the base design, create a product lineup of three colorways side by side on a light gray studio background: on the left the original white with mint-green sole and laces, in the middle an all-black version with a white sole, on the right a sand-beige version with a brown sole. Same side-profile angle and same size for all three, evenly spaced, soft shadows under each. Keep the shape, stitching and sole pattern identical to the photo.
```

![두 모델이 만든 세 가지 컬러웨이. Nano Banana 2.1은 원본처럼 신발 앞코가 오른쪽. Nano Banana Pro는 세 켤레 모두 좌우 반전되어 왼쪽을 봅니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t7-compare.0eb8ec77.2400.webp)

_왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 16:9, 2K, 2026년 11월 2일 제작._

설정: 편집, 16:9, 2K, 스니커 사진. Nano Banana 2.1 76.1초, Pro 66.6초.

색은 둘 다 맞았습니다. 2.1은 앞코를 오른쪽으로 유지하고 음각 마크도 지켰습니다. Pro는 세 켤레를 모두 반전하고 마크를 없앴습니다.

팁: "every toe pointing right exactly as in the photo"와 "Do not mirror the shoe"를 넣습니다.

### 8. 물보라 컷

물보라를 넣은 광고 컷입니다.

```prompt
Create a bold advertising shot of this serum bottle: it stands in a shallow pool of clear water while a crown of water splashes up around it, frozen in mid-air, with two thin orange slices floating nearby. Bright citrus-orange gradient background, high-speed flash lighting, every droplet crisp. Keep the bottle, the dropper and the label exactly as in the photo.
```

![두 모델이 만든 물보라 컷. 물기둥 가운데 선 세럼 병과 옆에 뜬 오렌지 슬라이스. Nano Banana 2.1은 물이 라벨 아래쪽을 덮어 작은 글자가 뭉개졌고 Nano Banana Pro는 라벨 전체가 읽힙니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t8-compare.6e99f228.1522.webp)

_왼쪽 Nano Banana 2.1, 오른쪽 Nano Banana Pro. OmniaKey API, 편집, 4:5, 2K, 2026년 11월 2일 제작._

설정: 편집, 4:5, 2K, 세럼 사진. Nano Banana 2.1 35.8초, Pro 54.2초.

2.1은 물이 라벨 아래쪽을 덮어 "30 ml"가 뭉개졌고 배경도 "bright citrus-orange"보다 어두웠습니다. Pro는 라벨 글자가 모두 읽혔습니다.

팁: 물이 라벨을 덮을 수 있을 때는 라벨의 글자를 프롬프트에 적습니다.

## 실패 세 가지와 고친 표현

실패는 모두 모델은 그대로 두고 프롬프트를 바꾼 직후에 고쳐졌습니다. Google은 자사 모델이 "작은 얼굴, 정확한 철자, 미세한 디테일은 여전히 어려워할 수 있다"고 경고하고([DeepMind 모델 페이지](https://deepmind.google/models/gemini-image/pro/)), Google 포럼의 한 사용자는 2025년 9월 30일에 "제품을 '완전히 똑같이' 유지하라고 프롬프트에서 강조해도 로고는 바뀐다"고 썼습니다([포럼 글](https://discuss.ai.google.dev/t/106665)).

### 물이 라벨을 뭉갰다

2.1에서는 물이 라벨 아래쪽을 덮어 "30 ml"가 뭉개졌습니다.

```prompt
Create a bold advertising shot of this serum bottle: it stands in a shallow pool of clear water while a crown of water splashes up around it, frozen in mid-air, with two thin orange slices floating nearby. Bright citrus-orange gradient background, high-speed flash lighting, every droplet crisp. Keep the bottle and the dropper exactly as in the photo. The label stays dry, fully visible above the splash and faces the camera. It reads "AURELLE", "Vitamin C Serum" and "30 ml", with no other text on it.
```

![Nano Banana 2.1의 물보라 이미지 세 장. 원래 프롬프트는 작은 글자가 뭉개졌고 라벨 글자를 지정한 두 번은 물 위에서 라벨 글자가 모두 읽힙니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t8-fix.05c8c321.2271.webp)

_Nano Banana 2.1, OmniaKey API, 편집, 4:5, 2K, 2026년 11월 2일 제작._

두 번 모두 라벨 세 줄이 또렷했고(42.0초와 29.2초) 배경도 더 밝았습니다.

### 신발이 좌우 반전됐다

Pro에서는 세 켤레가 모두 반전되어 앞코가 왼쪽을 향했고 음각 마크도 사라졌습니다.

```prompt
Using this sneaker as the base design, create a product lineup of three colorways side by side on a light gray studio background: on the left the original white with mint-green sole and laces, in the middle an all-black version with a white sole, on the right a sand-beige version with a brown sole. Same side-profile angle and same size for all three, every toe pointing right exactly as in the photo, evenly spaced, soft shadows under each. Do not mirror the shoe. Keep the shape, stitching, the embossed mark on the side of the heel and the sole pattern identical to the photo.
```

![Nano Banana Pro의 라인업 두 장. 원래 프롬프트는 신발이 왼쪽을 보고 다시 쓴 프롬프트는 앞코가 모두 오른쪽입니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t7-fix.5b2596f1.2400.webp)

_Nano Banana Pro, OmniaKey API, 편집, 16:9, 2K, 2026년 11월 2일 제작._

세 켤레 모두 앞코가 오른쪽을 향했고 민트색 힐 탭과 음각 마크도 남았습니다(32.0초). 원본의 신발끈 리본은 단정한 교차 끈으로 바뀌었습니다.

### 흰 배경이 회색으로 나왔다

Pro에서는 배경이 #F0EEF1에서 #FCFBFB로 가는 연한 회색 그라데이션이었습니다.

```prompt
Turn this phone photo into a clean e-commerce main image. Keep the bottle, the dropper and every word on the label exactly as they are. The background is solid pure white (#FFFFFF) from edge to edge, with no gradient, no vignette and no gray in the corners. The only shadow is a soft, natural contact shadow directly under the base. Even studio lighting from the front and both sides, no reflections of the kitchen in the glass. Center the bottle, straight on, filling about 85% of the frame height.
```

![Nano Banana Pro의 흰 배경 두 장. 원래 프롬프트는 연한 회색 그라데이션이고 다시 쓴 프롬프트는 순수한 흰색입니다.](https://omniakey.com/_img/blog/nano-banana-product-photography/t1-fix.891a36bf.1872.webp)

_Nano Banana Pro, OmniaKey API, 편집, 1:1, 2K, 2026년 11월 2일 제작._

표본 7곳이 모두 #FFFFFF가 됐고(이전에는 #F0EEF1–#FCFBFB) 라벨도 정확했습니다(31.6초).

세 수정은 모두 지켜야 할 것을 말로 지정했습니다. 라벨 글자, 앞코 방향, 정확한 색입니다. 물보라 수정은 두 번 모두 통했고 나머지 두 수정은 각각 한 번씩 돌렸습니다. 같은 포럼의 사용자는 2026년 6월에 4K 흰 배경에서 흐릿한 사각형을 보고했으므로([글 171932](https://discuss.ai.google.dev/t/171932)), 4K 흰 배경은 쓰기 전에 확대해서 확인합니다.

## 제품 사진은 Nano Banana 2.1과 Pro 중 무엇인가

어느 한쪽이 압승하지 않았습니다. 프롬프트 8개에서 각각 2승, 3개는 무승부, 1개는 엇갈렸습니다.

|작업|저희 실행에서 더 나은 쪽|
|-|-|
|흰 배경|Nano Banana 2.1|
|스튜디오 히어로|무승부|
|라이프스타일|무승부|
|플랫레이|엇갈림|
|러너의 발|Nano Banana Pro|
|광고 글자|무승부|
|컬러웨이|Nano Banana 2.1|
|물보라|Nano Banana Pro|

Google의 정가(2026년 11월 2일 확인)는 2K 이미지 한 장이 2.1에서 $0.0504, Pro에서 $0.134입니다. Pro는 1K와 2K가 같은 가격이고 4K만 더 비쌉니다. 호출 시간 중앙값은 2.1이 41.9초, Pro가 46.0초입니다.

Nano Banana 2.1부터 시작합니다. 가격이 낮고 저희 실행에서 흰 배경과 컬러웨이를 이겼습니다. 한 장이 실패하면 모델보다 표현을 먼저 바꿉니다. 세 실패 모두 그렇게 고쳐졌습니다.

제품 컷 밖의 넓은 비교는 [Nano Banana 2.1 vs Pro](https://omniakey.com/ko/blog/nano-banana-2-1-vs-pro)에 정리했습니다. OmniaKey의 현재 요금은 [Nano Banana 2.1](https://omniakey.com/ko/gemini-nano-banana-2-1)과 [Nano Banana Pro](https://omniakey.com/ko/gemini-3-pro-image) 모델 페이지에서 확인합니다.

## API로 이 프롬프트 실행하기

코드 없이 쓰려면 사진을 참조 이미지로 [AI 이미지 생성기](https://omniakey.com/ko/ai-image-generator)에 넣습니다. API에서는 OmniaKey [미디어 API 문서](https://docs.omniakey.com/en/media/overview)의 흐름이 생성, 폴링, 다운로드입니다. `POST /v1/media/tasks`가 작업 id를 돌려주고 `GET /v1/media/tasks/{id}`로 끝날 때까지 진행 상황을 확인합니다. 본문에는 `model`, `type`, `operation`, `input`, `parameters`가 들어가고 요청에는 `Idempotency-Key` 헤더가 필요합니다.

```python
"""Edit one product photo with Nano Banana through the OmniaKey media API.

Usage:
    export OMNIAKEY_API_KEY="your-omniakey-api-key"
    python3 nb_product_edit.py photo.jpg prompt.txt product.jpg

The photo is a JPEG under 700 KB, sent inline as Base64.
"""
import base64
import json
import os
import sys
import time
import urllib.error
import urllib.request
import uuid

API = "https://api.omniakey.com/v1/media/tasks"
MODEL = "gemini-nano-banana-2.1"  # or "gemini-3-pro-image" for Nano Banana Pro
HEADERS = {
    "Authorization": "Bearer " + os.environ["OMNIAKEY_API_KEY"],
    "Content-Type": "application/json",
    "User-Agent": "nano-banana-product-example/1.0",
}
POLL_SECONDS = 5
GIVE_UP_AFTER = 5 * 60  # most of our edits finished in under 90 seconds


def call(method, url, body=None, extra_headers=None):
    data = json.dumps(body).encode() if body is not None else None
    req = urllib.request.Request(url, data=data, method=method, headers={**HEADERS, **(extra_headers or {})})
    for attempt in range(3):
        try:
            with urllib.request.urlopen(req, timeout=60) as resp:
                return json.load(resp)
        except urllib.error.HTTPError as err:
            sys.exit(f"HTTP {err.code}: {err.read().decode(errors='replace')}")
        except (urllib.error.URLError, TimeoutError, ConnectionError) as err:
            if attempt == 2:
                raise
            print("network error, retrying:", err)  # a retried POST keeps its Idempotency-Key
            time.sleep(5)


def main(photo, prompt_file, out_path):
    raw = open(photo, "rb").read()
    if len(raw) > 700_000:  # Base64 adds a third, and the whole request must stay under 1 MiB
        sys.exit("The photo is over 700 KB. Resize it first, for example to 1024 px on the long side.")
    task = call("POST", API, {
        "model": MODEL,
        "type": "image",
        "operation": "edit",
        "input": {
            "prompt": open(prompt_file, encoding="utf-8").read().strip(),
            "image": {"data": base64.b64encode(raw).decode(), "mime_type": "image/jpeg"},
        },
        "parameters": {"aspect_ratio": "1:1", "image_size": "2K"},
    }, {"Idempotency-Key": str(uuid.uuid4())})
    print("task", task["id"], task["status"])

    start = time.time()
    while task["status"] in ("queued", "processing"):
        if time.time() - start > GIVE_UP_AFTER:
            sys.exit(f"Still {task['status']} after 5 minutes. Do not submit it again; "
                     f"check it later with GET {API}/{task['id']}")
        time.sleep(POLL_SECONDS)
        task = call("GET", f"{API}/{task['id']}")
    print(task["status"], "after", round(time.time() - start), "s")
    if task["status"] != "succeeded":
        sys.exit(json.dumps(task.get("error") or task))

    # The signed download URL is short-lived, so save the file right away.
    asset = task["assets"][0]
    req = urllib.request.Request(asset["url"], headers={"User-Agent": HEADERS["User-Agent"]})
    with urllib.request.urlopen(req, timeout=120) as resp, open(out_path, "wb") as f:
        f.write(resp.read())
    print("saved", out_path, asset.get("mime_type"))


if __name__ == "__main__":
    main(*sys.argv[1:4])
```

```bash
export OMNIAKEY_API_KEY="your-omniakey-api-key"
python3 nb_product_edit.py photo.jpg prompt.txt product.jpg
```

```text
task task_UdWluqJc0prstORG3z2PpK51OhMrW3Oc queued
succeeded after 25 s
saved data/t1-check.jpg image/jpeg
```

- 한 번 실행, 2.1의 흰 배경 프롬프트: 158,554바이트 1024 px JPEG를 넣고 739,044바이트 2048×2048 JPEG를 받았습니다.
- 요청 전체는 Base64 사진을 포함해 1 MiB 안에 들어가야 하므로 스크립트는 700 KB에서 멈춥니다.
- 작업이 바뀌면 `aspect_ratio`와 `MODEL`을 바꿉니다. 저희 실행에서는 1:1, 4:5, 3:2, 16:9를 썼습니다. Google의 [Nano Banana 2.1 모델 페이지](https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1)에는 4:1과 8:1 배너가 있고 Pro의 10가지 비율에는 둘 다 없습니다.
- Google 모델은 보통 JPEG를 돌려줍니다. 실제 형식은 `assets[].mime_type`에 있습니다.
- 이 파일은 한 번 돌렸고 나머지 편집은 같은 API를 쓰는 배치 도구로 했습니다.

## 자주 묻는 질문

### Nano Banana가 로고와 라벨 글자를 지켜 주나요?

대부분 지킵니다. 라벨이 있는 14장 중 13장에서 모든 글자가 남았고 빗나간 한 장은 글자를 지정하자 고쳐졌습니다. Google의 편집 조언은 로고를 아주 자세히 설명해 편집 요청과 함께 전하는 것입니다. 제한 사항 안내에서도 철자와 미세한 디테일을 언급합니다. 라벨 글자를 프롬프트에 적고 이미지는 원본 크기로 확인합니다.

### Nano Banana 제품 사진에 워터마크가 있나요?

API가 만든 이미지에는 보이지 않는 SynthID 표시가 들어가므로 워터마크는 보이지 않습니다. Google은 2025년 11월 Pro 발표에서 Gemini 앱의 무료 사용자와 Google AI Pro 사용자 이미지에는 눈에 보이는 Gemini 반짝임이 남고 AI Ultra 구독자와 Google AI Studio에서는 사라진다고 밝혔습니다([발표 글](https://blog.google/innovation-and-ai/products/nano-banana-pro/)).

### 이 이미지를 제 쇼핑몰에 써도 되나요?

Google의 [Gemini API 약관](https://ai.google.dev/gemini-api/terms)은 생성 이미지의 소유권을 주장하지 않지만 다른 사람에게 같거나 비슷한 결과를 만들 수 있고, 사용 방식의 책임은 사용자에게 있습니다. [금지 사용 정책](https://policies.google.com/terms/generative-ai/use-policy)은 사람이 직접 만들었다고 속여 오해하게 하는 행위와, 법적 동의 없이 개인 데이터나 생체 정보를 쓰는 행위를 금지합니다. 이미지는 실물과도 비교합니다. 저희 실행에서는 신발이 반전됐고 커피 필터가 한 장 더 생겼습니다.

### 참조 이미지는 몇 장까지 쓸 수 있나요?

Google은 한 요청에 참조 이미지를 최대 14장까지 허용하고 모델별로 나눕니다. 2.1은 사물 10장과 인물 4장, Pro는 사물 6장, 인물 5장, 스타일 참조 3장입니다. OmniaKey는 Base64 이미지를 포함한 요청 전체를 1 MiB로 제한하므로 참조 이미지가 여러 장이면 각각 작게 만듭니다.

### Nano Banana 2는 아직 쓸 수 있나요?

지금은 쓸 수 있습니다. Google은 2026년 10월 6일 [Nano Banana 2](https://omniakey.com/ko/gemini-3-1-flash-image)(`gemini-3.1-flash-image`)를 폐기 예정으로 표시하고 종료일은 밝히지 않았으며 [Nano Banana 2.1](https://omniakey.com/ko/blog/nano-banana-2-1-review)로 옮기라고 안내합니다([변경 기록](https://ai.google.dev/gemini-api/docs/changelog)). 정가는 Google 가격 페이지에 남아 있습니다(2026년 11월 2일 확인).

## 확인한 자료

- [Gemini로 이미지 생성](https://ai.google.dev/gemini-api/docs/image-generation), 2026년 11월 2일 확인
- [Gemini API 변경 기록](https://ai.google.dev/gemini-api/docs/changelog), 2026년 11월 2일 확인
- [Nano Banana 2.1 모델 페이지](https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1), 2026년 11월 2일 확인
- [Gemini API 가격](https://ai.google.dev/gemini-api/docs/pricing), 2026년 11월 2일 확인
- [Nano Banana Pro 발표 글](https://blog.google/innovation-and-ai/products/nano-banana-pro/), 2026년 11월 2일 확인
- [DeepMind Gemini Image Pro 페이지](https://deepmind.google/models/gemini-image/pro/), 2026년 11월 2일 확인
- [Nano Banana Pro 프롬프트 팁](https://blog.google/products-and-platforms/products/gemini/prompting-tips-nano-banana-pro/), 2026년 11월 2일 확인
- [Gemini API 추가 약관](https://ai.google.dev/gemini-api/terms), 2026년 11월 2일 확인
- [생성 AI 금지 사용 정책](https://policies.google.com/terms/generative-ai/use-policy), 2026년 11월 2일 확인
- [포럼: 흰 배경 글](https://discuss.ai.google.dev/t/171932), 2026년 11월 2일 확인
- [포럼: 로고가 바뀌는 글](https://discuss.ai.google.dev/t/106665), 2026년 11월 2일 확인

OmniaKey 자체 문서, 2026년 11월 2일 확인: [이미지 API](https://docs.omniakey.com/en/media/image)와 [미디어 API 개요](https://docs.omniakey.com/en/media/overview).
