This skill guides you on how to generate and edit images using the AI image generation service, helping users create high-quality product images, modify existing images, and perform creative visual transformations.
The AI Image Generation tool produces new images based on a text prompt and optional reference images. It supports a wide range of use cases:
Reference images are strongly recommended when the user wants the output to closely resemble an existing product or scene. Up to 3 reference image URLs can be provided, separated by commas.
ParameterRequiredDescriptionDefaultpromptYesText description of the desired image. Supports text-to-image, image-to-image, editing, model swapping, and more. Max 1000 characters.--referenceImageUrlNoURL(s) of reference image(s). Separate multiple URLs with commas. Up to 3 images supported. Max 1000 characters.--aspectRatioNoAspect ratio of the output image.1:1
ValueDescription1:1Square (default)3:4Portrait4:3Landscape9:16Vertical fullscreen16:9Horizontal fullscreen
referenceImageUrl.Object replacement:
text
Replace the vase on the table in image 1 with a potted plant
Background color change:
text
Change the background color of image 1 to pure white
Product compositing:
text
Place the product from image 2 onto the marble countertop in image 1
Style transfer:
text
Transform image 1 into the artistic style shown in image 2
Text-to-image (no reference):
text
A professional product photo of a sleek black wireless headphone on a gradient blue background, studio lighting, 8K quality
Model swapping:
text
Replace the model in image 1 with a different model while keeping the same clothing and pose
This tool requires publicly accessible image URLs for reference images. If the user provides a local image file path (e.g., C:\Users\...\photo.png, /home/.../image.jpg), you must upload it first to obtain a public URL.
Run the upload script:
bash
python scripts/upload_image.py /path/to/local/image.png
The script will return a public URL (valid for 24 hours) that can be used as the reference image URL parameter.
POST /multimodal/generateImage(完整参数/响应/错误码见 references/api.md)python scripts/multimodal_generate_image.py '<JSON 参数>' [--inline]输出策略(脚本默认行为):
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-multimodal-generate-image-<timestamp>.json( <cwd> 为脚本执行时的工作目录,在 Claude Code 里即当前项目目录; <session> 取自环境变量 SESSION_ID,按用户任务自动聚合; 禁止写入 /tmp,当前目录不可写则报错)total/ costToken、最大列表字段的长度 + 前 3 条样本)--inline 强制全量打印到 stdout(同样落盘)读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jq 或 ConvertFrom-Json 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
LINKFOX_AGENT_API_KEY,也未配置 LINKFOXAGENT_API_KEY。text field, display it directly to the user using markdown image syntax.status and finished fields. If image generation is still in progress, inform the user and advise waiting.status field and suggest adjustments (e.g., simplify the prompt, check reference image URLs, try a different aspect ratio).Applicable -- Requests involving image generation or editing:
User SaysScenario"Generate an image", "Create a picture"Text-to-image generation"Edit this photo", "Modify the image"Image editing"Change the background", "Make it white background"Background replacement"Put the product on this scene"Product compositing"Make it look like this style"Style transfer"Swap the model", "Change the person"Model swapping"Create a product photo"Product image generation"Make a vertical/landscape version"Aspect ratio adjustment
Not applicable -- Needs beyond image generation:
按动态规则计费:消耗算力 = rawTokens × 0.045。
重要:本技能的服务按倍数动态计算,可能一次性消耗大量算力,必须提醒用户,由用户决定是否继续。
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
Call the feedback API as specified in references/api.md. Do not interrupt the user's flow.
For more high-quality, professional cross-border e-commerce skills, set LinkFox Skills.