mcpField
P
Product Photo Generation

Product Photo Generation

github.com/eachlabs营销与增长44291 次安装今天更新
代码仓库

关于 Product Photo Generation

Product Photo Generation 是使用 each::sense API 生成商品摄影图的技能,面向电商和营销内容创作者。它支持多种场景与视觉风格,也可用自有商品图片生成置入场景的图像,并通过会话延续系列风格。

主要功能

  1. 01生成电商与生活方式商品图
  2. 02支持棚拍、平铺和特写等风格
  3. 03用自有商品图片置入场景
  4. 04通过会话保持系列风格一致
  5. 05提供 max 与 eco 模式

适用场景

  1. 01制作网店白底商品目录图
  2. 02为营销活动生成生活场景图
  3. 03为商品系列创建风格一致的图片
  4. 04快速尝试多种构图和拍摄风格

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill product-photo-generation

安装后在 Claude Code 中输入/product-photo-generation确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

产品摄影生成

使用 each::sense API 生成专业产品摄影作品。为任何商品创建适用于电商的图片、生活方式照片和影棚级产品视觉素材。

概述

each::sense API 可生成适用于以下场景的高质量产品摄影作品:

  • 电商产品照片 - 用于网店的简洁专业图片
  • 生活方式场景图片 - 展示产品在真实场景中的样子
  • 白底摄影 - 标准商品目录和电商平台图片
  • 影棚布光 - 用于高端产品展示的专业布光
  • 营销视觉素材 - 用于广告和促销的吸睛图片

你还可以通过 image_urls 提供自己的产品图片,将实际产品放入专业设计的场景中。

快速入门

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a professional product photo of a minimalist ceramic coffee mug on a white background with soft studio lighting"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'

产品照片风格

风格描述最适合用于
白色背景纯白背景上的简洁独立产品电商、交易平台、商品目录
生活方式真实场景或环境中的产品社交媒体、品牌叙事
平铺摆拍俯拍视角,搭配布置好的道具时尚、食品、配饰
使用场景正在使用的产品或处于自然环境中的产品营销活动、广告
主视觉照运用戏剧化布光和角度,营造冲击力首页横幅、主打产品
细节照特写呈现纹理和工艺奢侈品、手工制品

用例示例

白底产品照

用于电商的标准产品摄影,背景简洁纯白。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Professional product photo of a stainless steel water bottle on pure white background, centered composition, soft box lighting from above and sides, no shadows, e-commerce style, 4K quality"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
生活方式场景照

展示产品置身于令人向往的真实场景中。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Lifestyle product photography of premium wireless headphones on a modern wooden desk, morning light through window, MacBook and coffee cup in soft focus background, warm and inviting atmosphere"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
平铺构图

俯拍布置,并搭配相得益彰的道具。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Flat lay product photography of a leather wallet, arranged with sunglasses, car keys, and a fountain pen on marble surface, overhead shot, even lighting, editorial style composition"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
戏剧化布光主视觉照

用于营销素材、具有强烈视觉冲击力的产品图片。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Hero shot of a luxury perfume bottle, dramatic side lighting creating elegant shadows, dark moody background with subtle gradient, glass reflections and caustics, premium advertising quality"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
细节/微距照

特写呈现产品纹理和工艺。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Macro detail shot of handcrafted leather bag stitching, extreme close-up showing texture and quality of leather grain, shallow depth of field, warm directional lighting highlighting craftsmanship"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
使用/动作照

展示正在使用或演示中的产品。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Action product shot of running shoes in motion, dynamic angle showing flexibility, slight motion blur on background, athletic track setting, energetic and sporty atmosphere"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
季节/主题照

根据特定季节或节日为产品设计造型。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Holiday themed product photo of a scented candle surrounded by pine branches, dried oranges, and cinnamon sticks, warm cozy lighting, festive winter atmosphere, gift-ready presentation"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
尺寸对比照

将产品与参照物一起展示,体现其尺寸。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Product scale photo of a compact Bluetooth speaker next to a smartphone and coffee cup for size reference, clean white background, even lighting, showing portable dimensions clearly"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
包装照

展示产品及其包装,呈现开箱体验。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Product and packaging photo of premium skincare bottle emerging from elegant black box, tissue paper visible, unboxing moment, luxury presentation, soft lighting on neutral background"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'

使用自己的产品图片

通过 image_urls 提供实际产品照片,将产品放入专业设计的场景中。

curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Place this product in a modern kitchen setting, morning light, marble countertop, lifestyle photography style"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/my-product.jpg"],
    "mode": "max"
  }'
搭配自定义背景的产品
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Put this product on a pure white background with professional studio lighting, remove existing background, e-commerce ready"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/raw-product-photo.jpg"],
    "mode": "max"
  }'

产品摄影最佳实践

布光指南
  • 柔光箱布光 - 为电商照片提供均匀照明
  • 轮廓光 - 让产品从背景中凸显出来
  • 自然窗光 - 营造温暖、真实的生活方式氛围
  • 戏剧化侧光 - 增添层次感和高端质感
  • 漫射顶光 - 尽量减少生硬阴影
构图技巧
  • 电商照片中,将重要产品置于画面中央
  • 生活方式照片中,运用三分法构图
  • 留出负空间,以便叠加文字
  • 考虑平台对宽高比的要求
  • 加入能够讲述故事的场景元素
背景选择
  • 符合平台要求的纯白背景(#FFFFFF)
  • 适用于高端产品的渐变背景
  • 营造生活方式氛围的场景化环境
  • 能衬托产品的互补色
  • 适用于手工艺产品的纹理表面

提示词技巧

用于产品摄影的有效提示词包括:

光线描述:

  • “柔光箱照明”“自然窗光”“戏剧性的侧光”
  • “轮廓光”“逆光”“漫射顶光”
  • “黄金时段的暖色调”“冷调影棚照明”

角度说明:

  • “平视拍摄”“45 度角”“俯拍平铺”
  • “低角度主视觉拍摄”“四分之三视角”“正面拍摄”

背景细节:

  • “纯白背景”“渐变灰色背景”
  • “大理石表面”“木桌”“混凝土纹理”

风格参考:

  • “电商风格”“编辑级品质”“杂志广告”
  • “目录摄影”“Instagram 美学”“高端品牌风格”

道具与场景:

  • “极简道具”“生活方式元素”“季节性装饰”
  • “搭配配饰”“自然元素”

模式选择

模式最适合输出质量
max主视觉照片、营销材料、高端产品最高品质,渲染细致
eco快速迭代、批量目录照片、测试概念生成速度快,品质良好

最终营销素材和主视觉图片请使用 max 模式。快速制作原型并迅速生成多个变体时,请使用 eco 模式。

产品系列的多轮会话

使用 session_id 在产品线或目录系列中保持一致性。

开始产品系列会话
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a product photo of a blue ceramic coffee mug on white background with soft natural lighting, minimalist style"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "product-catalog-2024",
    "mode": "max"
  }'
以一致的风格继续
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Now generate the matching red ceramic mug in the same style and lighting setup"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "product-catalog-2024",
    "mode": "max"
  }'
添加变体
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a lifestyle version showing both mugs on a breakfast table with croissants"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "product-catalog-2024",
    "mode": "max"
  }'

错误处理

错误原因解决方案
401 未授权API 密钥无效或缺失确认 X-API-Key 请求头设置正确
400 错误请求请求正文格式错误检查 JSON 语法和必填字段
429 请求过多请求过多实现指数退避
500 服务器错误服务暂时不可用稍等片刻后重试
使用指数退避重试
for i in 1 2 3; do
  response=$(curl -s -w "%{http_code}" -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
    -H "Content-Type: application/json" \
    -H "X-API-Key: $EACHLABS_API_KEY" \
    -H "Accept: text/event-stream" \
    -d '{
      "messages": [{"role": "user", "content": "Professional product photo of wireless earbuds on white background"}],
      "model": "eachsense/beta",
    "stream": true,
      "mode": "max"
    }')

  http_code="${response: -3}"
  if [ "$http_code" -eq 200 ]; then
    echo "${response%???}"
    break
  fi
  sleep $((2**i))
done

相关技能

评论

支持 Markdown