
Ecom Details Image
- 26 installs
- 799 repo stars
- Updated May 15, 2026
- liangdabiao/ecom-details-image
Helps with ai & agent building tasks.
About
ecom-details-image is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- ecom-details-image
- AI & Agent Building
- AI-coding skill
Ecom Details Image by the numbers
- 26 all-time installs (skills.sh)
- +3 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #9,702 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/liangdabiao/ecom-details-image --skill ecom-details-imageAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 26 |
|---|---|
| repo stars | ★ 799 |
| Last updated | May 15, 2026 |
| Repository | liangdabiao/ecom-details-image ↗ |
What it does
Helps with ai & agent building tasks.
Files
ecom-details-image Skill
当用户需要视觉策略、图片 Prompt、商品主图、营销图、社媒图、广告图、电商 PDP 视觉,或要求直接 AI 生图时,使用这个 Skill。
这个 Skill 有两种模式:
1. Brief / Prompt 模式:只输出视觉简报和可执行图片 Prompt。 2. Generate 模式:当用户明确要求“生图、生成图片、出图、render image”时,先输出最终 Prompt,再调用 scripts/generate_image.py。
不要暴露、索要、写入、提交或回显真实 API key。使用者必须通过自己的环境变量配置 API。
---
生图配置
直接生图使用 apimart.ai 图像生成接口(GPT-Image-2,异步轮询模式)。优先在 .claude/skills/ecom-details-image/ 放 .env,不要把真实 API key 写进仓库:
IMG_BASE_URL=https://api.apimart.ai/v1
IMG_MODEL=gpt-image-2
IMG_API_KEY=your-api-key脚本也兼容常见别名:OPENAI_BASE_URL、OPENAI_API_BASE、OPENAI_IMAGE_MODEL、OPENAI_MODEL、OPENAI_API_KEY。
生图脚本:
python3 scripts/generate_image.py --prompt "clean product hero image..." --size 1:1 --resolution 2k
python3 scripts/generate_image.py --prompt-file prompt.txt --output-dir outputs
python3 scripts/generate_image.py --env-file .env --prompt-file prompt.txt参考图片:如果用户提供了产品照片路径,使用 --image 参数传入以提升产品一致性。参考图对保证产品外观准确非常有效。
如果缺少任何生图配置,说明需要在 .env 里配置什么,并把最终 Prompt 交给用户,方便用户稍后自行运行。
---
核心流程
1. 判断视觉任务类型和场景(见下方场景模板系统)。 2. 从 references/templates/ 匹配对应模板,读取 prompt_template、variants、category_tips 作为 Prompt 基础结构。 3. 只收集会实质影响图片结果的缺失信息。 4. 构建视觉简报。 5. 如果任务包含多张图,先建立 Campaign Style Lock,锁定整套图的色板、冷暖调、字体、背景、光线、布局和图标风格。 6. 写出可执行图片 Prompt(保持简洁,见下方 Prompt 精简原则);多图任务必须把同一段 Campaign Style Lock 原样放进每张 Prompt。 7. 如果任务是商品图、详情页图或营销图,先做转化驱动力诊断。 8. 如果用户要求电商详情页、PDP、主图堆栈或整套商品图,默认输出 5 张主图 + 7-9 张详情页图片 的图片包。 9. 如果用户要求直接出图,调用 scripts/generate_image.py;如果用户提供了参考产品图,传入 --image。 10. 返回 Prompt、生成文件路径和关键假设。
---
最小输入
任何视觉任务都优先确认这些信息:
- 目标:图片要达成什么效果。
- 用途:商品主图、广告图、社媒图、Banner、PDP 模块、缩略图、概念图等。
- 主体:产品、人物、场景、物体或抽象概念。
- 受众和使用语境。
- 风格:真实摄影、编辑部风格、高级棚拍、UGC、3D 渲染、插画等。
- 构图、比例、平台尺寸。
- 是否需要图片内文字。
- 负面约束:避免 logo、避免文字、避免杂乱、避免医疗承诺等。
如果缺少非关键字段,明确假设后继续,不要无谓阻塞。
---
通用图片 Prompt 结构
默认用英文写 Prompt,除非用户要求其他语言。
Prompt 按这个结构组织:
1. Campaign Style Lock,多图任务必填且每张图完全一致。 2. 主体和场景。 3. 图片目的和情绪意图。 4. 构图、镜头和取景。 5. 光线、颜色、材质和纹理。 6. 风格和真实感等级。 7. 平台限制和画幅比例。 8. 图片内文字处理。 9. 负面约束。
Prompt 要足够具体,可以直接执行;也不要过度规定无关细节,避免和用户目标冲突。
---
GPT-Image-2 Prompt 铁律(必须遵守)
以下规则来自大量实战验证,每条 Prompt 都必须逐条检查。
1. 颜色用 hex 码,不用形容词
"白底"出来是淡灰,"金色"出来有 8 种金。必须写 hex:
- 白底 →
#FFFFFF - 深灰文字 →
#2D2D2D - 金色强调 →
#D4AF37 - 浅米色背景 →
#F5F1E8 - 深绿背景 →
#1A3A2E
2. 产品占比必须数字化
不同图型的产品占比黄金区间:
| 图型 | 产品占比 | 说明 |
|---|---|---|
| 白底主图 | 35-40% | 太小显廉价,太大显拥挤 |
| 卖点副图 | 25-30% | 左图右文布局,产品在左 |
| 场景氛围图 | 20-25% | 场景图不是产品图,氛围才是主角 |
| 信息流广告 | 40% | 环境干扰多,产品要更突出 |
| 搜索广告 | 45% | 搜索图比信息流再大一点 |
| SKU 多规格卡 | 60-70%(整体) | 多个产品横排 |
3. 留白必须显式声明
不写留白,AI 一定把画面填满。每张图必须写:
- 白底主图 / 卖点副图 / 广告图:
留白至少 45% - 场景氛围图:
留白至少 50% - 详情页长图:
留白 50%+
4. 否定清单不能省
每条 Prompt 结尾必须加负面约束,写具体禁止项而不是笼统的"不要多余的":
不要添加:道具、手、水印、假 logo、额外文字、装饰元素、渐变背景5. 平台预留空间
国内电商主图必须预留:
顶部中央 200×100 区域留空(平台价格叠加区)— 不写产品会把整个画面填满左上角 200×100 像素区域完全留白— logo 区域(如需要)
6. 3 层信息架构
电商图内文字必须遵循:
- 核心承诺 ≤15 字(主标题)
- 关键证据 2-3 个(图标 + 短标签)
- 行动指令 ≤8 字(CTA 按钮)
7. 批量出图优于反复调参
一次 --resolution 2k 出图,让 CTR 数据选风格,不要凭审美反复调参。
---
Prompt 精简原则
GPT-Image-2 在结构清晰、信息具体的 Prompt 下表现最佳。
- 只包含核心信息,去除冗余约束和重复描述。
- 自然语言优于关键词堆砌。
- 明确描述材质纹理(磨砂玻璃、拉丝金属、哑光饰面、丝绸光泽)。
- 始终包含光线方向和质量,场景图指定色温(如
色温 5500K)。 - 不要在一个 Prompt 里塞入太多场景、风格、情绪要求。
- 如果用户提供了参考产品图,传入
--image比文字描述更有效。 - 中文字用「」中文引号包裹,渲染准确率明显高于英文引号或无引号。
- 复杂笔画的中文字(赢、鬱、餮等)尽量换成简单同义字,95% 准确率不是 100%。
---
场景模板系统
references/templates/ 目录包含 25 个场景模板,每个模板提供 prompt_template、variants(风格变体)、category_tips(品类建议)、examples 和 anti_ai_tips。
模板匹配表
| 触发词 | 模板文件 |
|---|---|
| 白底图, 主图, hero image, packshot | 01-hero-image.json |
| 场景图, 生活图, lifestyle | 02-lifestyle-scene.json |
| 平铺图, flat lay, 俯拍 | 03-flat-lay.json |
| 细节图, 微距, macro, 特写 | 04-detail-macro.json |
| 海报, poster, banner, 促销 | 05-poster-banner.json |
| 社交媒体, 小红书, Instagram, TikTok | 06-social-media.json |
| UGC, 买家秀, GRWM | 07-ugc-style.json |
| 模特, model, 人物展示 | 08-model-showcase.json |
| 对比, before after, 前后 | 09-before-after.json |
| 包装, packaging, 礼盒 | 10-packaging.json |
| 信息图, A+, 详情页 | 11-infographic.json |
| 创意, 概念, creative | 12-creative-concept.json |
| 尺寸, 规格, 使用步骤 | 13-size-spec.json |
| 套装, 组合, bundle | 14-multi-product.json |
| 直播, livestream | 15-livestream.json |
| 试穿, 融入, try on | 16-try-on-virtual.json |
| 拆解图, 爆炸图, exploded view | 17-exploded-view.json |
| 隐形模特, ghost mannequin, 3D服装 | 18-ghost-mannequin.json |
| 多角度, 网格, grid, 多色展示 | 19-multi-angle-grid.json |
| 杂志, 封面, editorial, magazine | 20-magazine-editorial.json |
| 季节, 四季, campaign, 春夏秋冬 | 21-seasonal-campaign.json |
| 奢华, 氛围, 烟雾, luxury, atmospheric | 22-luxury-atmospherics.json |
| 设备模型, 界面, mockup, SaaS, APP | 23-device-mockup.json |
| 店铺, 门面, 空间, storefront, 实体店 | 24-storefront.json |
| 运动, 健身, sports, fitness | 25-sports-campaign.json |
无匹配 → 默认 01-hero-image.json。只读取匹配到的模板文件,不要一次性加载全部。
模板使用方式
1. 取 prompt_template 作为 Prompt 基础结构。 2. 用用户产品信息替换 {variables}。 3. 用户指定风格变体 → 应用 variants.<name>.overrides。 4. 已知产品品类 → 应用 category_tips.<category>。 5. 简化:只保留有值的字段,输出简洁的自然语言 Prompt。
风格变体速查
每个模板通常包含 3-4 个风格变体,常用变体类型:
- luxury — 高端奢华(Rembrandt 光线、金色点缀、深色渐变)
- minimal — 极简现代(纯白/浅色、干净线条、大留白)
- fresh — 清新自然(明亮自然光、柔和粉彩、通透感)
- tech — 科技感(戏剧性侧光、深色背景、金属质感)
---
Anti-AI 技巧(UGC / 直播 / 社媒场景)
生成 UGC、直播或社媒内容时,必须遵循以下规则让图片看起来真实:
- 指定具体手机型号:
iPhone 14 Pro、iPhone 15 Pro。 - 添加可见瑕疵:毛孔、轻微噪点、暖色偏移、不完美构图。
- 使用真实感语言:
NOT professional photography、NOT AI-generated look。 - 展示真实环境:略微凌乱、真实物品、水渍、用过的毛巾。
- 参考胶片色调:
Kodak Portra 400 color feel。 - 明确声明:
NOT retouched, NOT smoothed。 - 避免典型 AI 词汇:不用
perfect、flawless、stunning、hyper-realistic。 - 各模板中如有
anti_ai_tips字段,生成对应场景时必须遵循。
---
整套图片风格一致性规则
当生成主图 + 详情页、PDP 图片包、广告组图、社媒组图或任何多张图片时,必须先定义一个 Campaign Style Lock。这是整套图的视觉合同,不是灵感描述。
Campaign Style Lock 必填字段
1. 视觉方向:例如 premium tech ecommerce、clean household care、warm gift editorial。 2. 固定色板:限制为 2-3 个主色 + 1 个强调色;写清楚背景色、文字色、强调色,不要每张图重新配色。 3. 冷暖调:明确 warm / cool / neutral,并要求全套一致。 4. 字体系统:统一为一种字体风格,例如 modern geometric sans-serif;禁止混用衬线、手写、复古、卡通字体。 5. 背景系统:统一背景材质、空间和深浅,例如 clean light gray studio background 或 deep navy premium tech background。 6. 光线系统:统一光源方向、阴影强度、反光质感和氛围。 7. 布局系统:统一留白、圆角、分栏、标签、编号和信息图组件风格。 8. 图标 / 插画系统:如果用图标,统一线宽、形状、颜色和复杂度。 9. 产品呈现规则:产品角度、大小比例、材质表现和是否居中必须稳定。 10. 禁止漂移项:明确禁止 changing color palette, mixed fonts, inconsistent lighting, random backgrounds, mismatched icon styles。
默认 Style Lock 模板
如果用户没有给品牌规范,使用保守统一的电商视觉系统:
Campaign Style Lock: consistent premium ecommerce visual system across the entire image set; fixed palette of clean off-white background, deep charcoal text, one product-matched accent color, and one soft secondary accent; neutral-cool studio lighting; modern geometric sans-serif headline placeholders only; consistent rounded rectangular info labels; consistent thin-line icon style; clean high-end product photography mixed with minimal infographic elements; stable product scale and placement; generous whitespace; no color palette changes, no mixed fonts, no random backgrounds, no inconsistent lighting, no mismatched icon styles.多图 Prompt 强制规则
- 每张图 Prompt 的第一段必须是同一段 Campaign Style Lock,不能改写、缩短或换同义词。
- 单张图只能改变:画面目的、主体动作、局部构图和短文案。
- 单张图不能改变:色板、冷暖调、字体风格、背景系统、光线系统、图标风格和信息标签样式。
- 如果用户要求重生其中一张图,必须复用原来的 Campaign Style Lock。
- 如果已生成图片风格不一致,优先重写 Prompt 包,而不是逐张随意补描述。
---
商品和营销转化流程
商品主图、电商图片、广告图和 PDP 视觉不要从固定模板开始,要先判断转化驱动力。
选择一个主要驱动力:
A. 视觉驱动型
适用于购买决策依赖外观、风格匹配、光洁度、质感、前后对比或礼品属性的产品。
重点:
- 一眼抓住产品吸引力。
- 质感、细节、工艺和质量信号。
- 使用场景和视觉层级。
- 简短利益点。
B. 痛点驱动型
适用于买家有明确摩擦、风险、时间损失、不适或反复烦恼的产品。
强制顺序:
1. 痛点挖掘 / 风险触发。 2. 利益 / 解决方案。 3. 信任和证明。 4. 优惠 + CTA。
重点是具体问题、缓解机制、证据和风险逆转。
C. 情感价值驱动型
适用于购买和身份、信心、归属、地位、关怀、快乐、新奇或冲动相关的产品。
重点:
- 情绪钩子。
- 身份或向往。
- 产品作为实现方式。
- 社交证明和低摩擦行动。
---
商品图序列模板
当用户提到“详情页、PDP、Amazon A+、Shopify 商品页、主图堆栈、整套商品图、商品详情图片”时,不要只停留在 5 张主图。必须追加详情页图片序列,并把每一屏都写成可单独生图的 Prompt。
视觉驱动主图序列
1. 一眼可懂的视觉主张。 2. 核心功能或质感特写。 3. 使用场景匹配。 4. 普通方案 vs 升级方案对比。 5. 优惠、物流、保障或 CTA 画面。
痛点驱动主图序列
1. 问题快照。 2. 解决机制。 3. 利益证明。 4. 信任画面。 5. 优惠 + 紧迫 CTA。
情感价值主图序列
1. 情绪场景钩子。 2. 身份 / 价值表达。 3. 产品作为实现方式。 4. 归属、地位或社交信号。 5. 带情绪强化的优惠 + CTA。
---
详情页图片序列模板
详情页图片用于移动端纵向浏览,默认每张图独立成屏,尺寸优先使用 2:3 或平台指定竖版比例。除非用户明确只要文案,否则每个模块都要输出对应图片 Prompt。
通用 PDP 详情页图片序列
1. 首屏承接:延续主图卖点,说明产品为谁解决什么问题。 2. 痛点放大:展示用户当前的不便、损失、风险或反复烦恼。 3. 机制解释:用视觉化结构说明产品如何发挥作用,避免虚构无法证明的数据。 4. 核心利益:把 2-4 个主要利益做成易扫读的信息图。 5. 使用步骤:用 3-4 步说明怎么用,降低理解成本。 6. 场景覆盖:展示典型使用场景、适用对象或使用前后状态。 7. 对比选择:普通方案 vs 本产品,突出可观察差异和体验差异。 8. 信任背书:展示材料、包装、质检、保障、真实评价等已有证据;没有证据就写“proof placeholder”,不要编造认证。 9. FAQ / 风险逆转 / CTA:处理残留、适用范围、售后、组合优惠等临门疑虑。
驱动力适配
- 视觉驱动型:增加质感细节、尺寸比例、使用场景和礼品感。
- 痛点驱动型:严格按“问题严重性 → 解决机制 → 利益证明 → 信任 → CTA”推进。
- 情感价值驱动型:增加生活方式、身份表达、社交场景和情绪回报。
图片内文字规则
- 详情页图片可以有短文案,但必须短、清楚、适合移动端。
- 每屏主标题建议 3-7 个英文词或 6-12 个中文字。
- 说明性文字用 2-4 个短标签,不要生成大段小字。
- 每一区文字量严格控制:标题 + 副标题 + 小标注不超过 50 个字。
- 中文字用「」中文引号包裹,如「修护屏障」「72h 深层锁水」,渲染准确率更高。
- 指定字体大小:标题 28-48pt,副标题 16-20pt,标注 10-14pt。
- 颜色用 hex 码:深灰标题
#2D2D2D,浅灰标注#888888,金色强调#D4AF37。 - 如果模型容易生成乱码,Prompt 中明确要求 “clean layout with short readable headline placeholders, no dense body text”。
- 出图后必须放大 200% 逐字核对中文笔画,复杂字换简单同义字。
视觉节奏规则(多图任务)
连续多张图的背景色不能完全一样,否则消费者视觉疲劳。多图任务必须交替使用 2-3 种背景色:
- 白底主图 / 卖点副图:
#FFFFFF - 成分解析 / 质地展示:
#F5F1E8(浅米色) - 品牌主视觉 / 促销图:品牌深色(如
#1A3A2E)
多角度镜头规则(多图任务)
全套图片绝不能全部使用同一个拍摄角度。 AI 生图默认倾向生成正面 3/4 角度,如果不显式指定镜头角度,整套图会看起来千篇一律。多图任务必须在 Prompt 中为每张图分配不同的镜头角度和景别。
角度清单(按用途选择 4-6 种组合)
| 角度 | Prompt 写法 | 适用场景 |
|---|---|---|
| 正面 3/4 | at a slight 3/4 angle showing full front facade | 主图、首图 |
| 正上方俯视 | photographed directly from above at a 90-degree overhead angle | 展示布局、内部结构、平铺 |
| 侧面 90° | photographed from a clean 90-degree side profile | 展示深度、层次、侧面细节 |
| 后侧 45° | photographed from behind at a 45-degree rear angle | 展示背面细节、码头、尾部构造 |
| 仰视低角度 | photographed from a very low angle looking upward | 英雄镜头、气势感、儿童视角 |
| 高角度俯视 | photographed from a high 45-degree angle looking down | 展示顶部、整体规模、桌面视角 |
景别清单(按用途选择 2-3 种组合)
| 景别 | Prompt 写法 | 适用场景 |
|---|---|---|
| 全景 | full product visible, product occupies 35-40% | 主图、场景图 |
| 中景 | showing the [section name] area, product occupies 45-50% | 功能展示、结构说明 |
| 特写 | tight zoom on [specific detail], product detail occupies 55-60% | 材质纹理、工艺细节、按钮/接口 |
| 微距 | extreme close-up macro shot, shallow depth of field | 面料编织、接缝工艺、表面纹理 |
| 局部 | close-up detail shot focusing on [specific part] | 灯塔信标、大炮、拉链、标签 |
多角度分配原则
1. 主图序列(5 张):至少使用 3 种不同角度,其中 1 张必须是特写或微距。 2. 详情页序列(7-9 张):至少使用 4 种不同角度,其中 2 张必须是特写/微距。 3. 不能连续 3 张图使用相同角度,否则消费者视觉疲劳。 4. 全景图不超过整套的 40%,必须穿插中景、特写和微距增加节奏感。 5. 仰视和俯视各至少 1 张,打破平视拍摄的单一感。 6. 每张 Prompt 必须显式写明角度关键词(如 side profile、from above、low angle),不要假设模型会自动变换角度。
角度 Prompt 模板
在每张图片 Prompt 的「构图、镜头和取景」段落中,直接嵌入角度描述:
# 俯视图
Bird's eye top-down view. The [product] photographed directly from above at a 90-degree overhead angle, showing the full layout [specific details visible from above]. Deep even lighting from directly above minimizing shadows.
# 侧视图
Side profile view. The [product] photographed from a clean 90-degree side profile, showing [what's visible from side]. Strong side lighting from the left creating dramatic depth.
# 仰视图
Dramatic low-angle hero shot. The [product] photographed from a very low angle looking upward, making [tower/building] appear tall and imposing. Strong upward lighting creating heroic dramatic shadows.
# 微距特写
Extreme close-up macro shot. Tight zoom on the [specific detail], showing [texture/mechanism/individual elements]. Shallow depth of field with the foreground in sharp focus and background slightly blurred. Warm directional side lighting highlighting surface texture.
# 后侧角度
Rear angled view. The [product] photographed from behind at a 45-degree rear angle, revealing [back details not visible from front]. This angle shows construction details not visible from the front.详情页信息图结构规则(关键!)
详情页图片 ≠ 多角度产品照片。 详情页图片必须是电商信息图格式,包含卖点文案、图标、标签、对比、步骤、信任徽章等信息图元素,产品在不同信息图中展示不同角度。多角度是为信息图服务的展示手段,不是目的。
错误做法(只换角度,没有信息图结构)
# 错误:这只是"同一产品换个角度拍",缺少电商转化元素
Prompt: Side profile view of the product on white background. Product occupies 38%. Whitespace 50%+.正确做法(电商信息图 + 多角度产品展示)
# 正确:有标题、卖点图标、标签、信息图布局,产品在其中展示特定角度
E-commerce infographic benefits screen on #FAF7F2 background.
Top headline in #2D2D2D at 28pt reading 「Core Benefits」.
Left side: the product shown from an elevated overhead angle.
Right side: four benefit rows stacked vertically with thin-line icons:
(1) icon + 「Feature One」 in #7A9E7E
(2) icon + 「Feature Two」 in #8B6F47
(3) icon + 「Feature Three」 in #7A9E7E
(4) icon + 「Feature Four」 in #8B6F47
Clean two-column layout. Product occupies 35%. Whitespace 48%+.详情页每屏必须包含的信息图元素
| 屏幕 | 电商结构 | 信息图元素 | 产品角度建议 |
|---|---|---|---|
| 首屏承接 | 标题 + 产品 + 4个特色图标 + 副标题 | 图标+标签环绕产品 | Front 3/4 |
| 痛点对比 | 3个痛点图标 → 3个解决方案 + 产品 | 上下对比布局 | Side profile |
| 核心特色 | 多栏并列展示 + 每栏标签和描述 | 网格/三栏布局 | 各元素独立特写 |
| 核心利益 | 左产品 + 右利益列表(图标+短文案) | 双栏信息图 | Elevated overhead |
| 使用步骤 | 4步时间线/编号圆 + 最终成品展示 | 步骤流程图 | Low-angle (最终效果) |
| 场景覆盖 | 3个场景照片 + 场景标签 | 三行场景卡 | 不同使用环境 |
| 信任/工艺 | 微距细节图 + 标注圆 + 信任徽章 | 细节标注图 | Macro特写 |
| CTA/礼品 | 标题 + 产品 + 卖点徽章 + CTA按钮 | 转化闭合布局 | Front 3/4 |
信息图 Prompt 必须包含的要素
1. 布局关键词:e-commerce infographic, structured grid layout, two-column layout, three-row layout, timeline, comparison layout 2. 标题和文案:headline in #2D2D2D at 28pt reading 「...」, label in #7A9E7E at 14pt reading 「...」 3. 信息图元素:feature callout icons, thin connecting lines, numbered circles, trust badges, CTA button placeholder 4. 产品角度:每张信息图中产品从不同角度展示,但角度是为信息图内容服务的 5. 电商 Prompt 开头:每张详情页 Prompt 必须以 E-commerce infographic [screen type] 开头,而不是 Close-up shot 或 Side view
字体搭配规则
- 主标题用衬线体(如 Didot),副标题和正文用无衬线体(如 SF Pro Display)。
- 这是奢侈品画册的标准组合,高级感强。
- 整套图只能用这 2 种字体,禁止混用第三种。
---
多图生成执行规则
当用户要求直接生成整套电商图片:
1. 先建立 Campaign Style Lock,并写入图片包计划。 2. 再为每张图建立编号、用途、画幅、图片内短文案和独立 Prompt。 3. 主图默认 1:1(2K);详情页图片默认 2:3(2K)。 4. 每张图使用独立 Prompt 文件,避免一次 Prompt 生成多屏拼图。 5. 每张独立 Prompt 必须以同一段 Campaign Style Lock 开头。 6. 输出目录用产品英文 slug,例如 generated-images/laundry-detergent-pods-pdp/。 7. 如果 API 或模型不支持某个尺寸,改用最接近的支持尺寸,并在结果中说明。 8. 如果缺少 .env 或生图配置,只输出完整 Prompt 包,不调用脚本。 9. 不要虚构认证、实验数据、评分、销量、真实评价或品牌授权。
---
直接生图规则
当用户要求生成图片:
1. 先输出最终 Prompt。 2. 短 Prompt 用 --prompt,长 Prompt 用 --prompt-file。 3. 根据平台选择 --size(比例格式),没有要求时默认 1:1。 4. --resolution 默认 2k,4K 仅限 6 个宽幅比例。 5. 只有用户指定目录时才使用 --output-dir,否则使用 generated-images/。 6. 如果缺少 IMG_API_KEY 等配置,不要调用脚本;返回 Prompt 和配置命令示例。
命令形状:
python3 scripts/generate_image.py --prompt "..." --size 1:1 --resolution 2k脚本支持:
--prompt--prompt-file--output-dir--size:比例格式(1:1、16:9、2:3、4:5等 14 种)--resolution:1k/2k/4k,默认2k--image:参考产品图片路径--poll-interval:轮询间隔秒数,默认5--timeout:轮询超时秒数,默认180--format:保存格式(仅影响扩展名),默认png
---
QA 检查
最终输出前确认:
- Prompt 符合用户真实目标。
- 已匹配正确的场景模板,Prompt 基于模板的
prompt_template组装。 - Prompt 保持简洁,只包含核心信息,没有冗余约束。
- 主体、构图、风格和用途明确。
- 商品 / 营销任务包含转化驱动力诊断。
- 证据缺失时不虚构效果、认证或数据。
- 图片内文字短且必要。
- UGC / 直播 / 社媒场景已应用 anti-AI 技巧(模板中的
anti_ai_tips字段)。 - 如有用户参考图片,已传入
--image参数。 - 负面约束覆盖常见失败点。
- 输出和文件里没有 API key 或私密凭据。
- 已应用 GPT-Image-2 铁律:hex 颜色、数字占比、显式留白、否定清单、平台预留空间。
- 多图任务已分配不同角度和景别,无连续 3 张相同角度,全景图占比 ≤ 40%。
- 详情页图片必须是电商信息图格式(含标题、图标、标签、利益点、步骤或信任徽章),不是单纯的多角度产品照片。每张详情页 Prompt 以
E-commerce infographic开头。 - 出图后提醒用户放大 200% 逐字核对中文笔画。
---
常见翻车点与防护
| 翻车 | 原因 | 防护 |
|---|---|---|
| 中文字笔画错 | 模型中文准确率约 95%,复杂字容易少笔画 | 放大 200% 逐字核对;复杂字换简单同义字 |
| 品牌色漂移 | 写"金色"出来 8 种金 | 全部用 hex 码(#D4AF37) |
| Logo 区域被填满 | 写"留空间"模型当没看见 | 写精确坐标:左上角 200×100 像素区域完全留白 |
| 背景不是纯白 | 写"白底"出来是淡灰 | 写 #FFFFFF |
| 产品太大或太小 | 没指定占比 | 写具体百分比:产品占画面 38% |
| 画面填满无留白 | 没写留白要求 | 显式声明:留白至少 50% |
| 连续多张视觉疲劳 | 背景色全部一样 | 交替使用 2-3 种背景色 |
| 全套图角度雷同 | AI 默认生成正面 3/4 角度,不指定就千篇一律 | 每张 Prompt 显式写明角度关键词;主图 ≥3 种角度,详情页 ≥4 种,穿插特写/微距 |
| 衣服/3C 翻车率高 | 对面料垂坠感、人体比例、接口按键细节要求太高 | 优先测护肤品、家居、食品等稳定品类;衣服用参考图 --image 提升一致性 |
| 详情页变成纯产品图 | 只写了多角度关键词,没有电商信息图结构(标题、图标、标签、卖点列表) | 每张详情页 Prompt 以 E-commerce infographic 开头,包含布局、文案、图标等电商元素;多角度是信息图内的展示手段而非目的 |
---
输出格式
Brief / Prompt 模式返回:
1. 匹配模板:使用的模板文件名和场景类型 2. Visual Brief 3. Final Image Prompt 4. Negative Constraints 5. Assumptions
商品或营销任务追加:
1. Conversion Driver Diagnosis 2. Campaign Style Lock,当任务包含多张图片 3. Hero Image Sequence(标注每张图对应的模板文件) 4. PDP Detail Image Sequence,当请求涉及详情页、PDP 或整套商品图 5. Copy Lines,如果图片需要文字 6. Test Priorities
Generate 模式返回:
1. 匹配模板:使用的模板文件名和场景类型 2. Final Image Prompt 3. Campaign Style Lock,多图任务必须返回 4. Image Pack Plan,包含每张图的编号、用途、尺寸、对应模板和短文案 5. Generated Files 6. Assumptions / Notes
# ===== 方案 A:apimart.ai(异步轮询,GPT-Image-2)=====
# 脚本自动检测 URL 含 "apimart" → 异步模式
# apimart=true
IMG_BASE_URL=https://api.apimart.ai/v1
IMG_MODEL=gpt-image-2
IMG_API_KEY=your-apimart-api-key
# ===== 方案 B:OpenAI 兼容 API(同步模式)=====
# 注释掉方案 A,取消注释以下三行即可切换
# apimart=false
# IMG_BASE_URL=https://api.openai.com/v1
# IMG_MODEL=gpt-image-1.5
# IMG_API_KEY=your-openai-api-key
.env
.env.*
!.env.example
__pycache__/
*.pyc
generated-images/
ecom-details-image Skill
一个面向 claude code / Codex / OpenClaw 的跨境电商和国内电商通用视觉创作 Skill。GPT-Image-2 上线以来,电商圈已经被刷屏了。图像生成的边界,如今又被推了一大步。下面是我精选的 25个高质量案例,涵盖纯色底产品主图、场景化生活图、平铺图、电商详情图、真实场景等等,全部配完整提示词,都可以利用 GPT-Image-2 API生成最终效果。一键生成电商相关图片!一键生成电商相关图片!输入产品图片和需求描述,自动生成完整的电商主图、详情页图片、社媒推广图、直播间场景图等全套视觉素材。 与众不同之处是:Campaign Style Lock 机制 和 强推广和重视转化效果。
它可以做两件事:
- 生成可执行的视觉简报和 AI 生图 Prompt。
- 在使用者配置自己的 OpenAI 兼容图片 API 后,直接调用 API 生成图片。
未配置 API 时,它仍然可以正常输出 Prompt;配置 API 后,可以直接出图。
适用场景
- 商品主图、详情页视觉、Amazon / Shopify / TikTok Shop 图片。
- 广告图、社媒图、活动 Banner、缩略图。
- 品牌视觉方向、创意概念、图像模型 Prompt。
- 跨境电商 PDP 转化视觉:诊断视觉驱动、痛点驱动、情感价值驱动。
- 电商整套图片包:默认规划 5 张主图 + 7-9 张详情页图片。
它的工作方式
1. Prompt / Brief 模式
当你只需要策略、视觉方向或 Prompt 时,Skill 会输出:
1. 视觉简报。 2. 最终图片 Prompt。 3. 负面约束。 4. 假设说明。
如果是商品或营销图,还会补充:
- 转化驱动力诊断。
- Campaign Style Lock,用来锁定整套图的色板、冷暖调、字体、背景、光线和布局。
- 主图 / 创意序列。
- PDP 详情页图片序列。
- 图片内文案建议。
- 测试优先级。
2. Generate 模式
当你明确要求“生图、生成图片、出图、render image”时,Skill 会:
1. 先生成最终 Prompt。 2. 如果是电商详情页或整套商品图,先建立 Campaign Style Lock。 3. 再拆成独立图片 Prompt,并把同一段 Campaign Style Lock 原样放进每张 Prompt。 4. 调用 scripts/generate_image.py。 5. 输出生成文件路径。
API 配置
这个 Skill 不内置任何 API,也不共享任何密钥。当前默认使用 apimart.ai 图像生成接口(GPT-Image-2),采用异步轮询模式。
在 .claude/skills/ecom-details-image/ 目录下创建 .env:
IMG_BASE_URL=https://api.apimart.ai/v1
IMG_MODEL=gpt-image-2
IMG_API_KEY=你的APIKey变量说明:
IMG_BASE_URL:API 根地址,默认https://api.apimart.ai/v1。IMG_MODEL:图片模型名,固定gpt-image-2。IMG_API_KEY:使用者在 apimart.ai/keys 获取的 API key。
脚本也兼容常见别名:OPENAI_BASE_URL、OPENAI_API_BASE、OPENAI_IMAGE_MODEL、OPENAI_MODEL、OPENAI_API_KEY。
不要把真实 API key 写进 README、SKILL.md、脚本、Git 提交或聊天记录。
异步轮询机制
apimart.ai 图像生成采用异步处理模式:
1. 提交任务 → 返回 task_id 2. 等待 15 秒后开始轮询 GET /v1/tasks/{task_id} 3. 每 5 秒查询一次,通常 30–60 秒完成 4. 任务完成后从返回的图片 URL 下载到本地
单张图费用约 $0.05(2K 分辨率),失败不扣费。
生图脚本用法
直接传入 Prompt:
python3 scripts/generate_image.py --prompt "clean product hero image, premium studio lighting, white background" --size 1:1从文件读取 Prompt:
python3 scripts/generate_image.py --prompt-file prompt.txt --output-dir outputs带参考产品图(图生图模式):
python3 scripts/generate_image.py --prompt "..." --size 1:1 --image data/product.jpg --resolution 2k更多参数:
python3 scripts/generate_image.py \
--prompt-file prompt.txt \
--output-dir generated-images \
--size 4:5 \
--resolution 2k \
--image data/product.jpg \
--poll-interval 5 \
--timeout 180指定其它 .env 文件:
python3 scripts/generate_image.py --env-file .env --prompt-file prompt.txt脚本参数:
--prompt:直接传入 Prompt。--prompt-file:从文本文件读取 Prompt。--output-dir:输出目录,默认generated-images/。--env-file:指定.env配置文件;不指定时从当前目录向上查找.env。--size:图片比例,默认1:1。可选值:auto、1:1、3:2、2:3、4:3、3:4、5:4、4:5、16:9、9:16、2:1、1:2、21:9、9:21。--resolution:输出分辨率档位,默认2k。可选值:1k、2k、4k(4K 仅支持 6 个宽幅比例)。--image:参考产品图片路径,传入后走图生图模式,提升产品一致性。--poll-interval:轮询间隔秒数,默认5。--timeout:轮询超时秒数,默认180。--format:图片保存格式,仅影响文件扩展名,默认png。
支持的图片比例与分辨率
| size | 1K | 2K | 4K |
|---|---|---|---|
1:1 | 1024×1024 | 2048×2048 | — |
3:2 | 1536×1024 | 2048×1360 | — |
2:3 | 1024×1536 | 1360×2048 | — |
4:3 | 1024×768 | 2048×1536 | — |
3:4 | 768×1024 | 1536×2048 | — |
5:4 | 1280×1024 | 2560×2048 | — |
4:5 | 1024×1280 | 2048×2560 | — |
16:9 | 1536×864 | 2048×1152 | 3840×2160 |
9:16 | 864×1536 | 1152×2048 | 2160×3840 |
2:1 | 2048×1024 | 2688×1344 | 3840×1920 |
1:2 | 1024×2048 | 1344×2688 | 1920×3840 |
21:9 | 2016×864 | 2688×1152 | 3840×1648 |
9:21 | 864×2016 | 1152×2688 | 1648×3840 |
脚本只使用 Python 标准库,不需要安装第三方依赖。
电商 PDP 图片包规则
当用户提到“详情页、PDP、Amazon A+、Shopify 商品页、主图堆栈、整套商品图、商品详情图片”时,Skill 默认不会只生成 5 张主图,而是输出完整图片包:
- 5 张主图:首图卖点、机制/功能、利益证明、对比或场景、优惠/保障。
- 7-9 张详情页图片:首屏承接、痛点放大、机制解释、核心利益、使用步骤、场景覆盖、对比选择、信任背书、FAQ/风险逆转/CTA。
- 主图默认
1:1(2K = 2048×2048)。 - 详情页图片默认
2:3(2K = 1360×2048),适合移动端纵向浏览。 - 每张图都使用独立 Prompt 文件,避免把多屏详情页挤在一张拼图里。
如果没有真实证据,Skill 只允许使用占位式证明表达,不编造认证、实验数据、评分、销量或真实评价。
多图风格一致性
整套图片生成前必须先创建 Campaign Style Lock,并把同一段风格锁定文本放进每一张图的 Prompt。它用于固定:
- 色板:背景色、文字色、强调色保持一致。
- 冷暖调:全套统一为冷调、暖调或中性调。
- 字体:统一一种字体风格,不混用衬线、手写、复古或卡通字体。
- 背景:统一棚拍背景、桌面场景或室内空间逻辑。
- 光线:统一光源方向、阴影强度和反光质感。
- 布局:统一留白、圆角、标签、编号、信息图组件。
- 图标:统一线宽、颜色和复杂度。
如果用户没有品牌规范,Skill 会使用一个保守的高级电商默认风格锁:
Campaign Style Lock: consistent premium ecommerce visual system across the entire image set; fixed palette of clean off-white background, deep charcoal text, one product-matched accent color, and one soft secondary accent; neutral-cool studio lighting; modern geometric sans-serif headline placeholders only; consistent rounded rectangular info labels; consistent thin-line icon style; clean high-end product photography mixed with minimal infographic elements; stable product scale and placement; generous whitespace; no color palette changes, no mixed fonts, no random backgrounds, no inconsistent lighting, no mismatched icon styles.输入示例
商品营销图:
产品:自发热眼罩
类别:睡眠与健康
价格区间:19–29 美元
受众:压力大的上班族
差异化点:40 分钟持续发热,无香可选,皮肤安全材料
证明资产:4.7 星评价,皮肤科测试报告,30 天保障
渠道:亚马逊 PDP + 主图堆栈
当前弱点:点击量尚可,加购率低
目标:提高转化率和信任感知
要求:生成 1 张主图 Prompt,并在已配置 API 时直接出图电商整套详情页图片:
产品:洗衣凝珠
类别:家居清洁
受众:忙碌家庭、租房用户、宿舍用户
差异化点:一颗一洗,预配比,减少倒液和脏手,香味清新
渠道:Shopify PDP + 商品主图
目标:让详情页也生成独立图片,不只生成 5 张主图
要求:生成完整图片包,并在已配置 API 时直接出图通用视觉图:
为一个 AI 写作工具生成官网首屏视觉。
风格:干净、现代、轻量科技感。
主体:笔记、文档、自动整理的知识卡片。
用途:官网 Hero 背景图。
尺寸:16:9。
不要出现可读文字。输出示例
1. Visual Brief
- 目标:突出轻量、可信、自动整理
- 主体:文档、知识卡片、柔和界面层次
- 风格:现代 SaaS、干净、低噪声
2. Final Image Prompt
Clean modern SaaS hero background image...
3. Negative Constraints
No readable text, no logos, no clutter...
4. Generated Files
generated-images/image-20260506-180000-01.png安全说明
- 每个使用者使用自己的
IMG_*环境变量。 - 仓库不会保存 API key。
- 不要提交
.env文件;仓库已用.gitignore忽略.env和.env.*。 - 分享 Skill 时,只分享代码和文档,不分享任何真实密钥。
- 如果你在公共终端或录屏环境中操作,不要直接展示
IMG_API_KEY。
局限性
- apimart.ai 采用异步轮询模式,单张图通常 30–60 秒完成。
- 4K 分辨率仅支持 6 个宽幅比例(
16:9、9:16、2:1、1:2、21:9、9:21)。 - 参考图最多 16 张,支持 URL 与 base64 混填。
- 生图质量、速度和费用取决于所选分辨率档位(1K / 2K / 4K)。
- 图片结果 URL 有效期 24 小时,脚本会自动下载到本地。
- 商品营销图中的效果承诺必须有证据支持;不要让图片文案虚构资质、认证或结果。
推荐工作流
1. 先让 Skill 生成视觉简报和 Prompt。 2. 人工确认画面目标、主体、平台尺寸和禁用内容。 3. 配置 IMG_* 环境变量后生成图片。 4. 对商品或广告图保留 2–3 个创意变体做 A/B 测试。
{
"id": "hero-image",
"name": "白底/纯色底产品主图",
"keywords": ["白底图", "主图", "hero image", "白背景", "product shot", "packshot", "产品照", "商品主图"],
"trigger_phrases": ["产品主图", "白底图", "白背景产品", "hero image", "电商主图", "纯色背景"],
"prompt_template": {
"type": "product photography",
"subject": "{product_description}",
"background": "clean white background",
"lighting": "soft diffused studio lighting, even illumination",
"composition": "centered, front view",
"quality": "8K, commercial e-commerce photography"
},
"defaults": {
"background": "clean white background",
"lighting": "soft diffused studio lighting",
"composition": "centered, front view"
},
"variants": {
"luxury": {
"description": "高端奢侈品风格",
"overrides": { "lighting": "Rembrandt lighting, subtle rim light", "background": "gradient from dark to light, premium feel" }
},
"fresh": {
"description": "清新自然风格",
"overrides": { "lighting": "bright natural light", "background": "light pastel tones" }
},
"tech": {
"description": "科技感风格",
"overrides": { "lighting": "dramatic side lighting", "background": "dark minimalist" }
},
"color": {
"description": "彩色背景风格",
"overrides": { "background": "{color} gradient background" }
}
},
"category_tips": {
"beauty": "emphasize texture and glow, show formula details",
"electronics": "highlight metallic finish, screen details, port precision",
"food": "vibrant colors, fresh appearance, show texture",
"fashion": "show fabric texture, drape quality, stitching details",
"home": "show material quality, craftsmanship, lifestyle appeal",
"jewelry": "macro detail, sparkle and cut quality, luxurious lighting"
},
"examples": [
"{product}, professional product photography on clean white background, soft diffused studio lighting, centered, 8K, commercial e-commerce photography, no shadows, no props",
"{product} on pure white seamless background, bright commercial studio lighting, centered, 3/4 profile, high resolution, marketplace ready, {material_description}",
"{product} floating slightly above white surface, softbox overhead, sharp rim light on edges, professional packshot, 8K, ultra-detailed textures"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "lifestyle-scene",
"name": "场景化生活图",
"keywords": ["场景图", "生活图", "lifestyle", "使用场景", "生活场景", "场景化", "lifestyle photography"],
"trigger_phrases": ["场景图", "生活图", "使用场景图", "lifestyle photo", "产品场景", "生活化展示"],
"prompt_template": {
"type": "lifestyle product photography",
"subject": "{product_description}",
"setting": "{scene_description}",
"lighting": "natural {time_of_day} light",
"composition": "{composition_style}",
"mood": "{mood_description}",
"quality": "8K, editorial lifestyle photography"
},
"defaults": {
"setting": "modern living space, clean and organized",
"lighting": "natural morning light through window",
"composition": "rule of thirds, product as focal point",
"mood": "warm and inviting"
},
"variants": {
"morning": {
"description": "早晨清新氛围",
"overrides": { "setting": "bright room with sunlight streaming through window", "lighting": "soft morning golden light, visible dust particles", "mood": "fresh, clean, new beginning" }
},
"cozy": {
"description": "温馨舒适氛围",
"overrides": { "setting": "warm cozy interior, soft textiles, candles", "lighting": "warm ambient lighting, soft golden tones", "mood": "comfortable, intimate" }
},
"outdoor": {
"description": "户外自然场景",
"overrides": { "setting": "outdoor natural setting, organic elements", "lighting": "golden hour natural sunlight", "mood": "natural, free, adventurous" }
},
"luxury": {
"description": "奢华高端场景",
"overrides": { "setting": "luxury spa/hotel, marble and gold fixtures", "lighting": "cinematic lighting, warm color grading", "mood": "premium, sophisticated" }
}
},
"category_tips": {
"beauty": "bathroom vanity with botanical elements, skincare ritual feel",
"electronics": "modern desk setup, minimal aesthetic, tech-forward",
"food": "kitchen counter or dining table, fresh ingredients, warm tones",
"fashion": "urban street or boutique fitting room, model wearing the item",
"home": "styled room interior, product naturally placed"
},
"examples": [
"{product} naturally placed in {scene}, morning sunlight through window, botanical touches, warm atmosphere, professional lifestyle photography, 8K",
"Cinematic luxury interior with marble walls and gold fixtures. {product} prominently displayed. Morning sunlight through frosted glass. Fresh flowers. Cinematic depth of field, warm color grading, 8K",
"{product} in cozy setting, warm ambient lighting, soft textiles, golden hour tones, lifestyle photography, authentic atmosphere"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "flat-lay",
"name": "平铺图",
"keywords": ["平铺图", "flat lay", "俯拍", "top-down", "flatlay", "俯视图"],
"trigger_phrases": ["平铺图", "flat lay", "俯拍", "top-down view", "产品平铺"],
"prompt_template": {
"type": "flat lay photography, top-down view",
"subject": "{product_description} as hero at bottom center",
"props": "{prop_list}",
"background": "{background_material}",
"color_palette": "{color_scheme}",
"lighting": "soft natural window light from top-left at 45 degrees",
"quality": "8K, editorial photography, no text, no watermark"
},
"defaults": {
"props": "carefully curated complementary objects",
"background": "ivory linen texture",
"color_palette": "ivory, blush, champagne gold, sage green"
},
"variants": {
"luxury": {
"description": "奢华仪式感",
"overrides": { "props": "gold foil flakes, pearl beads, dried flowers, silk ribbon, leather journal", "background": "ivory linen with subtle shadow from sheer curtains", "color_palette": "ivory, blush pink, champagne gold, soft cream" }
},
"minimal": {
"description": "极简风格",
"overrides": { "props": "only 2-3 essential items, clean lines", "background": "clean white surface", "color_palette": "white, gray, one accent color" }
},
"seasonal": {
"description": "季节主题",
"overrides": { "props": "seasonal elements matching theme", "color_palette": "season-appropriate color scheme" }
}
},
"category_tips": {
"beauty": "skincare ritual flat lay, open product showing formula, botanical elements",
"food": "ingredients spread, fresh produce, kitchen tools",
"fashion": "clothing + accessories + shoes arranged aesthetically, fabric textures",
"home": "decor items, textures, materials spread showing lifestyle"
},
"examples": [
"Luxurious {category} ritual flat lay, top-down photography. {product} with lid open showing texture as hero at bottom center. Surrounding: gold-tone palette, crystal bottle, dried lavender with silk ribbon, gold foil flakes, pearl beads. Background: ivory linen. Color: ivory, blush, champagne gold. Soft window light top-left at 45 degrees. 8K, no text, no watermark",
"{product} flat lay top-down as hero. Surrounding: {props}. {background} background. Color: {colors}. Soft window light top-left. Clean aesthetic, 8K",
"Professional {category} flat lay, top-down editorial. {product} centered with curated objects. {background} background. Strict color control. 8K, magazine quality, no text"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "detail-macro",
"name": "细节微距图",
"keywords": ["细节图", "微距", "macro", "特写", "close-up", "detail shot", "细节展示"],
"trigger_phrases": ["细节图", "微距图", "产品特写", "材质特写", "detail shot", "macro photography"],
"prompt_template": {
"type": "macro product photography",
"subject": "{product_description}, extreme close-up on {focus_area}",
"detail": "visible {texture_description}",
"lighting": "{lighting_style}",
"camera": "shot with {camera_setup}",
"quality": "ultra macro detail, 8K, professional product photography"
},
"defaults": {
"focus_area": "texture and material quality",
"detail": "fine texture, material grain, surface quality",
"lighting": "soft directional lighting highlighting texture",
"camera": "dedicated macro lens setup"
},
"variants": {
"texture": {
"description": "材质纹理展示",
"overrides": { "focus_area": "material surface showing grain and quality" }
},
"formula": {
"description": "产品配方展示",
"overrides": { "focus_area": "product formula showing cream/liquid texture", "detail": "formula consistency, light reflection" }
},
"craftsmanship": {
"description": "工艺细节展示",
"overrides": { "focus_area": "stitching, joints, edges, manufacturing precision" }
}
},
"category_tips": {
"beauty": "show cream formula texture, shimmer particles, light reflection",
"electronics": "show port precision, material finish, button detail",
"food": "show ingredient texture, cross-section, freshness",
"fashion": "show fabric weave, stitching quality, hardware detail",
"jewelry": "show gemstone cut, metal finish, clasp detail"
},
"examples": [
"Extreme close-up beauty macro, Canon EOS R5 100mm f/2.8 macro. {product} filling 80% of frame, focusing on {focus_area}. Visible pores, fine lines, natural imperfections, NOT retouched. Formula visible with realistic light reflection. Natural side lighting. 8K",
"Cinematic {category} close-up. {product} detail showing {texture_description}. Formula/texture visible between fingertips with subtle light reflection. Soft blur background. Dramatic side lighting, warm tones, 8K",
"Macro detail of {product}, Sony A7R V 90mm macro, focus stacking. Extreme detail showing {focus_area}. Professional product photography, 8K"
],
"anti_ai_tips": "For hand shots: specify real skin (visible knuckle lines, slight dryness on cuticles, natural warm tone). NOT retouched or smoothed.",
"supports_image_reference": true
}
{
"id": "poster-banner",
"name": "促销海报/Banner",
"keywords": ["海报", "poster", "banner", "促销", "广告图", "活动图", "promotion", "sale"],
"trigger_phrases": ["促销海报", "banner", "广告图", "活动海报", "促销图", "campaign poster", "sale banner"],
"prompt_template": {
"type": "promotional poster design",
"subject": "{product_description}",
"background": "{background_description}",
"headline": "{headline_text}",
"subtitle": "{subtitle_text}",
"price": "{price_info}",
"cta": "{cta_text}",
"style": "{visual_style}",
"quality": "high-resolution professional marketing design"
},
"defaults": {
"background": "gradient matching brand aesthetic",
"headline": "headline text",
"subtitle": "subtitle or description",
"price": "",
"cta": "Shop Now",
"style": "clean minimalist with accent colors"
},
"variants": {
"luxury": {
"description": "高端奢华风格",
"overrides": { "background": "full-bleed rich gradient, gold accents", "style": "luxury magazine editorial, gold foil, pearl embellishments" }
},
"minimal": {
"description": "极简现代风格",
"overrides": { "background": "clean white or light gradient", "style": "minimalist modern typography, generous white space" }
},
"festive": {
"description": "节日主题风格",
"overrides": { "background": "festive themed gradient with decorative elements", "style": "festive, cultural elements, seasonal motifs" }
},
"flash-sale": {
"description": "限时折扣风格",
"overrides": { "style": "bold attention-grabbing, high contrast, urgency elements" }
}
},
"category_tips": {
"beauty": "rose gold accents, elegant serif fonts, luxury gift aesthetic",
"electronics": "dark backgrounds, neon accents, futuristic typography",
"food": "warm colors, dynamic food elements, freshness cues",
"fashion": "editorial style, model inclusion, aspirational lifestyle"
},
"examples": [
"Luxury {category} campaign poster. Full-bleed gradient ivory to rose. Top: {headline} elegant serif. Center: {product} with decorative elements. {subtitle}. Bottom left: price {price} original crossed out. Bottom right: brand logo and {cta}. Gold foil accents, premium aesthetic, 2000x3000px",
"{category} promotional poster. {product} centered on {background}. Bold {headline} at top, price {price}, {cta} button. Clean minimalist, accent colors, professional layout, 2000x2000px",
"Holiday {category} gift campaign. {background} with decorative elements. Center: {product} with gift wrapping. Headline {headline} modern script. Price tag {price} decorative frame. Festive sophisticated, warm cinematic lighting, 1080x1350px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "social-media",
"name": "社交媒体素材",
"keywords": ["社交媒体", "小红书", "instagram", "tiktok", "种草", "社媒", "social media"],
"trigger_phrases": ["社交媒体图", "小红书图", "Instagram", "TikTok", "种草图", "社媒素材", "social media post"],
"prompt_template": {
"type": "social media content",
"subject": "{product_description}",
"platform": "{platform_style}",
"composition": "phone camera perspective, slightly off-center",
"lighting": "natural indoor lighting",
"overlay": "{overlay_elements}",
"quality": "authentic smartphone photography aesthetic"
},
"defaults": {
"platform": "Instagram post style",
"composition": "casual phone framing, slightly imperfect",
"lighting": "natural window light, warm color tone",
"overlay": "minimal stickers and text badges"
},
"variants": {
"xiaohongshu": {
"description": "小红书种草风格",
"overrides": { "platform": "Xiaohongshu RED app lifestyle photo, iPhone shot", "composition": "slightly tilted like quick grab shot", "lighting": "iPhone warm auto-white-balance, Kodak Portra 400 color feel", "overlay": "Xiaohongshu sticker, casual text, star rating" }
},
"instagram": {
"description": "Instagram帖子风格",
"overrides": { "platform": "Instagram post premium aesthetic", "composition": "clean framing with visual hierarchy", "overlay": "engagement badges, hashtag elements" }
},
"tiktok": {
"description": "TikTok/Reels封面风格",
"overrides": { "platform": "TikTok/Reels thumbnail, vertical format", "overlay": "trending audio icon, duet prompt, engagement metrics" }
}
},
"category_tips": {
"beauty": "show product in use on skin, texture close-up, real results",
"food": "overhead dish/drink shot, appetizing colors, 45-degree angle",
"fashion": "mirror selfie or outfit grid, casual styling, real-person aesthetic",
"home": "corner shot in styled room, cozy atmosphere, warm tones"
},
"examples": [
"Ultra-realistic Xiaohongshu RED product lifestyle photo, iPhone 15 Pro, NOT professional photographer. Slightly tilted angle, {product} on {surface}, lid off showing texture. Environmental details: slight water stain, natural shadows, lived-in feel. iPhone warm auto-white-balance, natural noise, NOT sharpened, Kodak Portra 400 feel, NOT AI-generated look, 8K, 1080x1350px",
"Instagram post format. {product} with overlay text, clean aesthetic. Feature cards showing benefits. Engagement icons. Hashtag tags. Square format, lifestyle aesthetic, 1080x1080px",
"Premium social media content, TikTok thumbnail. {product} in lifestyle setting. Timestamp badge, engagement metrics, product card. Trending audio icon. Color gradient frame. Viral-worthy composition, 1080x1920px"
],
"anti_ai_tips": "Specify phone model. Add imperfection: noise, warm cast, not centered, slight blur. Use 'NOT AI-generated look'. Reference Kodak Portra 400 tone. Show lived-in environment.",
"supports_image_reference": true
}
{
"id": "ugc-style",
"name": "UGC风格/买家秀",
"keywords": ["UGC", "买家秀", "用户生成", "真实用户", "user generated", "GRWM", "真实感"],
"trigger_phrases": ["UGC图", "买家秀", "用户图", "真实买家", "GRWM", "user-generated", "真实分享"],
"prompt_template": {
"type": "authentic UGC snapshot",
"subject": "{product_description}",
"style": "smartphone front camera selfie, casual snapshot, NOT professional photography",
"environment": "real lived-in space, slightly messy, NOT styled",
"lighting": "indoor lighting with warm yellow cast, uneven",
"imperfection": "visible noise/grain, imperfect framing, off-center, slightly tilted",
"quality": "raw phone photo with natural imperfections, NOT AI-generated look, NOT studio quality"
},
"defaults": {
"style": "iPhone front camera, candid snapshot",
"environment": "real bathroom or bedroom, lived-in details",
"lighting": "warm indoor overhead lighting, slight yellow cast",
"imperfection": "noise in shadows, not oversharpened, slight highlight overexposure"
},
"variants": {
"mirror-selfie": {
"description": "浴室镜自拍",
"overrides": { "style": "iPhone front camera mirror selfie", "environment": "bathroom mirror, slight condensation and fog marks", "imperfection": "phone case at edge, finger smudge on mirror" }
},
"ccd-retro": {
"description": "CCD复古胶片感",
"overrides": { "style": "vintage 2005 CCD digicam photo, direct flash, cheap camera aesthetic", "lighting": "harsh direct on-camera flash, strong warm yellow-green color shift, blown-out highlights", "imperfection": "heavy film grain, overexposed skin on forehead and nose, flash hotspot, chromatic aberration at edges, red date stamp bottom-right corner" }
},
"grwm": {
"description": "GRWM跟我一起准备",
"overrides": { "style": "Get Ready With Me video thumbnail, morning routine", "environment": "vanity mirror, slightly messy counter" }
},
"unboxing": {
"description": "开箱分享",
"overrides": { "style": "casual unboxing photo on bed or desk", "environment": "bed with wrinkled sheets or cluttered desk" }
}
},
"category_tips": {
"beauty": "product in use on real skin, visible pores, bathroom setting",
"food": "phone snap on table, casual restaurant or home",
"fashion": "mirror selfie wearing item, bedroom or fitting room",
"electronics": "desk setup with product in use, realistic cables",
"home": "product in actual living space, not perfectly styled"
},
"examples": [
"Bathroom mirror selfie, iPhone front camera. Person with {product}. Mirror has slight condensation. Warm yellowish indoor lighting. {product} label recognizable but not centered. Skin: visible pores, slight redness, NOT flawless. Warm yellow cast, phone noise, natural unposed, NOT AI-generated look, authentic UGC, 1080x1350px",
"Vintage 2005 CCD digicam photo, harsh direct flash. Heavy film grain, blown-out highlights on face, strong yellow-green color cast, chromatic aberration at edges. Person holding {product} with casual peace sign. Genuine candid expression. Dim bedroom with string lights, unmade bed. Off-center, slightly tilted composition. Red date stamp '06.12.25' in bottom-right corner. Low resolution, NOT sharp, NOT AI-generated look, raw snapshot, 1080x1350px",
"Authentic GRWM photo. Person in casual setting showing {product}. Natural imperfect lighting, slightly messy background. Phone selfie angle. Genuine expression. Warm tones, candid smartphone photography, NOT AI-generated look, 1080x1620px"
],
"anti_ai_tips": "CRITICAL: (1) Specify phone model (iPhone 14 Pro/15), (2) Add imperfection (pores, noise, warm cast, off-center), (3) Candid language (NOT professional), (4) Real environment (slightly messy), (5) Avoid AI words (no perfect, flawless, stunning), (6) State 'NOT AI-generated look', (7) Reference Kodak Portra 400 tone",
"supports_image_reference": true
}
{
"id": "model-showcase",
"name": "模特展示图",
"keywords": ["模特", "model", "人物展示", "模特图", "真人展示", "人物图"],
"trigger_phrases": ["模特图", "真人展示", "人物图", "model photo", "模特展示", "人物展示图"],
"prompt_template": {
"type": "editorial beauty/fashion photography",
"subject": "{person_description} with {product_description}",
"camera": "shot with {camera_setup}",
"lighting": "natural window light creating realistic highlights",
"skin_detail": "visible pores, natural skin texture, NOT retouched",
"expression": "{expression_description}",
"quality": "professional editorial photography, 8K"
},
"defaults": {
"camera": "Canon EOS R5, 85mm f/1.4 lens",
"lighting": "natural window light from left, realistic highlights",
"skin_detail": "visible pores, natural under-eye shadows, slight texture unevenness",
"expression": "authentic relaxed, subtle natural asymmetry"
},
"variants": {
"beauty-closeup": {
"description": "美妆极致特写",
"overrides": { "camera": "Canon EOS R5, 100mm f/2.8 macro", "skin_detail": "incredibly detailed: pores, fine lines, freckles, NOT retouched", "expression": "eyes half-closed, peaceful self-care moment" }
},
"fashion-full": {
"description": "时尚全身展示",
"overrides": { "camera": "Canon EOS R5, 50mm f/1.2", "expression": "confident direct gaze, editorial pose" }
},
"candid": {
"description": "自然抓拍",
"overrides": { "camera": "iPhone 15 Pro main camera", "expression": "genuine candid, mid-action", "skin_detail": "natural texture, slight blemishes, relatable" }
}
},
"category_tips": {
"beauty": "extreme close-up on application moment, formula texture on skin, real skin mandatory",
"fashion": "full outfit showcase, pose highlighting garment, editorial lighting",
"accessories": "product being worn/used, hand or body detail, lifestyle context",
"sports": "active pose in appropriate setting, show performance"
},
"examples": [
"Extreme close-up beauty macro, Canon EOS R5 100mm f/2.8 macro. Face filling 80% of frame, {product} being applied on {focus_area}. Skin incredibly detailed: pores, fine lines, natural imperfections, NOT retouched. Formula visible with realistic reflection. Natural side lighting. NOT AI-generated look, 8K, 1080x1350px",
"Fashion editorial. {person} with {product}, Canon EOS R5 85mm f/1.4. Natural window light, visible pores, natural shadows, authentic expression, soft bokeh, warm golden tones, 1080x1350px",
"Candid beauty moment. {person} with {product}, iPhone front camera. Natural lighting, visible pores and texture, relaxed candid, NOT AI-generated look, documentary style, 1080x1350px"
],
"anti_ai_tips": "MANDATORY: (1) Real camera (Canon EOS R5 / Sony A7 IV), (2) Visible skin imperfections (pores, uneven tone, blemishes, fine lines), (3) Natural expression asymmetry, (4) 'NOT retouched, NOT AI-generated look', (5) Real lighting (natural window, NOT studio-perfect), (6) Natural hand details (knuckle lines, cuticle texture)",
"supports_image_reference": true
}
{
"id": "before-after",
"name": "使用前后对比图",
"keywords": ["对比", "before after", "前后", "效果对比", "transformation", "变化图"],
"trigger_phrases": ["对比图", "前后对比", "before after", "效果展示", "使用效果", "transformation"],
"prompt_template": {
"type": "before/after comparison visualization",
"subject": "{product_description}",
"before_state": "{before_description}",
"after_state": "{after_description}",
"metrics": "{data_points}",
"divider": "elegant center divider",
"quality": "professional campaign photography"
},
"defaults": {
"before_state": "dull, dry, uneven appearance",
"after_state": "radiant, smooth, healthy appearance",
"metrics": "improvement percentage",
"divider": "elegant gold line with arrow"
},
"variants": {
"clinical": {
"description": "临床数据风格",
"overrides": { "metrics": "detailed data grid with 4+ metrics and percentage arrows" }
},
"cinematic": {
"description": "电影感蜕变",
"overrides": { "before_state": "moody dramatic, cool tone", "after_state": "bright warm golden hour, warm tone", "divider": "decorative vintage frame with product" }
},
"simple": {
"description": "简洁信息图",
"overrides": { "metrics": "simple progress bar with key metric" }
}
},
"category_tips": {
"beauty": "show skin texture change, include moisture/radiance percentage data",
"fitness": "body transformation, consistent pose and lighting",
"home": "room before/after renovation or cleaning",
"automotive": "vehicle before/after detailing"
},
"examples": [
"Cinematic before/after {category} transformation. Left: moody lighting showing {before}, cool tone. Right: bright golden hour showing {after}, warm tone. Center: decorative frame with product. Bottom: comparison data grid. Premium campaign layout, 8K, 1080x1620px",
"Premium before/after comparison. Left: {before_state}, caption 'Before'. Right: {after_state}, caption 'After'. Gold divider with arrow. Bottom: progress metrics {data}. Product thumbnail. Clean clinical aesthetic, 1080x1080px",
"{category} comparison visualization. Split: {before_state} left, {after_state} right. Key metrics below. White background, professional style, 1080x1080px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "packaging",
"name": "包装设计展示",
"keywords": ["包装", "packaging", "礼盒", "gift box", "包装设计", "unboxing", "开箱"],
"trigger_phrases": ["包装设计", "包装展示", "礼盒图", "packaging design", "开箱图", "gift box"],
"prompt_template": {
"type": "packaging design visualization",
"subject": "{product_description}",
"display": "{packaging_components}",
"surface": "premium marble surface",
"decorative": "scattered luxury elements",
"lighting": "soft directional with metallic reflections",
"quality": "premium design presentation, 8K"
},
"defaults": {
"display": "full spread: product, outer box, tissue, ribbon, brand card",
"decorative": "gold foil, pearls, dried petals, silk fabric"
},
"variants": {
"luxury-gift": {
"description": "奢华礼盒",
"overrides": { "display": "gift box opened: outer box, inner tray, product, ribbon, brand card", "decorative": "gold foil, pearls, dried roses, silk scarf" }
},
"minimal-eco": {
"description": "极简环保",
"overrides": { "display": "sustainable packaging: recycled paper, soy ink, simple label", "decorative": "natural elements, dried leaves, twine" }
},
"unboxing": {
"description": "开箱体验",
"overrides": { "display": "unboxing sequence: box opening, tissue reveal, product discovery" }
}
},
"category_tips": {
"beauty": "label design, ingredient preview, formula through transparent elements",
"food": "nutritional info area, ingredient imagery, freshness seals",
"fashion": "branded tissue, garment tag, care instructions, shopping bag",
"electronics": "box design, inner foam, cable organization, quick-start guide"
},
"examples": [
"Luxury {category} packaging concept. Full spread: (1) product with lid, label visible, (2) outer gift box: embossed pattern, gold logo, magnetic closure, (3) tissue with subtle watermark, (4) satin ribbon with monogram, (5) brand card gold foil, (6) sustainable fill. On marble with gold foil, pearls, dried petals. Soft directional lighting, metallic reflections. Premium presentation, 8K, 1080x1620px",
"Premium packaging showcase. {product} in gift box open, tissue, ribbon, brand card, luxury unboxing. Professional photography, 1080x1080px",
"{category} packaging concept on white. Multiple angles, clean presentation, design mockup, 1080x1080px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "infographic",
"name": "信息图/A+Content",
"keywords": ["信息图", "infographic", "A+", "详情页", "卖点图", "产品信息图", "产品详情"],
"trigger_phrases": ["信息图", "产品信息图", "详情页图", "A+Content", "卖点图", "infographic"],
"prompt_template": {
"type": "e-commerce product infographic",
"subject": "{product_description}",
"features": "{feature_list}",
"layout": "structured sections with clear hierarchy",
"data_vis": "{data_elements}",
"color_scheme": "{brand_colors}",
"quality": "professional e-commerce design, mobile-friendly"
},
"defaults": {
"features": "4-6 key features with icons and descriptions",
"layout": "clean grid, product as focal point",
"data_vis": "simple charts or comparison tables",
"color_scheme": "brand-consistent palette"
},
"variants": {
"amazon-a-plus": {
"description": "亚马逊A+风格",
"overrides": { "layout": "4-quadrant module with banner, feature blocks, comparison, badges", "data_vis": "comparison table, ingredient chart, certification badges" }
},
"feature-grid": {
"description": "卖点网格",
"overrides": { "layout": "product centered with callout lines to feature blocks" }
},
"story-flow": {
"description": "故事线信息流",
"overrides": { "layout": "vertical story: problem → solution → features → results" }
}
},
"category_tips": {
"beauty": "ingredient breakdown with %, before/after data, dermatologist badges",
"electronics": "spec comparison, performance metrics, compatibility icons",
"food": "nutritional visualization, ingredient sourcing, recipe flow",
"fashion": "size guide, material composition, care instructions"
},
"examples": [
"Complex Amazon A+ Content module. Top banner with brand and tagline. Main: 4 quadrants each showing product detail with labeled feature: (1) {f1}, (2) {f2}, (3) {f3}, (4) {f4}. Below: comparison table. Bottom: spec chart and certification badges. {color} palette. Mobile-first, professional e-commerce, 2000x2500px",
"Product infographic. Left: {product} on gradient. Right: {n} feature blocks with icons vertically, callout lines connecting to product. Clean modern, {color} accents, 2000x2000px",
"{category} specification guide. Product centered with dimension callouts. Feature highlights with icons. Data visualization. Clean typography, mobile-friendly, 2000x2000px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "creative-concept",
"name": "创意概念广告图",
"keywords": ["创意图", "概念图", "creative", "概念广告", "品牌广告", "创意广告", "concept art"],
"trigger_phrases": ["创意广告", "概念图", "品牌广告", "创意素材", "品牌宣传", "creative concept"],
"prompt_template": {
"type": "creative advertising photography",
"subject": "{product_description}",
"concept": "{creative_concept}",
"effects": "{special_effects}",
"color_palette": "{bold_palette}",
"art_direction": "{art_style}",
"quality": "award-winning advertising photography, ultra-detailed, cinematic"
},
"defaults": {
"concept": "dynamic product with unexpected visual elements",
"effects": "dramatic visual impact",
"color_palette": "bold unusual combinations",
"art_direction": "strong visual narrative"
},
"variants": {
"splash-dynamic": {
"description": "飞溅动态效果",
"overrides": { "effects": "water splash / powder explosion frozen in motion, high-speed photography", "art_direction": "dramatic, vivid, commercial style" }
},
"surreal": {
"description": "超现实概念",
"overrides": { "concept": "product in unexpected surreal environment", "effects": "gravity-defying, impossible geometry" }
},
"minimal-art": {
"description": "极简艺术风格",
"overrides": { "concept": "product as art object in minimalist composition", "color_palette": "monochromatic or two-tone" }
}
},
"category_tips": {
"beauty": "floating product with splash, ethereal lighting, formula particles",
"electronics": "holographic interfaces, data visualization, futuristic",
"food": "ingredient explosion, dynamic pour/splash, steam and fire",
"fashion": "editorial art direction, dramatic poses, fabric in motion"
},
"examples": [
"{product} floating in {dramatic_environment}, {effects: splash/particles/smoke}, {bold colors}, art direction: {style}, ultra-detailed, cinematic lighting, award-winning advertising, 8K",
"{product} with dynamic elements frozen in motion, high-speed photography, dramatic lighting, vivid colors, commercial {category}. Bold concept, 8K",
"Creative advertising. {product} in {artistic setting}. {colors} palette. Dramatic lighting with {effects}. Art direction: {style}. Award-winning, cinematic, 8K"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "size-spec",
"name": "尺寸规格+使用步骤图",
"keywords": ["尺寸", "规格", "尺寸图", "使用步骤", "规格图", "dimension", "how to use", "使用指南"],
"trigger_phrases": ["尺寸图", "规格图", "使用步骤图", "尺寸标注", "how to use", "使用指南", "产品规格"],
"prompt_template": {
"type": "product specification and usage guide infographic",
"subject": "{product_description}",
"dimensions": "{size_annotations}",
"steps": "{usage_steps}",
"extras": "{additional_info}",
"style": "clean professional layout",
"quality": "professional e-commerce infographic"
},
"defaults": {
"dimensions": "height, width with measurement lines and arrows",
"steps": "3-4 step numbered usage guide with icons",
"extras": "ingredient highlights or feature badges",
"style": "clean white, professional typography"
},
"variants": {
"premium-editorial": {
"description": "高端杂志风格",
"overrides": { "style": "luxury editorial with decorative elements, gold accents, premium typography" }
},
"technical": {
"description": "技术规格风格",
"overrides": { "dimensions": "detailed specs with reference objects for scale", "extras": "comparison charts, certification badges, data grids" }
},
"ritual-guide": {
"description": "使用仪式指南",
"overrides": { "steps": "decorative numbered ritual guide with small illustrations" }
}
},
"category_tips": {
"beauty": "dimension callout badge, usage ritual steps, ingredient percentages",
"electronics": "precise dimensions with comparison objects, port specs",
"food": "serving size, preparation steps, nutritional highlights",
"fashion": "size chart with body measurements, care instructions"
},
"examples": [
"Premium {category} specification and ritual guide, luxury editorial. White background, subtle border. Top: {product} centered with dimension badge. Left: 4-step usage guide with decorative icons. Right: highlights with colored pills. Bottom: {data}. Decorative corner accents. Magazine-quality, 2000x2800px",
"Product detail card. Left: {product} with dimension annotations {measurements}, arrows and lines. Right: {n}-step usage guide with icons. White background, minimal, professional, 2000x1500px",
"{category} specification card. {product} with detailed dimensions and reference object. Usage steps with icons. Key features. Clean layout, mobile-friendly, 2000x2000px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "multi-product",
"name": "多产品套装/组合展示",
"keywords": ["套装", "组合", "多产品", "bundle", "gift set", "礼盒", "系列展示"],
"trigger_phrases": ["套装图", "多产品展示", "产品组合", "bundle image", "礼盒展示", "系列图", "gift set"],
"prompt_template": {
"type": "multi-product bundle photography",
"subject": "{product_set_description}",
"arrangement": "organized composition, all products clearly visible",
"background": "{background_description}",
"decorative": "{decorative_elements}",
"quality": "professional product photography, 8K"
},
"defaults": {
"arrangement": "organized with consistent spacing, all visible, no overlap",
"background": "clean suitable for showcase",
"decorative": "luxury elements for gift-ready presentation"
},
"variants": {
"gift-set": {
"description": "礼盒套装",
"overrides": { "arrangement": "products in gift box with cards", "decorative": "satin ribbon, gold foil, dried flowers, pearls" }
},
"routine-set": {
"description": "使用程序套装",
"overrides": { "arrangement": "products in order of use, step indicators" }
},
"lineup": {
"description": "产品线排列",
"overrides": { "arrangement": "neat row, hero centered and larger", "decorative": "minimal, clean", "background": "white seamless" }
}
},
"category_tips": {
"beauty": "complete routine (cleanser → toner → serum → cream), gift-ready",
"food": "product range, variety pack, flavor assortment",
"fashion": "outfit coordination pieces, colorway options",
"home": "collection of coordinating items"
},
"examples": [
"Luxury {category} gift set on premium surface: {product_list}. Organized composition with product cards. Scattered: gold foil, pearls, dried flowers, velvet ribbon. Bottom left: set description. Bottom right: price with original crossed out. Soft directional lighting, premium photography, 8K",
"Premium {category} routine set. Main product centered, lid open showing texture. Surrounding: routine products arranged naturally. Soft background, decorative elements. Warm studio lighting, gift-ready, 2000x2000px",
"{category} gift set display. {n} products neat row, consistent spacing. Clean photography, soft shadows, professional bundle image, no text, 2000x2000px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "livestream",
"name": "电商直播间场景",
"keywords": ["直播", "livestream", "直播间", "电商直播", "直播截图", "抖音直播", "带货"],
"trigger_phrases": ["直播图", "直播间截图", "电商直播", "livestream", "抖音直播", "带货图", "live commerce"],
"prompt_template": {
"type": "e-commerce livestream screenshot",
"host": "{host_description}",
"product_action": "{product_demonstration}",
"background": "real home-style livestream setup",
"ui_overlay": "live commerce UI elements",
"lighting": "ring light from front, warm indoor overhead mixing in",
"quality": "authentic phone screen capture, NOT AI-generated look"
},
"defaults": {
"host": "friendly person, natural expression, visible skin texture, NOT retouched",
"product_action": "holding product close to camera showing details",
"background": "organized but real product shelf, LED strip, small plants",
"ui_overlay": "viewer count, LIVE badge, comments, product card, buy button",
"lighting": "ring light circular catchlight in eyes, warm indoor overhead"
},
"variants": {
"douyin": {
"description": "抖音直播风格",
"overrides": { "ui_overlay": "Douyin UI: LIVE badge, viewer count, scrolling comments, product card with price and buy button, gift icons, shopping cart" }
},
"taobao": {
"description": "淘宝直播风格",
"overrides": { "ui_overlay": "Taobao Live UI: product listing, coupon badges, viewer count, chat" }
},
"setup": {
"description": "直播间布景展示",
"overrides": { "ui_overlay": "no UI overlay, showing physical setup", "background": "full view of studio with lighting, backdrop, shelves" }
}
},
"category_tips": {
"beauty": "host demonstrating application, showing texture, real-time swatching",
"fashion": "host wearing/showing clothing, fit demo, fabric close-up",
"food": "host tasting/preparing, showing freshness, unboxing",
"electronics": "host demonstrating features, hands-on product demo"
},
"examples": [
"Ultra-realistic Douyin livestream screenshot, phone screen capture. Host in casual {outfit}, minimal makeup, visible pores and skin texture, NOT retouched. Demonstrating {product}, showing details, other hand gesturing. Ring light natural shine, NOT plastic AI look. Background: real home setup - product shelf, whiteboard with prices, string lights, coffee mug. Phone UI: LIVE badge, viewer count, scrolling comments, product card with price, yellow buy button. Warm cast, slight noise, Kodak Portra 400 tone, NOT AI-generated look, 1080x1920px",
"Phone screenshot of livestream. Host holding {product}. Ring light catchlight. Product shelf behind. Phone noise, warm indoor, NOT professional, real livestream feel, 1080x1920px",
"Livestream scene. Host with {product} in home studio. Ring light, visible skin texture. Product display. Live UI elements. Authentic phone capture, 1080x1920px"
],
"anti_ai_tips": "CRITICAL: (1) Phone screen capture style, (2) Ring light: circular catchlight in eyes, (3) Real skin: pores, undereye darkness, NOT smoothed, (4) Real environment: slightly messy, real objects, (5) Warm yellowish cast, (6) Slight noise, (7) 'NOT AI-generated look, NOT plastic smooth', (8) Kodak Portra 400 tone, (9) Realistic UI overlay",
"supports_image_reference": true
}
{
"id": "try-on-virtual",
"name": "虚拟试穿/产品融入场景",
"keywords": ["试穿", "融入", "虚拟试穿", "try on", "场景融合", "产品融入", "product placement"],
"trigger_phrases": ["虚拟试穿", "产品融入场景", "try on", "场景融合", "产品植入", "场景化融入"],
"prompt_template": {
"type": "product integration / virtual try-on",
"subject": "{product_description} naturally integrated into {scene_type}",
"setting": "{detailed_scene}",
"atmosphere": "{mood_and_lighting}",
"integration": "product prominently displayed, naturally belonging in scene",
"quality": "cinematic lifestyle photography, 8K"
},
"defaults": {
"setting": "luxury interior or lifestyle environment matching product",
"atmosphere": "warm, inviting, aspirational",
"integration": "product as natural focal point"
},
"variants": {
"interior-luxury": {
"description": "奢华室内场景",
"overrides": { "setting": "high-end spa/hotel/luxury home, marble, gold fixtures", "atmosphere": "cinematic depth, warm grading, premium" }
},
"outdoor-natural": {
"description": "户外自然场景",
"overrides": { "setting": "natural outdoor, organic elements", "atmosphere": "golden hour sunlight, natural and free" }
},
"studio-editorial": {
"description": "棚拍编辑风格",
"overrides": { "setting": "professional studio with styled backdrop", "atmosphere": "controlled studio lighting, editorial quality" }
}
},
"category_tips": {
"beauty": "spa bathroom, vanity mirror, botanical elements, skincare ritual",
"fashion": "model wearing item in appropriate setting, natural styling",
"furniture": "product in complete room setting, complementary decor",
"electronics": "modern desk setup, in-use context, tech-forward"
},
"examples": [
"Cinematic luxury {category} integration. High-end {interior} with {materials}. {product} prominently displayed. Morning sunlight through frosted glass, ethereal light rays. Fresh flowers, botanical elements. Product label visible, ingredient card beside it. Decorative: tray, pearls, gold foil. Color: {colors}. Cinematic depth, warm grading, premium, 8K, 1080x1620px",
"{product} naturally in {scene}, morning sunlight, soft shadows, botanical touches, warm atmosphere, professional lifestyle photography, 8K, 1080x1350px",
"{product} integrated into complete {category} lifestyle scene. {person} at {location}, products arranged naturally, natural light, warm atmosphere. Professional lifestyle, 1080x1350px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "exploded-view",
"name": "技术拆解/爆炸图",
"keywords": ["拆解图", "爆炸图", "exploded view", "技术图", "结构图", "内部结构", "拆机", "teardown", "cross-section"],
"trigger_phrases": ["产品拆解", "爆炸图", "内部结构", "技术拆解", "exploded view", "产品组件", "零件展示"],
"prompt_template": {
"type": "technical product exploded view",
"subject": "{product_description}",
"components": "{component_list}",
"arrangement": "vertical stack with increasing spacing",
"background": "clean light gray or white",
"labels": "thin leader lines to callout labels with name and key spec",
"quality": "8K, technical illustration, precise component rendering"
},
"defaults": {
"arrangement": "vertical exploded stack",
"background": "clean light gray",
"labels": "component name + material + core spec"
},
"variants": {
"blueprint": { "description": "蓝图风格", "overrides": { "background": "dark charcoal with cyan grid lines", "labels": "white and gold typography, blueprint aesthetic" } },
"minimal": { "description": "极简白底", "overrides": { "background": "pure white, no grid", "labels": "minimal black text, thin gray leader lines" } },
"apple-style": { "description": "Apple产品拆解风格", "overrides": { "arrangement": "isometric floating with precise spacing", "background": "deep gradient from charcoal to black", "labels": "elegant sans-serif, golden accent lines" } },
"editorial": { "description": "杂志编辑风格", "overrides": { "background": "warm off-white with subtle texture", "labels": "serif font callouts, hand-drawn arrow style" } }
},
"category_tips": {
"electronics": "highlight circuit boards, chips, battery modules with spec labels",
"audio": "show speaker drivers, diaphragms, ANC modules, battery size",
"wearables": "include sensors, display panel, waterproof seals, strap mechanism",
"home_appliance": "show motor, filter system, internal wiring, control board",
"phone_accessories": "highlight charging coils, magnet arrays, protective layers",
"camera": "show lens elements, sensor, image processor, stabilization unit"
},
"examples": [
"Product exploded view. {product} disassembled into 5 components floating in mid-air with spacing, arranged vertically. Clean light gray background. Soft shadows beneath each part. Technical illustration style, 8K, no text",
"{product} technical exploded view infographic. Components floating in isometric arrangement with thin connecting lines. Each component labeled with name and key spec. Clean white background, blueprint-inspired accent lines, 8K"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "ghost-mannequin",
"name": "隐形模特",
"keywords": ["隐形模特", "ghost mannequin", "invisible model", "3D服装", "服装展示", "无人模特", "中空模特", "flat mannequin"],
"trigger_phrases": ["隐形模特", "ghost mannequin", "3D服装展示", "无人穿着展示", "服装立体展示", "invisible mannequin"],
"prompt_template": {
"type": "ghost mannequin product photography",
"subject": "{product_description}",
"form": "invisible mannequin creating natural 3D body shape",
"details": "natural shoulder slope, bust/chest contour, waist curve visible",
"background": "clean white or soft gray gradient",
"lighting": "three-point studio setup, gentle dimension",
"quality": "8K, fashion e-commerce standard photography"
},
"defaults": {
"form": "natural body contours - shoulders, bust, waist",
"background": "soft warm gray gradient",
"lighting": "three-point studio setup creating gentle dimension"
},
"variants": {
"white-clean": { "description": "纯白干净", "overrides": { "background": "pure white seamless", "lighting": "bright even commercial lighting" } },
"editorial": { "description": "杂志风格", "overrides": { "background": "moody dark gradient from charcoal to deep gray", "lighting": "spotlight from above creating dramatic highlight on shoulders" } },
"editorial-detail": { "description": "展示内衬细节", "overrides": { "details": "garment partially open revealing inner lining tag, rolled sleeves showing lining contrast" } },
"lifestyle": { "description": "带环境道具", "overrides": { "background": "minimal studio with subtle editorial prop - single branch or flower in corner" } }
},
"category_tips": {
"shirts": "collar standing naturally, top buttons detail, cuff visibility",
"dresses": "natural waist cinch, skirt drape showing fabric weight, back zipper detail",
"coats": "architectural shoulder structure, fabric texture visible, button and pocket details",
"knitwear": "visible knit pattern and texture, natural stretch around body contours",
"tshirts": "casual relaxed drape, crew or v-neck sitting naturally, sleeve length proportion",
"activewear": "compression fit showing body contour, moisture-wicking fabric texture, logo placement"
},
"examples": [
"Ghost mannequin photography. {product} on invisible mannequin, natural body contours visible. Fabric drapes naturally showing material weight. Pure white background. Soft studio lighting, 8K, fashion e-commerce standard",
"Premium ghost mannequin photography. {product} on invisible mannequin, garment partially open revealing inner lining. Background: soft warm gray gradient. Three-point studio lighting, Phase One quality, 8K"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "multi-angle-grid",
"name": "产品多角度网格",
"keywords": ["多角度", "网格", "grid", "多面", "颜色展示", "colorway", "产品角度", "catalog grid", "产品目录"],
"trigger_phrases": ["多角度展示", "产品网格", "多面展示", "颜色对比", "multi-angle", "grid layout", "产品目录图", "多色展示"],
"prompt_template": {
"type": "product photography grid layout",
"subject": "{product_description}",
"grid": "2x2 or 3x3 equal squares",
"variation": "different angles or colorways",
"background": "clean white in each cell",
"separators": "thin white borders between cells",
"quality": "8K, catalog photography, uniform lighting across all cells"
},
"defaults": {
"grid": "2x2 grid, 4 views",
"variation": "front, side, back, top-down angles",
"background": "clean white per cell",
"separators": "thin white borders"
},
"variants": {
"angle-view": { "description": "多角度视角", "overrides": { "variation": "front, side, back, top-down, 3/4 angle views", "grid": "2x2 or 3x3" } },
"colorway": { "description": "多配色展示", "overrides": { "variation": "same product in different colors, consistent 3/4 angle", "grid": "3x3 for 9 colors or 2x3 for 6 colors" } },
"feature-grid": { "description": "带功能标注网格", "overrides": { "variation": "each cell shows different product feature with label and icon", "grid": "hero image left + 4 smaller shots right column" } },
"comparison": { "description": "对比网格", "overrides": { "variation": "before/after or product vs competitor in side-by-side grid" } }
},
"category_tips": {
"beauty": "show bottle angle, cap detail, texture close-up, and open product",
"electronics": "show front face, side ports, back panel, and included accessories",
"fashion": "show front view, back view, detail close-up, and fabric texture",
"food": "show packaging front, back nutrition, open product, and serving suggestion",
"home": "show full product, detail angle, material texture, and in-context shot",
"sports": "show product front, side profile, sole/bottom, and action usage shot"
},
"examples": [
"2x2 product grid. {product} shown from 4 angles: front, side, back, top-down. Clean white background per cell. Thin borders. Uniform studio lighting, 8K, 2000x2000px",
"3x3 color variation grid. Same {product} in 9 different colors, identical 3/4 angle. Clean white cells, subtle drop shadow. Professional catalog, 8K, 2000x2000px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "magazine-editorial",
"name": "杂志大片/封面",
"keywords": ["杂志", "封面", "杂志大片", "editorial", "magazine cover", "时尚大片", "Vogue", "时尚摄影", "fashion editorial"],
"trigger_phrases": ["杂志封面", "杂志大片", "时尚大片", "editorial", "magazine cover", "品牌大片", "时尚杂志", "封面图"],
"prompt_template": {
"type": "fashion/beauty magazine cover editorial",
"subject": "{product_description}",
"model": "person holding or wearing product in editorial pose",
"makeup_hair": "polished editorial beauty look",
"background": "studio backdrop in warm/tonal color",
"lighting": "beauty dish + rim light, editorial setup",
"layout": "magazine masthead area at top, barcode space at bottom",
"quality": "8K, Vogue-quality editorial photography"
},
"defaults": {
"lighting": "beauty dish from front-left, soft rim light on hair",
"background": "studio backdrop warm peach-nude tone",
"layout": "masthead area top, issue text bottom-left, barcode bottom-right"
},
"variants": {
"beauty-cover": { "description": "美妆封面", "overrides": { "model": "close-up portrait with glowing skin, holding skincare near face", "makeup_hair": "dewy natural, glossy lips, subtle smoky eye" } },
"fashion-cover": { "description": "时尚封面", "overrides": { "model": "full or 3/4 body shot wearing fashion product, confident pose", "makeup_hair": "bold editorial makeup, high-fashion styling" } },
"fragrance-editorial": { "description": "香水大片", "overrides": { "model": "person in contemplative pose with fragrance bottle, atmospheric", "background": "dark moody backdrop with atmospheric haze" } },
"minimal-editorial": { "description": "极简杂志内页", "overrides": { "background": "clean white studio, no backdrop color", "layout": "no masthead, clean full-bleed editorial image" } }
},
"category_tips": {
"skincare": "dewy skin, product held at chin level, beauty lighting",
"fragrance": "atmospheric smoke, contemplative mood, bottle prominent",
"fashion": "confident pose, outfit fully visible, dramatic lighting",
"jewelry": "close-up on hands/neck, editorial styling, luxury backdrop",
"haircare": "hair as hero element, movement and texture, beauty lighting",
"makeup": "bold lip or eye focus, product in hand, editorial beauty"
},
"examples": [
"Beauty magazine cover. Woman with glowing skin holding {product} near face. Beauty dish lighting, soft background. Top area for masthead. Vogue-quality editorial, 8K, 1080x1350px",
"Fashion editorial magazine cover. Striking woman wearing {product} in contemplative pose. Bold makeup, sleek hair. High-contrast editorial lighting. Magazine layout overlay with border frame. 8K, 1080x1350px"
],
"anti_ai_tips": "For authentic editorial feel: specify actual camera (Phase One IQ4, Canon EOS R5 85mm f/1.2), add visible skin texture, use real beauty lighting terminology",
"supports_image_reference": true
}
{
"id": "seasonal-campaign",
"name": "季节主题网格",
"keywords": ["季节", "四季", "campaign", "季节主题", "seasonal", "春夏秋冬", "年度campaign", "品牌campaign", "季节变体"],
"trigger_phrases": ["季节主题", "四季展示", "seasonal campaign", "年度campaign", "春夏秋冬", "季节变体", "品牌年度", "四季网格"],
"prompt_template": {
"type": "seasonal product campaign grid",
"subject": "{product_description}",
"layout": "2x2 grid, one product in four seasonal settings",
"spring": "pastel tones, blossoms, morning dew, soft light",
"summer": "bright warm tones, tropical elements, golden light",
"autumn": "warm amber, dried leaves, cinnamon, window light",
"winter": "cool blues, pine branches, frost, moonlight",
"quality": "8K, brand campaign photography, consistent product placement"
},
"defaults": {
"layout": "2x2 grid with thin white or gold borders",
"consistency": "same product angle and size across all four quadrants"
},
"variants": {
"four-seasons": { "description": "经典四季", "overrides": { "layout": "2x2, each quadrant a full seasonal scene" } },
"holiday-series": { "description": "节日系列", "overrides": { "layout": "2x3 or 3x2 grid, each cell a different holiday theme (Valentine's, Easter, Summer, Halloween, Thanksgiving, Christmas)" } },
"day-to-night": { "description": "日夜变体", "overrides": { "layout": "2x2 grid, same scene at dawn, morning, afternoon, night" } },
"travel-series": { "description": "旅行主题", "overrides": { "layout": "2x2 grid, product in 4 travel destinations with local elements" } }
},
"category_tips": {
"skincare": "spring=blossoms+dew, summer=sun+kisses, autumn=cozy+cream, winter=frost+glow",
"fragrance": "each season with matching botanical elements and color palette",
"fashion": "season-appropriate styling visible in each quadrant",
"food": "seasonal ingredients and color palette matching product",
"home": "seasonal decor elements and lighting mood",
"candles": "seasonal scents visualized through corresponding natural elements"
},
"examples": [
"2x2 seasonal grid. Same {product} in four settings: Spring with cherry blossoms, Summer with citrus and sunshine, Autumn with maple leaves, Winter with pine and snow. Consistent product angle, 8K, 2000x2000px",
"Brand seasonal campaign 2x2 grid. {product} in four seasonal worlds: Spring=pastel marble+dew, Summer=tropical leaves+sunset, Autumn=walnut wood+cinnamon, Winter=frosted glass+pine. Season labels in serif font, 8K"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "luxury-atmospherics",
"name": "奢华氛围渲染",
"keywords": ["奢华", "氛围", "烟雾", "高级感", "luxury", "atmospheric", "梦幻", "高端", "premium", "烟雾效果", "金色"],
"trigger_phrases": ["奢华氛围", "高端渲染", "梦幻效果", "luxury campaign", "氛围渲染", "高端广告", "品牌大片", "premium visual"],
"prompt_template": {
"type": "luxury product photography with atmospheric effects",
"subject": "{product_description}",
"surface": "polished dark reflective surface",
"atmosphere": "wisps of smoke, floating petals, light particles",
"lighting": "dramatic rim light + cool ambient fill",
"background": "infinite dark void with subtle gradient",
"quality": "8K, award-winning luxury advertising photography"
},
"defaults": {
"surface": "polished obsidian or black marble platform",
"atmosphere": "purple-blue smoke wisps + floating elements",
"lighting": "golden rim light from upper-left, cool blue backlight"
},
"variants": {
"floral-dream": { "description": "花卉梦幻", "overrides": { "atmosphere": "fresh flower petals floating at various heights catching light, scattered gold leaf particles" } },
"smoke-mystique": { "description": "烟雾神秘", "overrides": { "atmosphere": "multi-layered violet and midnight blue smoke swirling around product" } },
"golden-luxe": { "description": "金色奢华", "overrides": { "atmosphere": "golden bokeh particles, warm amber glow, scattered gold flakes" } },
"ice-crystal": { "description": "冰晶冷冽", "overrides": { "atmosphere": "floating ice crystals, frost patterns, diamond-like light refractions", "lighting": "cool platinum spotlight, ice-blue ambient" } }
},
"category_tips": {
"fragrance": "multi-layer smoke + matching botanical elements, amber liquid visible inside",
"skincare": "ethereal glow around product, subtle condensation, dreamy quality",
"jewelry": "diamond-like light bokeh, dark background, sparkle and reflection focus",
"wine": "rich amber or ruby liquid, smoke wisps matching color, candlelight warmth",
"chocolate": "warm golden particles, cocoa powder dust, rich dark tones",
"watch": "sharp metallic reflections, precise time visible, ice-blue or golden accent"
},
"examples": [
"Luxury product photography with atmospheric effects. {product} on polished dark surface, surrounded by wisps of purple-blue smoke. Dramatic rim light. Deep black background. 8K, cinematic quality",
"Premium atmospheric product rendering. {product} on black marble veined with gold. Floating flower petals and gold leaf particles. Multi-point lighting: golden rim light + cool backlight. Dark void background, 8K"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "device-mockup",
"name": "设备界面模型",
"keywords": ["设备模型", "界面模型", "mockup", "UI展示", "APP截图", "设备展示", "屏幕展示", "device mockup", "SaaS"],
"trigger_phrases": ["设备模型", "界面展示", "mockup", "APP展示", "网站展示", "SaaS展示", "UI mockup", "产品截图", "屏幕展示"],
"prompt_template": {
"type": "product device mockup photography",
"subject": "{product_description} displayed on device screen",
"device": "laptop or smartphone on desk",
"screen_content": "modern clean app/dashboard interface",
"desk_accessories": "coffee cup, plant, notebook, natural work environment",
"lighting": "natural window light with warm fill",
"quality": "8K, tech product photography, screen content tack-sharp"
},
"defaults": {
"device": "latest laptop on clean desk",
"desk_accessories": "coffee cup, small plant, wireless mouse, notebook",
"lighting": "soft window light from left, warm overhead fill",
"background": "modern minimal office environment"
},
"variants": {
"single-laptop": { "description": "单笔记本", "overrides": { "device": "MacBook Pro showing product interface, shallow depth of field on screen" } },
"multi-device": { "description": "多设备联动", "overrides": { "device": "iPad center + iPhone left + smartwatch right, all showing consistent app UI" } },
"phone-only": { "description": "手机展示", "overrides": { "device": "iPhone held at slight angle in hand, lifestyle background, screen clearly visible" } },
"office-lifestyle": { "description": "办公场景", "overrides": { "desk_accessories": "Aesop hand cream, Muji pen holder, latte with art, hardcover notebook, trailing plant on shelf", "background": "Scandinavian home office with white bookshelf" } }
},
"category_tips": {
"saas": "show dashboard with charts, KPI cards, data visualizations",
"mobile_app": "show app interface on phone, notification visible, clean UI",
"ecommerce_platform": "show store admin dashboard with product listings and analytics",
"fintech": "show financial dashboard with graphs, portfolio summary",
"health_app": "show workout tracker, health metrics, progress charts",
"ai_product": "show chat interface, AI responses, modern dark or light theme"
},
"examples": [
"Product mockup on laptop. Silver laptop on white desk, screen showing modern dashboard with charts. Coffee cup and small plant nearby. Natural window light. Clean product photography, 8K",
"Multi-device mockup. iPad with keyboard showing {product} app, iPhone showing notification, Apple Watch showing widget. All screens consistent UI in sage green. Scandinavian desk, 8K, 1536x1024px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "storefront",
"name": "店铺门面/空间摄影",
"keywords": ["店铺", "门面", "店面", "storefront", "空间摄影", "室内设计", "零售空间", "咖啡店", "实体店"],
"trigger_phrases": ["店铺门面", "店面摄影", "空间摄影", "零售空间", "咖啡店外观", "实体店", "storefront", "室内摄影", "店铺设计"],
"prompt_template": {
"type": "retail/storefront architectural photography",
"subject": "{business_description}",
"exterior": "clean facade with signage and window display",
"interior": "curated display shelving, consultation area, ambient lighting",
"lighting": "golden hour exterior or warm ambient interior",
"quality": "8K, editorial architectural photography, wide-angle sharp"
},
"defaults": {
"exterior": "large glass windows, signage, entrance details, potted plants",
"lighting": "late afternoon warm golden light, interior already glowing",
"camera": "wide-angle lens, f/8-f/11 for full sharpness"
},
"variants": {
"exterior": { "description": "门面外观", "overrides": { "exterior": "full storefront view with window display, entrance, street context", "interior": "visible through glass windows only" } },
"interior": { "description": "室内空间", "overrides": { "interior": "wide-angle interior showing product displays, furniture, lighting design", "exterior": "not visible" } },
"corner-detail": { "description": "角落细节", "overrides": { "interior": "close-up vignette of a curated corner: consultation table, product samples, single flower" } },
"aerial-plan": { "description": "俯视平面", "overrides": { "camera": "top-down bird's eye view showing full floor plan layout" } }
},
"category_tips": {
"coffee_shop": "espresso machine visible, warm wood tones, latte art, pastry display",
"beauty_store": "illuminated niches, marble counter, product wall, consultation area",
"fashion_boutique": "minimalist racks, curated display, premium flooring, mirror accents",
"restaurant": "table setting, kitchen pass visible, ambient lighting, menu display",
"gym_studio": "modern equipment, branded wall, natural light, motivational signage",
"pop_up": "temporary creative installation, bold graphics, unique display fixtures"
},
"examples": [
"Storefront photography. Modern {business} with glass windows showing warm interior. Entrance with potted plants. Golden hour light. Architectural photography, 8K",
"Premium interior photography of {business}. Wide-angle shot showing product displays, consultation area, herringbone floor. Warm ambient lighting throughout. Architectural Digest quality, 8K, 1536x1024px"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
{
"id": "sports-campaign",
"name": "运动/健身广告",
"keywords": ["运动", "健身", "广告", "sports", "fitness", "campaign", "运动鞋", "运动服", "篮球", "跑步", "健身器材"],
"trigger_phrases": ["运动广告", "健身广告", "sports campaign", "运动品牌", "运动大片", "健身推广", "运动产品广告", "运动海报"],
"prompt_template": {
"type": "sports/fitness advertising campaign photography",
"subject": "{product_description}",
"athlete": "athletic model in dynamic pose with product",
"props": "sports equipment as visual anchor, exaggerated scale",
"background": "minimal dark studio with reflective floor",
"typography": "bold condensed headline + subtitle",
"quality": "8K, Nike/Under Armour campaign quality"
},
"defaults": {
"background": "dark studio, reflective black floor",
"typography": "bold condensed font, brand color accent",
"lighting": "spotlight from above, dramatic body highlights"
},
"variants": {
"product-hero": { "description": "产品主视觉", "overrides": { "athlete": "no model, product floating at dynamic angle", "props": "motion lines and speed effects around product" } },
"athlete-action": { "description": "运动员动态", "overrides": { "athlete": "athlete mid-action wearing product, stadium lights, lens flare" } },
"triptych": { "description": "三联画", "overrides": { "layout": "three vertical panels: close-up detail + action shot + product hero, unified bottom strip with branding" } },
"gym-power": { "description": "健身力量感", "overrides": { "athlete": "muscular athlete seated on oversized dumbbell or equipment", "props": "exaggerated fitness equipment placed diagonally" } }
},
"category_tips": {
"running_shoes": "dynamic forward motion, speed lines, track or road surface context",
"basketball": "mid-dunk or crossover pose, stadium lighting, court texture",
"fitness_equipment": "athlete using product, sweat detail, gym environment",
"sportswear": "compression fit visible, fabric technology highlighted, movement pose",
"protein_supplements": "product with athlete post-workout, muscular definition, energy mood",
"sports_drink": "splash effects, condensation, vibrant energy colors, hydration theme"
},
"examples": [
"Sports advertising photo. {product} placed diagonally on reflective dark surface. Dramatic side lighting, speed lines around product. Bold headline text. Dynamic and energetic, 8K, 1080x1350px",
"Fitness brand campaign. Athletic model wearing {product}, seated on large dumbbell. Dark studio with reflective floor. Spotlight from above. 'STRENGTH' bold headline. Nike campaign quality, 8K"
],
"anti_ai_tips": "",
"supports_image_reference": true
}
#!/usr/bin/env python3
"""统一图像生成脚本,同时兼容 OpenAI 同步 API 和 apimart.ai 异步 API。
自动检测模式:
- 基础 URL 包含 "apimart" → 异步轮询模式
- 其他 → OpenAI 同步模式
- 也可通过 --mode sync|async 强制指定
配置来自环境变量或 .env 文件:
- IMG_BASE_URL: API 根地址
- IMG_MODEL: 图片模型名
- IMG_API_KEY: API key
- IMG_API_MODE(可选): sync 或 async,覆盖自动检测
"""
from __future__ import annotations
import argparse
import base64
import binascii
import http.client
import json
import os
import sys
import time
import urllib.error
import urllib.parse
import urllib.request
from pathlib import Path
from typing import Any
ENV_BASE_URL = "IMG_BASE_URL"
ENV_MODEL = "IMG_MODEL"
ENV_API_KEY = "IMG_API_KEY"
ENV_ALIASES = {
ENV_BASE_URL: ("OPENAI_BASE_URL", "OPENAI_API_BASE", "BASE_URL"),
ENV_MODEL: ("OPENAI_IMAGE_MODEL", "IMAGE_MODEL", "OPENAI_MODEL"),
ENV_API_KEY: ("OPENAI_API_KEY", "API_KEY"),
}
VALID_RATIOS = ("auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5",
"16:9", "9:16", "2:1", "1:2", "21:9", "9:21")
VALID_RESOLUTIONS = ("1k", "2k", "4k")
PIXEL_TO_RATIO: dict[str, str] = {
"1024x1024": "1:1", "2048x2048": "1:1",
"1536x1024": "3:2", "2048x1360": "3:2",
"1024x1536": "2:3", "1360x2048": "2:3",
"1024x768": "4:3", "2048x1536": "4:3",
"768x1024": "3:4", "1536x2048": "3:4",
"1280x1024": "5:4", "2560x2048": "5:4",
"1024x1280": "4:5", "2048x2560": "4:5",
"1536x864": "16:9", "2048x1152": "16:9", "3840x2160": "16:9",
"864x1536": "9:16", "1152x2048": "9:16", "2160x3840": "9:16",
"2048x1024": "2:1", "2688x1344": "2:1", "3840x1920": "2:1",
"1024x2048": "1:2", "1344x2688": "1:2", "1920x3840": "1:2",
"2016x864": "21:9", "2688x1152": "21:9", "3840x1648": "21:9",
"864x2016": "9:21", "1152x2688": "9:21", "1648x3840": "9:21",
}
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
def fail(message: str, exit_code: int = 1) -> None:
print(f"错误:{message}", file=sys.stderr)
raise SystemExit(exit_code)
# ── 配置与环境 ──────────────────────────────────────────────
def read_prompt(args: argparse.Namespace) -> str:
if args.prompt:
prompt = args.prompt.strip()
else:
try:
prompt = Path(args.prompt_file).read_text(encoding="utf-8").strip()
except OSError as exc:
fail(f"无法读取 prompt 文件:{exc}")
if not prompt:
fail("prompt 不能为空。")
return prompt
def strip_env_value(value: str) -> str:
value = value.strip()
if len(value) >= 2 and value[0] == value[-1] and value[0] in {"'", '"'}:
return value[1:-1]
return value
def find_default_env_file() -> Path | None:
for directory in (Path.cwd(), *Path.cwd().parents):
env_file = directory / ".env"
if env_file.is_file():
return env_file
return None
def load_env_file(env_file: Path | None) -> None:
if env_file is None:
return
try:
lines = env_file.read_text(encoding="utf-8").splitlines()
except OSError as exc:
fail(f"无法读取 .env 文件:{exc}")
for line_number, raw_line in enumerate(lines, start=1):
line = raw_line.strip()
if not line or line.startswith("#"):
continue
if line.startswith("export "):
line = line[len("export "):].strip()
if "=" not in line:
fail(f".env 第 {line_number} 行格式不正确,应为 KEY=value。")
key, value = line.split("=", 1)
key = key.strip()
if not key:
fail(f".env 第 {line_number} 行缺少变量名。")
if key not in os.environ:
os.environ[key] = strip_env_value(value)
def require_config(name: str) -> str:
candidates = (name, *ENV_ALIASES.get(name, ()))
for candidate in candidates:
value = os.environ.get(candidate, "").strip()
if value:
return value
accepted = "、".join(candidates)
fail(
f"缺少配置 {name}。请在 .env 中设置 IMG_BASE_URL、IMG_MODEL、IMG_API_KEY;"
f"也兼容这些变量名:{accepted}。"
)
# ── 模式检测 ──────────────────────────────────────────────
def detect_mode(base_url: str, explicit_mode: str | None) -> str:
if explicit_mode in ("sync", "async"):
return explicit_mode
if "apimart" in base_url.lower():
return "async"
return "sync"
def size_to_ratio(size: str) -> str:
if ":" in size:
return size
lower = size.lower()
if lower in PIXEL_TO_RATIO:
return PIXEL_TO_RATIO[lower]
fail(f"无法将像素尺寸 '{size}' 转换为比例。请直接使用比例格式,如 1:1、16:9、2:3。")
# ── 图片编码 ──────────────────────────────────────────────
def encode_image_object(image_path: str) -> dict[str, str]:
path = Path(image_path)
if not path.is_file():
fail(f"参考图片不存在:{image_path}")
suffix = path.suffix.lower().lstrip(".")
mime_map = {"png": "image/png", "jpg": "image/jpeg", "jpeg": "image/jpeg",
"webp": "image/webp", "gif": "image/gif"}
mime = mime_map.get(suffix)
if not mime:
fail(f"不支持的图片格式:.{suffix},仅支持 png/jpg/jpeg/webp/gif。")
try:
data = path.read_bytes()
except OSError as exc:
fail(f"无法读取参考图片:{exc}")
return {"type": mime, "data": base64.b64encode(data).decode("ascii")}
def encode_image_data_uri(image_path: str) -> str:
path = Path(image_path)
if not path.is_file():
fail(f"参考图片不存在:{image_path}")
suffix = path.suffix.lower().lstrip(".")
mime_map = {"png": "image/png", "jpg": "image/jpeg", "jpeg": "image/jpeg",
"webp": "image/webp", "gif": "image/gif"}
mime = mime_map.get(suffix)
if not mime:
fail(f"不支持的图片格式:.{suffix},仅支持 png/jpg/jpeg/webp/gif。")
try:
data = path.read_bytes()
except OSError as exc:
fail(f"无法读取参考图片:{exc}")
b64 = base64.b64encode(data).decode("ascii")
return f"data:{mime};base64,{b64}"
# ── HTTP 工具 ──────────────────────────────────────────────
def http_post(url: str, api_key: str, payload: dict[str, Any], timeout: int = 120) -> dict[str, Any]:
body = json.dumps(payload).encode("utf-8")
request = urllib.request.Request(
url, data=body,
headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json", "User-Agent": UA},
method="POST",
)
try:
with urllib.request.urlopen(request, timeout=timeout) as response:
raw = response.read().decode("utf-8")
except urllib.error.HTTPError as exc:
detail = exc.read().decode("utf-8", errors="replace")
fail(f"接口返回 HTTP {exc.code}:{detail}")
except urllib.error.URLError as exc:
fail(f"无法连接接口:{exc.reason}")
except (http.client.RemoteDisconnected, TimeoutError):
fail("接口连接失败或超时,请稍后重试。")
try:
parsed = json.loads(raw)
except json.JSONDecodeError:
fail(f"接口返回的不是有效 JSON:{raw[:500]}")
if not isinstance(parsed, dict):
fail("接口返回格式不正确:顶层结果不是对象。")
return parsed
def http_get(url: str, api_key: str, timeout: int = 30) -> dict[str, Any]:
request = urllib.request.Request(
url, headers={"Authorization": f"Bearer {api_key}", "User-Agent": UA}, method="GET",
)
try:
with urllib.request.urlopen(request, timeout=timeout) as response:
raw = response.read().decode("utf-8")
except urllib.error.HTTPError as exc:
detail = exc.read().decode("utf-8", errors="replace")
fail(f"查询接口返回 HTTP {exc.code}:{detail}")
except (urllib.error.URLError, http.client.RemoteDisconnected, TimeoutError):
fail("查询接口连接失败或超时。")
try:
parsed = json.loads(raw)
except json.JSONDecodeError:
fail(f"查询接口返回的不是有效 JSON:{raw[:500]}")
return parsed
# ── 同步模式(OpenAI 兼容)──────────────────────────────────
def build_sync_payload(args: argparse.Namespace, prompt: str, model: str) -> dict[str, Any]:
payload: dict[str, Any] = {"model": model, "prompt": prompt, "n": args.n, "size": args.size}
if args.quality:
payload["quality"] = args.quality
if args.image:
payload["image_urls"] = [encode_image_data_uri(args.image)]
return payload
def run_sync(base_url: str, api_key: str, payload: dict[str, Any],
output_dir: Path, fmt: str) -> list[Path]:
endpoint = f"{base_url}/images/generations"
print(f"[sync] 提交生成请求到 {endpoint}...", file=sys.stderr)
result = http_post(endpoint, api_key, payload, timeout=120)
return save_sync_images(result, output_dir, fmt)
def filename_for(suffix: str) -> str:
timestamp = time.strftime("%Y%m%d-%H%M%S")
return f"image-{timestamp}-01.{suffix.lstrip('.')}"
def save_sync_images(result: dict[str, Any], output_dir: Path, fmt: str) -> list[Path]:
data = result.get("data")
if not isinstance(data, list) or not data:
fail(f"接口返回中没有 data 图片数组:{json.dumps(result)[:300]}")
output_dir.mkdir(parents=True, exist_ok=True)
paths: list[Path] = []
for index, item in enumerate(data):
if not isinstance(item, dict):
fail("接口返回格式不正确:data 中包含非对象项目。")
if item.get("b64_json"):
encoded = item["b64_json"]
try:
image_bytes = base64.b64decode(encoded)
except (binascii.Error, ValueError) as exc:
fail(f"无法解码 b64_json 图片:{exc}")
timestamp = time.strftime("%Y%m%d-%H%M%S")
p = output_dir / f"image-{timestamp}-{index + 1:02d}.{fmt.lstrip('.')}"
p.write_bytes(image_bytes)
paths.append(p)
elif item.get("url"):
image_url = item["url"]
suffix = _suffix_from_url(image_url, fmt)
timestamp = time.strftime("%Y%m%d-%H%M%S")
p = output_dir / f"image-{timestamp}-{index + 1:02d}.{suffix}"
dl_req = urllib.request.Request(image_url, headers={"User-Agent": UA})
with urllib.request.urlopen(dl_req, timeout=120) as resp:
p.write_bytes(resp.read())
paths.append(p)
else:
fail("图片结果既没有 b64_json,也没有 url。")
return paths
# ── 异步模式(apimart.ai)──────────────────────────────────
def build_async_payload(args: argparse.Namespace, prompt: str, model: str) -> dict[str, Any]:
ratio = size_to_ratio(args.size)
payload: dict[str, Any] = {"model": model, "prompt": prompt, "n": 1, "size": ratio, "resolution": args.resolution}
if args.image:
payload["image_urls"] = [encode_image_data_uri(args.image)]
return payload
def run_async(base_url: str, api_key: str, payload: dict[str, Any],
output_dir: Path, fmt: str, poll_interval: int, timeout: int) -> list[Path]:
endpoint = f"{base_url}/images/generations"
print(f"[async] 提交异步任务到 {endpoint}...", file=sys.stderr)
result = http_post(endpoint, api_key, payload, timeout=30)
code = result.get("code")
if code and code != 200:
error = result.get("error", {})
fail(f"提交失败(code={code}):{error.get('message', json.dumps(result))}")
data = result.get("data")
if not isinstance(data, list) or not data:
fail(f"提交响应缺少 data 数组:{json.dumps(result)[:300]}")
task_id = data[0].get("task_id")
if not task_id:
fail(f"提交响应缺少 task_id:{json.dumps(data[0])[:300]}")
print(f"[async] 任务已提交: {task_id},等待 15s 后开始轮询...", file=sys.stderr)
time.sleep(15)
task_data = _poll_task(base_url, api_key, task_id, poll_interval, timeout)
actual_time = task_data.get("actual_time", 0)
cost = task_data.get("cost", 0)
print(f"[async] 任务完成,耗时 {actual_time}s,费用 ${cost:.4f}", file=sys.stderr)
return _save_async_images(task_data, output_dir, fmt)
def _poll_task(base_url: str, api_key: str, task_id: str,
poll_interval: int, timeout: int) -> dict[str, Any]:
url = f"{base_url}/tasks/{task_id}"
start = time.time()
while True:
elapsed = time.time() - start
if elapsed > timeout:
fail(f"任务 {task_id} 超时({timeout}s),请稍后手动查询。")
result = http_get(url, api_key)
task_data = result.get("data", {})
status = task_data.get("status", "")
if status == "completed":
return task_data
if status == "failed":
error = task_data.get("error", {})
fail(f"任务 {task_id} 失败:{error.get('message', json.dumps(task_data)[:300])}")
progress = task_data.get("progress", 0)
print(f" 轮询中... 状态={status} 进度={progress}% 耗时={elapsed:.0f}s", file=sys.stderr)
time.sleep(poll_interval)
def _save_async_images(task_data: dict[str, Any], output_dir: Path, fmt: str) -> list[Path]:
result = task_data.get("result", {})
images = result.get("images")
if not isinstance(images, list) or not images:
fail(f"任务结果中缺少 images 数组:{json.dumps(task_data)[:300]}")
output_dir.mkdir(parents=True, exist_ok=True)
paths: list[Path] = []
for img_item in images:
url_list = img_item.get("url")
if not isinstance(url_list, list) or not url_list:
fail(f"图片结果缺少 url 数组:{json.dumps(img_item)[:300]}")
image_url = url_list[0]
suffix = _suffix_from_url(image_url, fmt)
output_path = output_dir / filename_for(suffix)
print(f" 下载图片: {image_url}", file=sys.stderr)
dl_req = urllib.request.Request(image_url, headers={"User-Agent": UA})
try:
with urllib.request.urlopen(dl_req, timeout=120) as resp:
output_path.write_bytes(resp.read())
except urllib.error.URLError as exc:
fail(f"无法下载图片:{exc.reason}")
except TimeoutError:
fail("下载图片超时。")
paths.append(output_path)
return paths
# ── 工具函数 ──────────────────────────────────────────────
def _suffix_from_url(url: str, fallback: str) -> str:
path = urllib.parse.urlparse(url).path
suffix = Path(path).suffix.lower().lstrip(".")
if suffix in {"png", "jpg", "jpeg", "webp"}:
return "jpg" if suffix == "jpeg" else suffix
return fallback
# ── CLI ──────────────────────────────────────────────
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="统一图像生成脚本,自动兼容 OpenAI 同步 API 和 apimart.ai 异步 API。"
)
prompt_group = parser.add_mutually_exclusive_group(required=True)
prompt_group.add_argument("--prompt", help="直接传入图片生成 Prompt。")
prompt_group.add_argument("--prompt-file", help="从文本文件读取图片生成 Prompt。")
parser.add_argument("--output-dir", default="generated-images", help="图片输出目录,默认 generated-images。")
parser.add_argument("--env-file", help="指定 .env 配置文件;不指定时从当前目录向上查找。")
parser.add_argument("--mode", choices=("sync", "async"), help="API 模式。不指定时根据 base URL 自动检测(含 apimart → async,其他 → sync)。")
parser.add_argument("--size", default="1:1", help="图片尺寸。异步模式用比例格式(1:1、16:9 等),同步模式用像素格式(1024x1024 等)。默认 1:1。")
parser.add_argument("--resolution", default="2k", choices=VALID_RESOLUTIONS, help="异步模式分辨率档位,默认 2k。")
parser.add_argument("--quality", help="同步模式图片质量参数,例如 low、medium、high。")
parser.add_argument("--n", type=int, default=1, help="同步模式生成图片数量,默认 1。")
parser.add_argument("--image", help="参考产品图片路径,传入以提升产品一致性。")
parser.add_argument("--poll-interval", type=int, default=5, help="异步模式轮询间隔秒数,默认 5。")
parser.add_argument("--timeout", type=int, default=180, help="异步模式轮询超时秒数,默认 180。")
parser.add_argument("--format", choices=("png", "jpeg", "webp"), default="png", help="图片保存格式,默认 png。")
return parser.parse_args()
def main() -> None:
args = parse_args()
env_file = Path(args.env_file) if args.env_file else find_default_env_file()
load_env_file(env_file)
prompt = read_prompt(args)
base_url = require_config(ENV_BASE_URL).rstrip("/")
model = require_config(ENV_MODEL)
api_key = require_config(ENV_API_KEY)
mode = detect_mode(base_url, args.mode)
print(f"API 模式: {mode} | base_url={base_url} | model={model}", file=sys.stderr)
if mode == "async":
payload = build_async_payload(args, prompt, model)
paths = run_async(base_url, api_key, payload, Path(args.output_dir),
args.format, args.poll_interval, args.timeout)
else:
payload = build_sync_payload(args, prompt, model)
paths = run_sync(base_url, api_key, payload, Path(args.output_dir), args.format)
print("生成完成:")
for path in paths:
print(path)
if __name__ == "__main__":
main()