---
name: eggapi-ecommerce
description: Turn real product photos into a ready-to-upload e-commerce image set with EggAPI - white-background main image, lifestyle scenes, selling-point images, close-ups and an optional product video - sized for Amazon, Shopify, Taobao/Tmall, TikTok Shop, Douyin or Xiaohongshu. Use when the user wants product photos, listing images, a main image, detail-page images or a product video (电商主图、商品图、详情页、带货视频).
---

# E-commerce product image set

Turn one or more photos of a real product into a full listing image set while keeping the product itself unchanged. Reply in the user's language. Write model prompts in English; put any text that should appear in an image in quotes, in its target language.

## EggAPI basics

This skill uses the EggAPI MCP server, usually added under the name `eggapi`: `list_models`, `generate_image`, `generate_video` and `get_task` (in Claude Code they show up as `mcp__eggapi__*`). If these tools are missing, stop and send the user to https://eggapi.ai/connect to add the server.

- **Models.** Call `list_models` once at the start. Use the model IDs this skill names when they are listed; otherwise pick the closest model with the same `generation_type`. `unit_price_usd` is the price per image, or per second of video; `unit_price_by_resolution` overrides it for a given `resolution`.
- **Local files.** The generate tools only accept public `http(s)` URLs. Upload local files first (up to 20 MB per image):

  ```bash
  curl -sS https://api.eggapi.ai/v1/uploads \
    -H "Authorization: Bearer $EGGAPI_API_KEY" \
    -F "files[]=@./photo-1.jpg" -F "files[]=@./photo-2.jpg"
  ```

  The URLs are in `data.files[].url`. If `EGGAPI_API_KEY` is empty in the shell, ask the user to export it; never ask for the key in the chat. Uploaded files can be opened by anyone who has the URL, so say so before uploading anything private.
- **Tasks are async.** `generate_image` and `generate_video` return a `task_id` at once. Submit every independent task first, then poll `get_task` for each until `done` is true: every 5-10 s for images, 10-15 s for videos (usually 1-3 min). If a generate call already returns `urls`, no polling is needed.
- **Always pass** `aspect_ratio` (the default is 16:9) and, for video, `duration` (4-15 s). Supported ratios: `1:1`, `3:4`, `4:3`, `9:16`, `16:9`, `21:9`.
- **Edit models return one image per call.** For more variants, call again; `num_outputs` only applies to text-to-image models.
- **Output URLs work as inputs.** Pass a finished image's URL straight into the next edit or video call; no re-upload needed.
- **Save everything.** Download each output into `eggapi-output/<project>/` under the current directory with `curl -sSL -o <file> <url>`, keeping the extension from the URL and using descriptive file names.
- **Cost.** Show the plan with an estimated cost before generating and wait for a go-ahead, unless the user already said to go ahead. At the end, report each task's `cost` and the total.
- **Errors.** `insufficient balance`: ask the user to top up at https://eggapi.ai/dashboard. `temporarily unavailable`: switch to another model of the same type. A `failed` task: read `error`, adjust the prompt if it points at the content, and retry once.

## 1. Collect the inputs

Ask only for what is missing:

- **Product photos**: local paths or URLs. Clear, well-lit shots of the actual product; two or three angles help the model keep it accurate.
- **Product facts**: name, and 3-5 selling points (material, size, key features, who it is for).
- **Platforms**, and the language for any text on the images.
- **The set**. Default: 1 main image, 3 lifestyle scenes, 2 selling-point images. Add close-ups, an in-use shot or a product video when asked.

## 2. Plan the set and confirm

Write a table with one row per output: file name, purpose, model, aspect ratio, resolution, one-line prompt summary, estimated cost. Wait for the go-ahead.

Platform defaults. They change over time, so tell the user to check the platform's current rules when a listing is strict.

| Platform | Main image | Other images | Video |
| --- | --- | --- | --- |
| Amazon | 1:1, pure white background, product fills about 85% of the frame, no text, logos added on top, or props | 1:1 | 16:9 |
| Shopify / own store | 1:1, the same background across the catalog | 1:1 | 16:9 or 9:16 |
| Taobao / Tmall | 1:1 | 1:1 or 3:4 | 9:16 or 16:9 |
| TikTok Shop / Douyin | 1:1 | 1:1 | 9:16 |
| Xiaohongshu | 3:4 | 3:4 | 9:16 |

Use `resolution: "2k"` for listing images: it is large enough for zoom on every platform above.

## 3. Upload the product photos

Upload the local photos as shown in the basics and keep the URLs. Use all of them as `images` in every edit call below (up to the model's limit), so the model sees the product from more than one side.

## 4. Generate the images

Always use an **edit model** with the product photos as `images`. Never draw the product with a text-to-image model: it invents a different product.

- Default: `google/nano-banana-pro/edit` (up to 8 input images).
- Alternative when the product drifts: `bytedance/seedream-v5.0-pro/edit` (up to 8 input images).
- Images with a headline: try `openai/gpt-image-2/edit` (1 input image only).

Start every prompt with what must not change, then describe the change:

> Keep the product exactly as in the reference photos: same shape, proportions, colors, materials, logo and label text. {scene}. {lighting}. {composition: where the product sits, how much of the frame it fills, camera angle}.

What to put in each image type:

- **Main image**: "Place the product alone on a pure white (#FFFFFF) background, centered, filling about 85% of the frame, soft even studio light, a faint natural shadow underneath, no text, no props."
- **Lifestyle scene**: a real place where the buyer would use it (room, time of day, surface it stands on), a few props that support the product without hiding it, the product as the clear focus. Vary the scenes across the set.
- **Selling-point image**: one point per image. Either leave a clean area for a headline ("leave the top third as a calm empty background for text"), or include the headline in quotes, kept under 6 words or 12 Chinese characters, and say where it goes.
- **Close-up**: macro shot of the material, texture, stitching, port or mechanism that backs a selling point.
- **In use**: a person who matches the target buyer (age range, style) using or wearing it; hands only for small items.

## 5. Product video (optional)

Animate an approved main or lifestyle image with `generate_video`:

- Model: `bytedance/seedance-2.5/image-to-video`; alternative `alibaba/wan-3.0/image-to-video`.
- `image`: the approved image's URL. `aspect_ratio`: the image's ratio, or the platform's video ratio from the table. `duration`: 5-8. `resolution`: `1080p`.
- Prompt only the motion, slow and simple: "slow 360-degree turntable rotation", "camera slowly pushes in while a soft light sweeps across the surface". Do not ask the product to open, transform or change.
- Add `parameters: {"generate_audio": true}` only when the user wants sound.

## 6. Check before delivering

If you can view images, open every downloaded file next to the original photo and compare shape, color, logo, label text and number of parts. Regenerate once, with a stricter prompt, any image where the product changed, and tell the user which ones were re-run. Check the main image against the platform's rules (white background, no text).

## 7. Deliver

Save to `eggapi-output/<product-slug>/` with names such as `main-1x1.png`, `scene-kitchen-1x1.png`, `point-waterproof-3x4.png`, `closeup-zipper-1x1.png`, `video-turntable-9x16.mp4`. List each file with its purpose and cost, then the total.
