giggle-product-poster

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Product Poster Generator (English)

产品海报生成器(英文)

Guided workflow for creating AI-generated product posters via giggle.pro image-to-image API. Always uses image-to-image mode — the user's product photo is required as the reference image.
通过giggle.pro image-to-image API创建AI生成产品海报的引导工作流。 始终使用image-to-image模式 —— 必须将用户提供的产品照片作为参考图。

Workflow

工作流

Stage 1: Collect Requirements

阶段1:收集需求

Ask the user for these items (combine into one message):
  1. Product image ⚠️ Required: local file path to the product photo (e.g.
    /Users/xxx/product.jpg
    )
  2. Product info: product name + one-sentence key selling point
  3. Poster type: E-commerce launch / Brand event / Social media promotion
  4. Visual style: Clean minimal / Bold & vibrant / Luxury premium / Tech futuristic / Playful youthful
  5. Aspect ratio: E-commerce portrait 3:4 / Square 1:1 / Mobile portrait 9:16 / Wide landscape 16:9
Optional:
  • Brand color (hex or description, e.g. "brand blue #1E3A8A")
If the user hasn't provided a product image path, do not proceed to generation — ask for it first.
If the user has already provided enough context, skip questions and proceed directly to Stage 2.
向用户索要以下信息(合并为一条消息发送):
  1. 产品图片 ⚠️ 必填:产品照片的本地文件路径(例如
    /Users/xxx/product.jpg
  2. 产品信息:产品名称 + 一句话核心卖点
  3. 海报类型:电商上新 / 品牌活动 / 社交媒体推广
  4. 视觉风格:简约清新 / 大胆活力 / 奢华高端 / 科技未来 / 活泼年轻化
  5. 宽高比:电商竖版 3:4 / 正方形 1:1 / 移动端竖版 9:16 / 宽屏横版 16:9
可选信息:
  • 品牌色(十六进制值或文字描述,例如 "品牌蓝 #1E3A8A")
如果用户未提供产品图片路径,请勿进入生成环节 —— 先向用户索要图片。
如果用户已经提供了足够的上下文信息,可跳过提问直接进入阶段2。

Stage 2: Compose Prompt & Generate

阶段2:撰写Prompt并生成

Step 1: Build the prompt using this BASE structure:
[POSTER TYPE] for [PRODUCT NAME]. [KEY SELLING POINT].
Style: [AESTHETIC], [COLOR PALETTE], [MOOD].
Visual: Keep the product as the hero element, [COMPOSITION — e.g. centered / rule-of-thirds], enhance with [BACKGROUND/SCENE — e.g. clean gradient / lifestyle scene / abstract elements].
Text layout: Main title "[PRODUCT NAME]", tagline "[SLOGAN]", clean typography with strong hierarchy.
Technical: Professional commercial photography quality, high contrast, sharp details, no watermark.
Read
references/prompt-templates.md
for type-specific templates, style keywords, and color palette references.
Step 2: Choose model and aspect ratio
Poster TypeRecommended ModelDefault Ratio
E-commerce launchnano-banana-23:4
Brand eventnano-banana-29:16
Social medianano-banana-2-fast9:16
Use
nano-banana-2
for best image-to-image fidelity. Use
nano-banana-2-fast
for quick previews.
Step 3: Run generate_poster.py
generate_poster.py
handles base64 conversion, task submission, polling, and URL extraction in one call. It prints the final plain URL(s) to stdout.
bash
SKILL_SCRIPTS="<absolute_path_to_skill>/scripts"

poster_url=$(python "$SKILL_SCRIPTS/generate_poster.py" \
  --image "<product_image_path>" \
  --prompt "<composed_prompt>" \
  --model nano-banana-2 \
  --aspect-ratio <ratio>)
Step 4: Present results
$poster_url
is already a clean, complete URL. Present it to the user as plain text:
Poster generated ✨

$poster_url

Let me know if you'd like any adjustments!
Critical URL constraints:
  • Output
    $poster_url
    verbatim — do NOT wrap it in markdown
    [text](url)
    syntax
  • Do NOT truncate, ellipsize (
    ...
    ), or reformat the URL
  • Do NOT use
    [View image](url)
    or any link-text wrapper
  • The URL is a long signed AWS CloudFront link — it must remain complete and unmodified
步骤1:使用以下基础结构构建prompt
[POSTER TYPE] for [PRODUCT NAME]. [KEY SELLING POINT].
Style: [AESTHETIC], [COLOR PALETTE], [MOOD].
Visual: Keep the product as the hero element, [COMPOSITION — e.g. centered / rule-of-thirds], enhance with [BACKGROUND/SCENE — e.g. clean gradient / lifestyle scene / abstract elements].
Text layout: Main title "[PRODUCT NAME]", tagline "[SLOGAN]", clean typography with strong hierarchy.
Technical: Professional commercial photography quality, high contrast, sharp details, no watermark.
查阅
references/prompt-templates.md
获取对应类型的模板、风格关键词和配色参考。
步骤2:选择模型和宽高比
海报类型推荐模型默认比例
电商上新nano-banana-23:4
品牌活动nano-banana-29:16
社交媒体nano-banana-2-fast9:16
使用
nano-banana-2
可获得最佳的image-to-image生成保真度,使用
nano-banana-2-fast
可快速生成预览效果。
步骤3:运行generate_poster.py
generate_poster.py
可一站式完成base64转换、任务提交、状态轮询和URL提取,执行后会将最终的纯URL输出到标准输出。
bash
SKILL_SCRIPTS="<absolute_path_to_skill>/scripts"

poster_url=$(python "$SKILL_SCRIPTS/generate_poster.py" \
  --image "<product_image_path>" \
  --prompt "<composed_prompt>" \
  --model nano-banana-2 \
  --aspect-ratio <ratio>)
步骤4:展示结果
$poster_url
已经是完整可用的纯净URL,以纯文本形式展示给用户即可:
Poster generated ✨

$poster_url

Let me know if you'd like any adjustments!
URL 关键约束:
  • 原样输出
    $poster_url
    —— 不要用markdown
    [文本](url)
    语法包裹
  • 不要截断URL、添加省略号(
    ...
    )或重新格式化URL
  • 不要使用
    [查看图片](url)
    或任何链接文本包裹形式
  • 该URL是AWS CloudFront的长签名链接,必须保持完整且不做任何修改

Environment Setup

环境配置

Requires
GIGGLE_API_KEY
environment variable:
bash
export GIGGLE_API_KEY=your_api_key
API key available at https://giggle.pro/ account settings.
需要配置
GIGGLE_API_KEY
环境变量:
bash
export GIGGLE_API_KEY=your_api_key
API密钥可在https://giggle.pro/ 账户设置页面获取。

Script Reference

脚本参考

scripts/generate_poster.py
— all-in-one poster generation script (recommended).
  • --image <path>
    → local product image (handles base64 conversion internally)
  • --prompt <text>
    → generation prompt
  • --model
    nano-banana-2
    (default),
    nano-banana-2-fast
    ,
    seedream45
    ,
    midjourney
  • --aspect-ratio
    1:1
    ,
    3:4
    ,
    4:3
    ,
    16:9
    ,
    9:16
    ,
    2:3
    ,
    3:2
    ,
    21:9
  • stdout: plain URL(s), one per line
  • stderr: progress messages
scripts/generate_poster.py
—— 一站式海报生成脚本(推荐使用)
  • --image <path>
    → 本地产品图片(内部自动处理base64转换)
  • --prompt <text>
    → 生成提示词
  • --model
    → 可选值:
    nano-banana-2
    (默认)、
    nano-banana-2-fast
    seedream45
    midjourney
  • --aspect-ratio
    → 可选值:
    1:1
    3:4
    4:3
    16:9
    9:16
    2:3
    3:2
    21:9
  • 标准输出:纯URL,每行一个
  • 标准错误:进度信息

References

参考资料

  • references/prompt-templates.md
    — Type-specific prompt templates, style keywords, color palette guide.
  • references/prompt-templates.md
    —— 分类型prompt模板、风格关键词、配色指南