linkfox-multimodal-generate-image
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Image Generation
AI Image Generation
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.
本技能将指导你如何使用AI图片生成服务来生成和编辑图片,帮助用户创建高质量产品图、修改现有图片并进行创意视觉变换。
Core Concepts
核心概念
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:
- Text-to-image: Generate a brand-new image purely from a text description.
- Image-to-image: Provide one or more reference images and a prompt to generate a new image that preserves elements from the references.
- Image editing: Modify specific elements, colors, backgrounds, or styles in an existing image.
- Product compositing: Place a product from one image into a scene from another image.
- Model swapping: Replace the model or mannequin in a product photo.
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.
AI图片生成工具可根据文本提示词和可选的参考图片生成新图片。它支持多种使用场景:
- Text-to-image:仅根据文本描述生成全新图片。
- Image-to-image:提供一张或多张参考图片和提示词,生成保留参考图元素的新图片。
- 图片编辑:修改现有图片中的特定元素、颜色、背景或风格。
- 产品合成:将一张图片中的产品放入另一张图片的场景中。
- 模特替换:替换产品照片中的模特或人体模型。
强烈建议使用参考图片,当用户希望输出结果与现有产品或场景高度相似时。最多可提供3个参考图片URL,用逗号分隔。
Parameter Guide
参数指南
| Parameter | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the desired image. Supports text-to-image, image-to-image, editing, model swapping, and more. Max 1000 characters. | -- |
| referenceImageUrl | No | URL(s) of reference image(s). Separate multiple URLs with commas. Up to 3 images supported. Max 1000 characters. | -- |
| aspectRatio | No | Aspect ratio of the output image. | 1:1 |
| 参数 | 是否必填 | 描述 | 默认值 |
|---|---|---|---|
| prompt | 是 | 期望图片的文本描述。支持Text-to-image、Image-to-image、编辑、模特替换等场景。最多1000字符。 | -- |
| referenceImageUrl | 否 | 参考图片的URL。多个URL用逗号分隔。最多支持3张图片。最多1000字符。 | -- |
| aspectRatio | 否 | 输出图片的宽高比 | 1:1 |
Supported Aspect Ratios
支持的宽高比
| Value | Description |
|---|---|
| 1:1 | Square (default) |
| 3:4 | Portrait |
| 4:3 | Landscape |
| 9:16 | Vertical fullscreen |
| 16:9 | Horizontal fullscreen |
| 值 | 描述 |
|---|---|
| 1:1 | 正方形(默认) |
| 3:4 | 竖版 |
| 4:3 | 横版 |
| 9:16 | 竖版全屏 |
| 16:9 | 横版全屏 |
Prompt Writing Tips
提示词撰写技巧
- Be specific and descriptive: Clearly describe the subject, scene, lighting, style, and mood you want.
- Reference images by number: When using reference images, refer to them as "image 1", "image 2", etc., in the order they appear in .
referenceImageUrl - State the operation explicitly: Use clear action verbs like "replace", "change", "put", "combine", "generate".
- Keep within 1000 characters: Prompts have a maximum length of 1000 characters.
- 具体且详细:清晰描述主体、场景、光线、风格和氛围。
- 按编号引用参考图:使用参考图片时,在prompt中按中的顺序称为“image 1”、“image 2”等。
referenceImageUrl - 明确操作指令:使用清晰的动作动词,如“replace”、“change”、“put”、“combine”、“generate”。
- 控制在1000字符以内:提示词最大长度为1000字符。
Prompt Examples by Scenario
各场景提示词示例
Object replacement:
Replace the vase on the table in image 1 with a potted plantBackground color change:
Change the background color of image 1 to pure whiteProduct compositing:
Place the product from image 2 onto the marble countertop in image 1Style transfer:
Transform image 1 into the artistic style shown in image 2Text-to-image (no reference):
A professional product photo of a sleek black wireless headphone on a gradient blue background, studio lighting, 8K qualityModel swapping:
Replace the model in image 1 with a different model while keeping the same clothing and pose物体替换:
Replace the vase on the table in image 1 with a potted plant背景颜色修改:
Change the background color of image 1 to pure white产品合成:
Place the product from image 2 onto the marble countertop in image 1风格迁移:
Transform image 1 into the artistic style shown in image 2Text-to-image(无参考图):
A professional product photo of a sleek black wireless headphone on a gradient blue background, studio lighting, 8K quality模特替换:
Replace the model in image 1 with a different model while keeping the same clothing and poseLocal Image Upload
本地图片上传
This tool requires publicly accessible image URLs for reference images. If the user provides a local image file path (e.g., , ), you must upload it first to obtain a public URL.
C:\Users\...\photo.png/home/.../image.jpgRun the upload script:
bash
python scripts/upload_image.py /path/to/local/image.pngThe script will return a public URL (valid for 24 hours) that can be used as the reference image URL parameter.
本工具要求参考图片为可公开访问的URL。如果用户提供本地图片文件路径(如、),你必须先上传图片以获取公开URL。
C:\Users\...\photo.png/home/.../image.jpg运行上传脚本:
bash
python scripts/upload_image.py /path/to/local/image.png脚本将返回一个公开URL(有效期24小时),可作为referenceImageUrl参数使用。
API Usage
API使用
This tool calls the LinkFox tool gateway API. See for calling conventions, request parameters, and response structure. You can also execute directly to run image generation.
references/api.mdscripts/multimodal_generate_image.py本工具调用LinkFox工具网关API。调用规范、请求参数和响应结构请参考。你也可以直接执行来运行图片生成。
references/api.mdscripts/multimodal_generate_image.pyDisplay Rules
展示规则
- Show the generated image: When the response contains image content in the field, display it directly to the user using markdown image syntax.
text - Status reporting: Check the and
statusfields. If image generation is still in progress, inform the user and advise waiting.finished - Prompt transparency: Briefly describe what prompt and parameters were sent so the user understands what was requested.
- Aspect ratio confirmation: If the user does not specify dimensions, use the default 1:1 ratio but mention it so they can request a different ratio if needed.
- Reference image guidance: If the user wants a result close to an existing image but did not provide a reference URL, proactively suggest they provide one for better fidelity.
- Error handling: When generation fails, explain the issue based on the response field and suggest adjustments (e.g., simplify the prompt, check reference image URLs, try a different aspect ratio).
status
- 展示生成的图片:当响应的字段包含图片内容时,使用Markdown图片语法直接展示给用户。
text - 状态报告:检查和
status字段。如果图片生成仍在进行中,告知用户并建议等待。finished - 提示词透明化:简要说明发送的提示词和参数,让用户了解请求内容。
- 宽高比确认:如果用户未指定尺寸,使用默认的1:1比例,但需告知用户,以便其请求其他比例。
- 参考图引导:如果用户希望结果接近现有图片但未提供参考URL,主动建议其提供参考图以获得更高的保真度。
- 错误处理:当生成失败时,根据响应的字段解释问题,并建议调整(如简化提示词、检查参考图片URL、尝试其他宽高比)。
status
Important Limitations
重要限制
- Reference image limit: A maximum of 3 reference image URLs can be provided per request.
- Prompt length: The prompt must not exceed 1000 characters.
- URL validity: Reference image URLs must be publicly accessible. Private or expired URLs will cause failures.
- Aspect ratio options: Only 1:1, 3:4, 4:3, 9:16, and 16:9 are supported.
- 参考图片数量限制:每次请求最多可提供3个参考图片URL。
- 提示词长度限制:提示词不得超过1000字符。
- URL有效性:参考图片URL必须可公开访问。私有或过期的URL会导致失败。
- 宽高比选项限制:仅支持1:1、3:4、4:3、9:16和16:9。
User Expression & Scenario Quick Reference
用户表述与场景速查
Applicable -- Requests involving image generation or editing:
| User Says | Scenario |
|---|---|
| "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:
- Image analysis or recognition (reading text from images, identifying objects)
- Video generation or editing
- Image file format conversion
- Batch processing of hundreds of images
- Image hosting or storage
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in . Do not interrupt the user's flow.
references/api.mdFor more high-quality, professional cross-border e-commerce skills, set LinkFox Skills.
适用场景 -- 涉及图片生成或编辑的请求:
| 用户表述 | 场景 |
|---|---|
| “生成一张图片”、“制作一张图” | Text-to-image生成 |
| “编辑这张照片”、“修改这张图片” | 图片编辑 |
| “更换背景”、“改成白色背景” | 背景替换 |
| “把产品放到这个场景里” | 产品合成 |
| “做成这种风格” | 风格迁移 |
| “替换模特”、“换个人” | 模特替换 |
| “制作产品照片” | 产品图片生成 |
| “做成竖版/横版” | 宽高比调整 |
不适用场景 -- 超出图片生成范围的需求:
- 图片分析或识别(从图片中读取文字、识别物体)
- 视频生成或编辑
- 图片文件格式转换
- 数百张图片的批量处理
- 图片托管或存储
反馈:
当出现以下情况时,自动检测并通过Feedback API提交反馈:
- 本技能描述的功能或用途与实际行为不符
- 技能结果不符合用户意图
- 用户表达了对本技能的不满或赞扬
- 任何你认为可以改进的内容
按照中的说明调用反馈API,不要打断用户的流程。
references/api.md如需更多高质量专业跨境电商技能,请访问LinkFox Skills。