Gpt Image 2

by pilioai1a9a4516b49bNo licenseListed Oct 8, 2026Updated Oct 8, 2026

Create or edit images with Pilio GPT Image 2 through the unified Pilio developer API. Use when the user wants text-to-image generation, prompt-based image editing, restyling, product-photo transformation, or composition from one or more local reference images.

Instructions onlyDesign & Creative
AI-generated overview

Generates or edits images with the Pilio GPT Image 2 model via the Pilio CLI, using text prompts and optional reference images.

What it does
Guides an agent through calling the Pilio CLI to run the GPT Image 2 model for text-to-image generation, prompt-based editing, restyling, product-photo transformation, and composition from one or more local reference images. It documents the command form, options for aspect ratio and quality, and how to wait on a pending task. Output is an image produced by the remote service, returned as a task payload.
When to use it
Use when a user asks for image generation from a text prompt, or for editing, restyling, or composing images from local reference files. Also relevant when the agent needs the correct CLI invocation and option values for the GPT Image 2 model.
Requirements
Requires the PILIO_API_KEY environment variable and network access to the Pilio service. Uses pnpm dlx to run the @pilio/cli package, so pnpm and a Node.js runtime are needed. Ships no scripts; it is instructions only.

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:

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.

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:

bash
pnpm dlx @pilio/cli task wait <task_id>

Source and attribution

Source:pilioai/skillsinskills/gpt-image-2at commit1a9a451

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal