image-ecommerce

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

image-ecommerce

image-ecommerce

Use this skill for all e-commerce product photography requests on Starchild.
Covers: white-background hero shots, lifestyle product scenes, flat lay arrangements, detail/macro close-ups, packaging/unboxing shots, group/collection displays, scale reference images, seasonal themes (spring/summer/autumn/winter), 360-degree views, comparison layouts, infographic-style feature callouts, and platform-optimized images for Amazon, Shopify, Taobao, Instagram, Xiaohongshu, Etsy, eBay.
Core principle: call the provided script. Do not re-implement proxy/billing plumbing.
When to use image-ecommerce vs other image skills:
  • image-ecommerce → user wants PRODUCT PHOTOS for e-commerce, catalogs, or marketing
  • image-edit → user wants to EDIT or TRANSFORM an existing image (not product-specific)
  • image-portrait → user wants a portrait with their face/identity preserved
  • image-create → user wants to CREATE something from text (not product photography)
  • image-tryon → user wants to try on clothing/accessories on a person

在Starchild平台上,所有电商产品摄影需求均可使用此skill。
涵盖:白底主图、产品生活场景图、平铺俯拍布局、细节/微距特写图、包装/开箱展示图、产品组/系列展示图、尺寸参考图、季节主题图(春/夏/秋/冬)、360°全景图、对比布局图、信息图表式功能标注图,以及针对Amazon、Shopify、淘宝、Instagram、小红书、Etsy、eBay优化的平台适配图片。
**核心原则:**调用提供的脚本,请勿重新实现代理/计费相关逻辑。
何时选择image-ecommerce而非其他图片类skill:
  • image-ecommerce → 用户需要用于电商、产品目录或营销活动的产品照片
  • image-edit → 用户需要编辑或转换现有图片(非产品摄影专属)
  • image-portrait → 用户需要保留面部/身份特征的肖像照
  • image-create → 用户需要根据文本生成内容(非产品摄影)
  • image-tryon → 用户需要将服饰/配饰试穿在人物身上

1. Quick start — single product photo (most common)

1. 快速入门 — 单张产品照片(最常用)

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/product.jpg",
    style="hero",
    background="white",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/product.jpg",
    style="hero",
    background="white",
)

result -> {"success": True, "images": [{"local_path": "output/images/..."}], ...}

result -> {"success": True, "images": [{"local_path": "output/images/..."}], ...}


The script reads the local file, base64-encodes it, and sends it to fal.ai as a data URI — no manual URL publishing needed.

该脚本会读取本地文件,将其base64编码后以数据URI形式发送至fal.ai,无需手动发布URL。

2. Quick start — public URL

2. 快速入门 — 公共URL

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_url="https://example.com/product.jpg",
    style="lifestyle",
    background="natural",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_url="https://example.com/product.jpg",
    style="lifestyle",
    background="natural",
)

3. Quick start — text-to-image (no product photo)

3. 快速入门 — 文本生成图片(无产品照片)

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    prompt="premium wireless bluetooth headphones, matte black finish, over-ear design",
    style="hero",
    background="white",
)
When no
product_path
or
product_url
is provided, the script uses the text-to-image endpoint (no
/edit
suffix). A
prompt
describing the product is required in this mode.
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    prompt="premium wireless bluetooth headphones, matte black finish, over-ear design",
    style="hero",
    background="white",
)
当未提供
product_path
product_url
时,脚本会使用文本生成图片接口(无
/edit
后缀)。此模式下必须提供描述产品的
prompt

4. Quick start — platform-optimized

4. 快速入门 — 平台适配优化

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/product.jpg",
    platform="amazon",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/product.jpg",
    platform="amazon",
)

Automatically applies: style=hero, background=white, aspect_ratio=1:1

自动应用:style=hero, background=white, aspect_ratio=1:1

undefined
undefined

5. Quick start — complete product image set

5. 快速入门 — 完整产品图片套装

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
    product_path="uploads/product.jpg",
    prompt="premium leather wallet",
    platform="amazon",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
    product_path="uploads/product.jpg",
    prompt="premium leather wallet",
    platform="amazon",
)

Generates 7 images: hero, lifestyle, detail, scale, alternate angle, packaging, flat lay

生成7张图片:主图、生活场景图、细节图、尺寸参考图、多角度图、包装图、平铺俯拍图

undefined
undefined

Delivering the result to the user — IMPORTANT

向用户交付结果 — 重要提示

Never hand the user the raw fal.media URL. fal serves files with restrictive CSP headers. The only reliable delivery path is the already-downloaded local file:
  1. Use each image's
    local_path
    (e.g.
    output/images/xxx.png
    ) — the script always downloads on success.
  2. Tell the user the files are saved to
    output/images/
    and viewable in the workspace file panel.
  3. On Web channel, embed inline so the user can preview in chat:
    markdown
    ![product](output/images/<filename>.png)
  4. On Telegram / WeChat: send via
    send_to_telegram(file_path="output/images/...", message_type="image")
    or
    send_to_wechat(file_path="output/images/...", message_type="image")
    .

切勿直接将原始fal.media URL交给用户。fal提供的文件带有严格的CSP头,唯一可靠的交付方式是已下载的本地文件
  1. 使用每张图片的
    local_path
    (例如
    output/images/xxx.png
    )——脚本在执行成功后总会自动下载文件。
  2. 告知用户文件已保存至
    output/images/
    ,可在工作区文件面板中查看。
  3. 在Web渠道中,将图片嵌入聊天内容以便用户预览:
    markdown
    ![product](output/images/<filename>.png)
  4. 在Telegram/微信渠道中,通过
    send_to_telegram(file_path="output/images/...", message_type="image")
    send_to_wechat(file_path="output/images/...", message_type="image")
    发送图片。

6. Parameters —
product_photo()

6. 参数说明 —
product_photo()

ParameterRequiredDefaultDescription
product_path
noLocal workspace file path to the product image
product_url
noPublic HTTPS URL of the product image
prompt
noCustom prompt describing the product or desired photo
style
no
"hero"
Photography style preset (see §7)
background
no
"white"
Background type (see §8)
model
no
"nanopro"
Model:
"nanopro"
(fast ~25s) or
"gpt"
(best quality ~150s)
count
no
1
Number of images to generate (1–8)
aspect_ratio
no
"1:1"
Output ratio:
1:1
,
3:4
,
4:3
,
9:16
,
16:9
platform
noPlatform preset:
amazon
,
shopify
,
taobao
,
instagram
,
xiaohongshu
,
etsy
,
ebay
Image input rules:
  • Provide
    product_path
    OR
    product_url
    for edit mode (transform existing product photo).
  • If both are given,
    product_path
    takes priority.
  • Omit both for pure text-to-image generation (requires
    prompt
    ).
Prompt priority:
prompt + style/background
(enhanced) >
style + background
templates.
Platform preset: When
platform
is set, it overrides default
style
,
background
, and
aspect_ratio
with platform-optimized values — unless you explicitly set them.

参数必填默认值描述
product_path
产品图片在本地工作区的文件路径
product_url
产品图片的公开HTTPS URL
prompt
描述产品或期望照片效果的自定义提示词
style
"hero"
摄影风格预设(见第7节)
background
"white"
背景类型(见第8节)
model
"nanopro"
模型选项:
"nanopro"
(快速,约25秒)或
"gpt"
(最佳画质,约150秒)
count
1
生成图片数量(1–8张)
aspect_ratio
"1:1"
输出比例:
1:1
,
3:4
,
4:3
,
9:16
,
16:9
platform
平台预设:
amazon
,
shopify
,
taobao
,
instagram
,
xiaohongshu
,
etsy
,
ebay
图片输入规则:
  • 若要使用编辑模式(转换现有产品照片),需提供
    product_path
    product_url
  • 若同时提供两者,
    product_path
    优先级更高。
  • 若两者都不提供,则启用纯文本生成图片模式(需提供
    prompt
    )。
提示词优先级:
prompt + 风格/背景
(增强版) >
风格 + 背景
模板。
平台预设: 设置
platform
后,会使用平台优化值覆盖默认的
style
background
aspect_ratio
——除非你显式指定这些参数。

7. Photography styles

7. 摄影风格

Core product shots

核心产品照片

StyleKeyBest for
Hero shot
hero
Primary listing image, magazine ads, main product display
Lifestyle
lifestyle
Product in use, editorial, social media
Flat lay
flat_lay
Instagram, top-down arrangement, catalog
Detail close-up
detail
Material quality, texture, craftsmanship
Packaging
packaging
Unboxing experience, brand packaging
Group/collection
group
Multiple products, variants, bundles
Scale reference
scale
Size comparison, product in hand
风格标识适用场景
主图
hero
商品列表首图、杂志广告、产品主展示位
生活场景
lifestyle
产品使用场景、社论内容、社交媒体
平铺俯拍
flat_lay
Instagram、俯视布局、产品目录
细节特写
detail
材质质感、纹理、工艺展示
包装展示
packaging
开箱体验、品牌包装展示
产品组/系列
group
多产品展示、变体产品、套装产品
尺寸参考
scale
大小对比、手持产品展示

Marketing & informational

营销与信息类

StyleKeyBest for
360° view
360_view
Multi-angle showcase, turntable display
Comparison
comparison
Side-by-side, before/after, feature highlight
Infographic
infographic
Feature callouts, specs, dimensions
风格标识适用场景
360°全景
360_view
多角度展示、转盘式呈现
对比图
comparison
并排对比、前后对比、功能亮点展示
信息图表
infographic
功能标注、参数说明、尺寸展示

Seasonal campaigns

季节营销活动

StyleKeyBest for
Spring
seasonal_spring
Cherry blossoms, fresh green, pastel
Summer
seasonal_summer
Beach, sunshine, tropical, vacation
Autumn
seasonal_autumn
Fall leaves, golden tones, harvest
Winter
seasonal_winter
Snow, holiday, festive, cozy

风格标识适用场景
春季
seasonal_spring
樱花、清新绿色、马卡龙色调
夏季
seasonal_summer
海滩、阳光、热带风情、度假场景
秋季
seasonal_autumn
落叶、金色色调、丰收主题
冬季
seasonal_winter
雪景、节日氛围、温馨场景

8. Background types

8. 背景类型

BackgroundKeyBest for
Pure white
white
Amazon, e-commerce standard, marketplace listings
Gradient
gradient
Hero shots, premium feel, modern
Studio
studio
Professional catalog, controlled lighting
Natural
natural
Outdoor products, organic brands
Lifestyle
lifestyle
Home/office context, in-use scenarios
Colored
colored
Brand-matching, vibrant marketing
Textured
textured
Luxury products, marble/wood surface
Transparent
transparent
Product cutout, PNG for design use

背景标识适用场景
纯白背景
white
Amazon、电商标准、平台商品列表
渐变背景
gradient
主图、高端质感、现代风格
工作室背景
studio
专业产品目录、可控光线环境
自然背景
natural
户外产品、有机品牌
生活场景背景
lifestyle
家居/办公场景、产品使用场景
纯色背景
colored
品牌配色、活力营销内容
纹理背景
textured
高端产品、大理石/木质表面
透明背景
transparent
产品抠图、设计用PNG图

9. Platform presets

9. 平台预设

PlatformAspect RatioBackgroundStyleKey Requirements
Amazon1:1whiteheroPure white bg (RGB 255,255,255), product fills 85%+, no props/text/watermarks, min 1000px (1600px+ for zoom)
Shopify1:1whiteheroSquare format, consistent catalog style, 2048x2048 recommended
Taobao1:1whitehero800x800 minimum, white bg for main image
Instagram1:1lifestylelifestyle1080x1080 feed, lifestyle context, visually appealing
Xiaohongshu3:4lifestyleflat_lay1080x1440 vertical, aesthetic flat lay, text overlay space
Etsy4:3naturallifestyleHandmade/artisan feel, natural backgrounds
eBay1:1whiteheroWhite background, clear product view, 1600px min for zoom

平台宽高比背景风格核心要求
Amazon1:1whitehero纯白背景(RGB 255,255,255),产品占比85%以上,无道具/文字/水印,最小尺寸1000px(支持缩放需1600px以上)
Shopify1:1whitehero正方形格式,统一目录风格,推荐尺寸2048x2048
淘宝1:1whitehero最小尺寸800x800,主图需使用白底
Instagram1:1lifestylelifestyle1080x1080 feed尺寸,生活场景背景,视觉吸引力强
小红书3:4lifestyleflat_lay1080x1440竖版尺寸,美观的平铺俯拍布局,预留文字叠加空间
Etsy4:3naturallifestyle手工/匠人风格,自然背景
eBay1:1whitehero白底背景,产品清晰展示,最小尺寸1600px以支持缩放

10. Model selection guide

10. 模型选择指南

ModelKeySpeedQualityBest for
NanoPro
nanopro
~25sGoodDefault for all requests. Fast iteration.
GPT Image 2
gpt
~150sBestWhen user explicitly asks for "highest quality" or "best quality". Complex scenes.
Decision rules:
  1. Default: always use
    nanopro
    unless the user explicitly requests higher quality.
  2. Use
    gpt
    when:
    user says "highest quality", "best quality", "premium", or the scene is very complex with many specific details.
  3. Use
    nanopro
    when:
    user wants fast results, is iterating on styles, or generating multiple images.
python
undefined
模型标识速度画质适用场景
NanoPro
nanopro
~25秒良好所有请求的默认选项,快速迭代
GPT Image 2
gpt
~150秒最佳用户明确要求“最高画质”或“最佳质量”时,以及复杂场景
决策规则:
  1. 默认设置: 除非用户明确要求更高画质,否则始终使用
    nanopro
  2. 使用
    gpt
    的场景:
    用户提及“最高画质”、“最佳质量”、“高端”,或场景包含大量特定细节的复杂内容。
  3. 使用
    nanopro
    的场景:
    用户需要快速结果、迭代风格,或生成多张图片。
python
undefined

Default (fast)

默认(快速)

result = product_photo(product_path="product.jpg", style="hero")
result = product_photo(product_path="product.jpg", style="hero")

High quality (user requested)

高画质(用户要求)

result = product_photo(product_path="product.jpg", style="hero", model="gpt")

---
result = product_photo(product_path="product.jpg", style="hero", model="gpt")

---

11. Intent recognition guide

11. 意图识别指南

Use this table to map user requests to the correct style + background:
使用下表将用户请求映射到对应的风格+背景:

Product listing images

商品列表图片

User saysStyleBackgroundNotes
"product photo", "listing image", "主图"
hero
white
Default e-commerce
"Amazon listing", "亚马逊主图"
hero
white
Use
platform="amazon"
"Shopify product", "独立站产品图"
hero
white
Use
platform="shopify"
"淘宝主图", "天猫主图"
hero
white
Use
platform="taobao"
"white background", "白底图"
hero
white
Standard packshot
"product on white", "纯白背景"
hero
white
Amazon-style
用户表述风格背景说明
"产品照片"、"商品列表图片"、"主图"
hero
white
电商默认选项
"Amazon商品列表"、"亚马逊主图"
hero
white
使用
platform="amazon"
"Shopify产品"、"独立站产品图"
hero
white
使用
platform="shopify"
"淘宝主图"、"天猫主图"
hero
white
使用
platform="taobao"
"白底图"、"white background"
hero
white
标准产品图
"纯白背景产品"、"product on white"
hero
white
Amazon风格

Lifestyle & context

生活场景与环境

User saysStyleBackgroundNotes
"lifestyle photo", "场景图"
lifestyle
lifestyle
Product in context
"product in use", "使用场景"
lifestyle
lifestyle
Show product being used
"flat lay", "俯拍", "平铺"
flat_lay
textured
Top-down arrangement
"Instagram product", "小红书产品"
flat_lay
lifestyle
Social media optimized
用户表述风格背景说明
"生活场景图"、"lifestyle photo"
lifestyle
lifestyle
产品使用场景
"产品使用场景"、"product in use"
lifestyle
lifestyle
展示产品使用状态
"俯拍"、"平铺"、"flat lay"
flat_lay
textured
俯视布局
"Instagram产品图"、"小红书产品图"
flat_lay
lifestyle
社交媒体优化

Detail & technical

细节与技术类

User saysStyleBackgroundNotes
"close-up", "detail shot", "细节图"
detail
studio
Macro/texture
"packaging", "包装图", "开箱"
packaging
studio
Box + product
"size comparison", "尺寸对比"
scale
studio
With reference object
"multiple products", "组合图"
group
white
Collection display
"360 view", "多角度"
360_view
white
Turntable style
"comparison", "对比图"
comparison
white
Side by side
"infographic", "功能标注"
infographic
white
Feature callouts
用户表述风格背景说明
"特写"、"细节图"、"close-up"
detail
studio
微距/纹理展示
"包装图"、"开箱"、"packaging"
packaging
studio
包装盒+产品展示
"尺寸对比"、"size comparison"
scale
studio
搭配参考物体
"多产品图"、"组合图"、"multiple products"
group
white
系列产品展示
"多角度图"、"360 view"
360_view
white
转盘式展示
"对比图"、"comparison"
comparison
white
并排对比
"功能标注"、"infographic"
infographic
white
功能亮点标注

Seasonal & campaign

季节与营销活动

User saysStyleBackgroundNotes
"spring campaign", "春季"
seasonal_spring
autoCherry blossoms, pastel
"summer sale", "夏季"
seasonal_summer
autoBeach, tropical
"autumn/fall", "秋季"
seasonal_autumn
autoGolden leaves, warm
"winter/holiday", "冬季", "圣诞"
seasonal_winter
autoSnow, festive
用户表述风格背景说明
"春季营销"、"spring campaign"
seasonal_spring
自动樱花、马卡龙色调
"夏季促销"、"summer sale"
seasonal_summer
自动海滩、热带风情
"秋季"、"autumn/fall"
seasonal_autumn
自动金色落叶、温暖色调
"冬季"、"圣诞"、"winter/holiday"
seasonal_winter
自动雪景、节日氛围

Complete product set

完整产品图片套装

User saysFunctionNotes
"complete set", "全套产品图", "listing images"
product_photo_set()
7 images covering all angles
"Amazon listing set", "亚马逊全套"
product_photo_set(platform="amazon")
Platform-optimized set

用户表述功能说明
"全套产品图"、"complete set"、"listing images"
product_photo_set()
生成7张覆盖全角度的图片
"Amazon全套商品图"、"Amazon listing set"
product_photo_set(platform="amazon")
平台优化的图片套装

12. Usage examples by scenario

12. 场景使用示例

Amazon listing — white background hero shot

Amazon商品列表 — 白底主图

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/headphones.jpg",
    platform="amazon",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/headphones.jpg",
    platform="amazon",
)

Lifestyle product photo

产品生活场景图

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/coffee_mug.jpg",
    style="lifestyle",
    background="lifestyle",
    prompt="premium coffee mug on rustic wooden table beside an open book, morning sunlight",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/coffee_mug.jpg",
    style="lifestyle",
    background="lifestyle",
    prompt="premium coffee mug on rustic wooden table beside an open book, morning sunlight",
)

Product detail close-up

产品细节特写图

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/leather_bag.jpg",
    style="detail",
    background="studio",
    prompt="extreme close-up of leather stitching and grain texture",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/leather_bag.jpg",
    style="detail",
    background="studio",
    prompt="extreme close-up of leather stitching and grain texture",
)

Seasonal campaign — winter holiday

季节营销活动 — 冬季节日

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/candle.jpg",
    style="seasonal_winter",
    prompt="luxury scented candle in cozy holiday setting with pine branches and warm glow",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/candle.jpg",
    style="seasonal_winter",
    prompt="luxury scented candle in cozy holiday setting with pine branches and warm glow",
)

Text-to-image — generate product from description

文本生成图片 — 根据描述生成产品

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    prompt="sleek minimalist smartwatch with black silicone band and OLED display showing time",
    style="hero",
    background="gradient",
    model="gpt",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    prompt="sleek minimalist smartwatch with black silicone band and OLED display showing time",
    style="hero",
    background="gradient",
    model="gpt",
)

Flat lay for Instagram / Xiaohongshu

Instagram/小红书平铺俯拍图

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/skincare_set.jpg",
    style="flat_lay",
    background="textured",
    platform="xiaohongshu",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/skincare_set.jpg",
    style="flat_lay",
    background="textured",
    platform="xiaohongshu",
)

Multiple images — batch generation

批量生成多张图片

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/sneakers.jpg",
    style="hero",
    background="white",
    count=4,
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo(
    product_path="uploads/sneakers.jpg",
    style="hero",
    background="white",
    count=4,
)

Generates 4 variations of the hero shot

生成4张主图变体

undefined
undefined

Complete product image set

完整产品图片套装

python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
    product_path="uploads/wallet.jpg",
    prompt="premium leather bifold wallet",
    platform="amazon",
)
python
exec(open('skills/image-ecommerce/product_photo.py').read())
result = product_photo_set(
    product_path="uploads/wallet.jpg",
    prompt="premium leather bifold wallet",
    platform="amazon",
)

result -> {"success": True, "sets": [...], "total_images": 7, ...}

result -> {"success": True, "sets": [...], "total_images": 7, ...}

Generates: hero, lifestyle, detail, scale, alternate angle, packaging, flat lay

生成:主图、生活场景图、细节图、尺寸参考图、多角度图、包装图、平铺俯拍图


---

---

13. Prompt engineering best practices

13. 提示词优化最佳实践

The product photography prompt structure

产品摄影提示词结构

Every effective product photo prompt should include these elements:
[product description], [photography style], [lighting], [background/surface], [composition], [quality modifiers]
有效的产品摄影提示词应包含以下元素:
[产品描述], [摄影风格], [光线], [背景/表面], [构图], [画质修饰词]

Key principles (derived from product-photography, eachlabs-product-visuals, image-create skills)

核心原则(源自product-photography、eachlabs-product-visuals、image-create技能)

  1. Product preservation is critical — when editing an existing product image:
    • Always emphasize "keep the product exactly as it is"
    • Preserve shape, color, branding, and details
    • Only change the background/context/lighting
  2. Lighting specificity — always specify lighting type:
    • Studio: "soft diffused studio lighting", "even lighting with no shadows"
    • Dramatic: "dramatic rim lighting", "edge light for premium feel"
    • Natural: "natural window light", "golden hour warm light"
    • Flat: "flat even lighting" (for e-commerce white background)
  3. Background precision — vague backgrounds produce poor results:
    • ❌ "nice background"
    • ✅ "pure white background #FFFFFF, no shadows"
    • ✅ "rustic wooden table with morning sunlight"
    • ✅ "soft gradient from white to light grey"
  4. Composition rules (from product-photography skill):
    • Hero shot: product fills 80% of frame, slight 15-30° angle
    • Packshot (Amazon): product dead center, fills 85%+
    • Flat lay: bird's eye view, organized arrangement
    • Group: odd numbers (3 or 5), triangle composition
  5. Shadow types matter:
    • No shadow: Amazon/e-commerce requirements
    • Contact shadow: grounded but clean
    • Drop shadow: adds depth, professional
    • Reflection: tech, luxury, premium feel
  6. Material and texture — for detail shots, specify:
    • "visible leather grain and stitching"
    • "brushed metal finish with subtle reflections"
    • "soft fabric texture, thread detail visible"
  7. Platform compliance — when targeting a specific platform:
    • Amazon: pure white (RGB 255,255,255), no props/text/watermarks
    • Instagram: lifestyle context, visually appealing
    • Xiaohongshu: vertical format, aesthetic, text overlay space
  1. 产品还原至关重要 — 编辑现有产品图片时:
    • 始终强调“保持产品原样”
    • 保留产品形状、颜色、品牌标识和细节
    • 仅修改背景/环境/光线
  2. 光线明确性 — 始终指定光线类型:
    • 工作室光线:“柔和漫射工作室光线”、“均匀无阴影光线”
    • 戏剧性光线:“戏剧性轮廓光”、“边缘光营造高端质感”
    • 自然光:“自然窗光”、“黄金时段暖光”
    • 平光:“均匀平光”(适用于电商白底图)
  3. 背景精准性 — 模糊的背景描述会导致效果不佳:
    • ❌ “好看的背景”
    • ✅ “纯白背景#FFFFFF,无阴影”
    • ✅ “质朴木桌搭配清晨阳光”
    • ✅ “从白色到浅灰色的柔和渐变”
  4. 构图规则(源自product-photography技能):
    • 主图:产品占画面80%,轻微15-30°角度
    • 产品图(Amazon风格):产品居中,占比85%以上
    • 平铺俯拍:鸟瞰视角,布局整齐
    • 产品组:奇数数量(3或5个),三角形构图
  5. 阴影类型影响效果
    • 无阴影:Amazon/电商要求
    • 接触阴影:产品落地感强且干净
    • 投影:增加层次感,专业风格
    • 倒影:科技、高端产品适用
  6. 材质与纹理 — 细节图需明确:
    • “可见皮革纹理与缝线”
    • “拉丝金属质感带轻微反光”
    • “柔软织物纹理,可见缝线细节”
  7. 平台合规性 — 针对特定平台时:
    • Amazon:纯白背景(RGB 255,255,255),无道具/文字/水印
    • Instagram:生活场景背景,视觉吸引力强
    • 小红书:竖版格式,美观布局,预留文字叠加空间

Example: building a custom prompt

示例:构建自定义提示词

User request: "I need a hero shot of my leather wallet for Amazon"
python
result = product_photo(
    product_path="uploads/wallet.jpg",
    platform="amazon",
    prompt="premium leather bifold wallet, rich brown color, slight angle showing card slots",
)
The script automatically builds:
Transform this product image into a professional e-commerce photo.
Keep the product exactly as it is — preserve its shape, color, details, and branding.
premium leather bifold wallet, rich brown color, slight angle showing card slots.
Photography style: professional product hero shot, clean composition, studio lighting...
Background: pure white background #FFFFFF, clean, e-commerce standard, no shadows.

用户请求:“我需要一张用于Amazon的皮革钱包主图”
python
result = product_photo(
    product_path="uploads/wallet.jpg",
    platform="amazon",
    prompt="premium leather bifold wallet, rich brown color, slight angle showing card slots",
)
脚本会自动生成完整提示词:
将此产品图片转换为专业电商照片。
保持产品原样——保留其形状、颜色、细节和品牌标识。
premium leather bifold wallet, rich brown color, slight angle showing card slots.
摄影风格:专业产品主图,简洁构图,工作室光线...
背景:纯白背景#FFFFFF,干净,电商标准,无阴影。

14. E-commerce image set guide

14. 电商图片套装指南

A complete product listing needs 7-9 images. Use
product_photo_set()
for automatic generation, or create individual shots:
PositionImage TypeStyleBackgroundPurpose
1Hero / packshot
hero
white
Primary listing image
2Lifestyle
lifestyle
lifestyle
Product in use/context
3Detail close-up
detail
studio
Material quality, craftsmanship
4Scale reference
scale
studio
Size in hand or next to known object
5Alternate angle
hero
white
Back or side view
6Packaging
packaging
studio
Unboxing experience
7Flat lay
flat_lay
textured
Arranged composition
8Infographic
infographic
white
Dimensions, specs, features
9Seasonal
seasonal_*
autoCampaign-specific

完整的商品列表需要7-9张图片。可使用
product_photo_set()
自动生成,或手动创建单张图片:
位置图片类型风格背景用途
1主图/产品图
hero
white
商品列表首图
2生活场景图
lifestyle
lifestyle
产品使用场景展示
3细节特写图
detail
studio
材质质感、工艺展示
4尺寸参考图
scale
studio
手持或与已知物体对比展示大小
5多角度图
hero
white
背面或侧面视图
6包装图
packaging
studio
开箱体验展示
7平铺俯拍图
flat_lay
textured
布局式展示
8信息图表
infographic
white
尺寸、参数、功能展示
9季节主题图
seasonal_*
自动营销活动专属

15. Error handling

15. 错误处理

The script returns structured results. Always check
success
:
python
result = product_photo(product_path="uploads/product.jpg")
if result["success"]:
    for img in result["images"]:
        print(f"Saved: {img['local_path']}")
else:
    print(f"Error: {result.get('error')}")
Common errors:
  • "File not found"
    — check the product_path
  • "Unsupported image format"
    — use JPG, PNG, or WebP
  • "Image too large"
    — max 10 MB
  • "Either a product image or a prompt is required"
    — provide product_path/product_url or prompt
  • "Unknown style/background"
    — check available presets in §7/§8
脚本会返回结构化结果,务必检查
success
字段:
python
result = product_photo(product_path="uploads/product.jpg")
if result["success"]:
    for img in result["images"]:
        print(f"已保存:{img['local_path']}")
else:
    print(f"错误:{result.get('error')}")
常见错误:
  • "File not found"
    — 检查product_path是否正确
  • "Unsupported image format"
    — 使用JPG、PNG或WebP格式
  • "Image too large"
    — 图片最大不超过10 MB
  • "Either a product image or a prompt is required"
    — 需提供product_path/product_url或prompt
  • "Unknown style/background"
    — 检查第7/8节中的可用预设