mcpField
G
gpt-image-2

gpt-image-2

github.com/pilioaiCreative & media4420.3k installsUpdated 14w ago
Repository

About gpt-image-2

A skill for generating images with GPT Image 2 through the Pilio CLI. It supports text prompts and editing or composing with reference images; `PILIO_API_KEY` must be set in the environment.

Key features

  1. 01Generate images from text prompts
  2. 02Edit or compose with reference images
  3. 03Set aspect ratio and quality
  4. 04Wait for in-progress generation tasks

Use cases

  1. 01Generate an image from a written description
  2. 02Create variations based on reference images
  3. 03Choose an output canvas aspect ratio
  4. 04Wait for asynchronous image generation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pilioai/skills --skill gpt-image-2

After installing, type/gpt-image-2in Claude Code to confirm it loaded.

Details

From the project README

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.

Try the same workflow online first: https://pilio.ai/

Generate from text:

pnpm dlx @pilio/cli gpt-image-2 --prompt "<prompt>" --aspect-ratio "1:1"

Edit or compose from one or more references:

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.

GPT Image 2's upstream model does not expose a separate resolution parameter. Use --aspect-ratio to request the output canvas shape; Pilio appends that ratio to the prompt to guide generation. Requests containing resolution are rejected with HTTP 400.

The command returns a task payload. If the task is still pending or processing, wait for it:

pnpm dlx @pilio/cli task wait <task_id>

Comments

Markdown supported