Loading...
Loading...
Compare original and translation side by side
-p-p "帮我生成一张猫的图片,风格要可爱一点。"-p "帮我生成一张猫的图片,风格要可爱一点。猫是橘色的,背景是草地。"cat_in_garden.png竖版 9:16手机海报 9:16横版 16:9电影画幅 16:91:1 方形构图1024×1024 方图urlb64_jsonsizenqualityaspect_ratio-p-p "Help me generate a picture of a cat, with a cute style."-p "Help me generate a picture of a cat, with a cute style. The cat is orange, and the background is grass."cat_in_garden.pngVertical 9:16Mobile poster 9:16Horizontal 16:9Movie aspect ratio 16:91:1 Square composition1024×1024 Square imageurlb64_jsonsizenqualityaspect_ratioAPIYI_API_KEYnodescripts/generate_image.jsscripts/generate_image.pynode scripts/generate_image.js -p "{prompt}" -f "{filename}" [-r {response_format}]node scripts/generate_image.js -p "{edit_instruction}" -i "{input_path}" -f "{output_filename}" [-r {response_format}]node scripts/generate_image.js -p "融合图1和图2的风格" -i ref1.png ref2.png -f "merged.png" [-r {response_format}]python scripts/generate_image.py -p "{prompt}" -f "{filename}" [-r {response_format}]
python scripts/generate_image.py -p "{edit_instruction}" -i "{input_path}" -f "{output_filename}" [-r {response_format}]APIYI_API_KEYnodescripts/generate_image.jsscripts/generate_image.pynode scripts/generate_image.js -p "{prompt}" -f "{filename}" [-r {response_format}]node scripts/generate_image.js -p "{edit_instruction}" -i "{input_path}" -f "{output_filename}" [-r {response_format}]node scripts/generate_image.js -p "Merge the styles of image 1 and image 2" -i ref1.png ref2.png -f "merged.png" [-r {response_format}]python scripts/generate_image.py -p "{prompt}" -f "{filename}" [-r {response_format}]
python scripts/generate_image.py -p "{edit_instruction}" -i "{input_path}" -f "{output_filename}" [-r {response_format}]"图片生成中,预计60秒到300秒完成...\n⏳ 正在生成..."
"Image generation in progress, expected to complete in 60 to 300 seconds...
⏳ Generating..."
python scripts/generate_image.py -p "图片描述文本" -f "output.png" [-r url|b64_json]undefinedpython scripts/generate_image.py -p "Image description text" -f "output.png" [-r url|b64_json]undefined
**(可选)Node.js 版本示例:**
```bash
**(Optional) Node.js Version Example**:
```bashundefinedundefinedpython scripts/generate_image.py -p "编辑指令" -f "output.png" -i "path/to/input.png"undefinedpython scripts/generate_image.py -p "Editing instruction" -f "output.png" -i "path/to/input.png"undefined
**(可选)Node.js 版本示例:**
```bash
**(Optional) Node.js Version Example**:
```bashundefinedundefinedPython 与 Node.js 版本参数保持一致(短参数与长参数等价)。
| 参数 | 必填 | 说明 |
|---|---|---|
| 是 | 图片描述(文生图)或编辑指令(图生图)。保留用户原始完整输入。 |
| 否 | 输出图片路径/文件名;不传则自动生成带时间戳的 PNG 文件名,并写入当前目录。 |
| 否 | 响应格式: |
| 否 | 图生图输入图片路径;可传多张(最多5张)。传入该参数即进入编辑模式。 |
Parameters are consistent between Python and Node.js versions (short parameters are equivalent to long parameters).
| Parameter | Required | Description |
|---|---|---|
| Yes | Image description (for text-to-image) or editing instruction (for image-to-image). Keep the user's original complete input. |
| No | Output image path/filename; if not provided, a PNG filename with timestamp will be automatically generated and saved to the current directory. |
| No | Response format: |
| No | Input image path for image-to-image; multiple images can be passed (up to 5). Passing this parameter enters editing mode. |
| 资源 | 说明 |
|---|---|
| Node.js 版本(零依赖,优先使用) |
| Python 版本(备选) |
| 尺寸与比例控制文档,需要时使用,按需加载 |
| 批量生成配置模板,需要批量生成时使用,按需加载 |
| Resource | Description |
|---|---|
| Node.js version (zero dependencies, preferred) |
| Python version (alternative) |
| Size and ratio control document, use when needed, load on demand |
| Batch generation configuration template, use when batch generation is needed, load on demand |
global.size_hint注意:批量任务总时间 = 单张时间(60-300秒) × 图片数量,请提前告知用户预估时长。
global.size_hintNote: Total time for batch tasks = single image time (60-300 seconds) × number of images. Please inform the user of the estimated duration in advance.
| 需求 | 推荐写法 |
|---|---|
| 方形 | 1024×1024 方图 / 1:1 方形构图 |
| 横版 | 横版 16:9 / 宽屏 16:9 电影画幅 |
| 竖版 | 竖版 9:16 / 手机海报 9:16 |
| 超宽横幅 | 横幅 21:9 超宽银幕 |
| 经典印刷 | 4:3 标准画幅 / 3:2 经典画幅 |
| Requirement | Recommended Expression |
|---|---|
| Square | 1024×1024 Square image / 1:1 Square composition |
| Horizontal | Horizontal 16:9 / Wide screen 16:9 Movie aspect ratio |
| Vertical | Vertical 9:16 / Mobile poster 9:16 |
| Ultra-wide banner | Banner 21:9 Ultra-wide screen |
| Classic printing | 4:3 Standard aspect ratio / 3:2 Classic aspect ratio |
data:image/png;base64,data:image/png;base64,sizenqualityaspect_ratiosizenqualityaspect_ratioAPIYI_API_KEYundefinedAPIYI_API_KEYundefinedundefinedundefined/v1/images/generations/v1/images/edits/v1/images/generations/v1/images/edits