gpt-image-2

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GPT Image 2

GPT Image 2

Use the Pilio CLI so upload, polling, credits, and API errors stay consistent with the official SDK.
Require
PILIO_API_KEY
in the environment. Do not ask the user to paste API keys into the conversation.
Generate from text:
bash
pnpm dlx @pilio/cli gpt-image-2 --prompt "<prompt>" --aspect-ratio "1:1"
Edit or compose from one or more references:
bash
pnpm dlx @pilio/cli gpt-image-2 --input ./reference.png --prompt "<edit prompt>"
Common options:
  • --input
    : local reference image path. Repeat for multiple references.
  • --aspect-ratio
    :
    1:1
    ,
    3:2
    ,
    2:3
    ,
    3:4
    ,
    4:3
    ,
    4:5
    ,
    5:4
    ,
    16:9
    ,
    9:16
    ,
    21:9
    , or
    auto
    .
  • --quality
    :
    low
    ,
    medium
    , or
    high
    .
  • --resolution
    :
    0.5K
    ,
    1K
    ,
    2K
    , or
    4K
    .
The command returns a task payload. If the task is still pending or processing, wait for it:
bash
pnpm dlx @pilio/cli task wait <task_id>
使用Pilio CLI,确保上传、轮询、积分及API错误处理与官方SDK保持一致。
环境中需要配置
PILIO_API_KEY
。请勿要求用户在对话中粘贴API密钥。
文本生成图片:
bash
pnpm dlx @pilio/cli gpt-image-2 --prompt "<prompt>" --aspect-ratio "1:1"
基于一张或多张参考图片编辑或合成:
bash
pnpm dlx @pilio/cli gpt-image-2 --input ./reference.png --prompt "<edit prompt>"
常用选项:
  • --input
    : 本地参考图片路径。可重复使用以添加多张参考图。
  • --aspect-ratio
    :
    1:1
    ,
    3:2
    ,
    2:3
    ,
    3:4
    ,
    4:3
    ,
    4:5
    ,
    5:4
    ,
    16:9
    ,
    9:16
    ,
    21:9
    , 或
    auto
  • --quality
    :
    low
    ,
    medium
    , 或
    high
  • --resolution
    :
    0.5K
    ,
    1K
    ,
    2K
    , 或
    4K
命令会返回任务负载。如果任务处于待处理或处理中状态,请等待任务完成:
bash
pnpm dlx @pilio/cli task wait <task_id>