gpt-image-2
Installation
Summary
Text-to-image generation and prompt-based image editing via the Pilio GPT Image 2 API.
- Generate images from text prompts or edit and compose from one or more local reference images
- Supports multiple aspect ratios (1:1, 3:2, 16:9, 21:9, and more) and quality/resolution tiers (low/medium/high, 0.5K to 4K)
- Requires
PILIO_API_KEYenvironment variable; use the Pilio CLI for consistent polling, credit tracking, and error handling - Returns async task payloads with built-in task wait command for monitoring generation status
SKILL.md
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>"