---
title: Gpt Image 2 Skill for Claude Code
canonical: https://skillselion.com/skills/pilioai/skills/gpt-image-2
content_type: text/markdown
description: "gpt-image-2 is a Pilio CLI agent skill that generates, edits, restyles, or composes images from prompts or local reference files for developers needing assets."
---

# Gpt Image 2 Skill

Title: Gpt Image 2 Skill for Claude Code

> gpt-image-2 is a Pilio CLI agent skill that generates, edits, restyles, or composes images from prompts or local reference files for developers needing assets.

Canonical: https://skillselion.com/skills/pilioai/skills/gpt-image-2

gpt-image-2 is a Pilio CLI agent skill that generates, edits, restyles, or composes images from prompts or local reference files for developers needing assets inside a coding workflow.

gpt-image-2 is a Pilio CLI skill for generating, editing, and composing images through the unified Pilio developer API. Developers set PILIO_API_KEY in the environment and run commands like pnpm dlx @pilio/cli gpt-image-2 --prompt "<prompt>" --aspect-ratio "1:1". The skill also covers prompt-based editing, restyling, product-photo transformation, and multi-image composition from local references with consistent upload, polling, and error handling via the official SDK.

## Key facts

- Installs: 20,366
- GitHub stars: 44
- Author: pilioai
- Repository: pilioai/skills
- Works in Grok Bot: yes
- Install command: `npx skills add https://github.com/pilioai/skills --skill gpt-image-2`
- Last updated: July 26, 2026

## What Gpt Image 2 does

Generate, edit, restyle, or compose images directly from natural language prompts or reference files inside their AI coding workflow.

How do you generate images from the terminal with Pilio?

Generated or edited image files from Pilio GPT Image 2 API runs

Best for: Developers with PILIO_API_KEY who need CLI-driven text-to-image, edits, or compositions during app or doc work.

Not for: Teams blocked from external image APIs or workflows requiring only vector/SVG tooling without raster generation.

- Unified access to Pilio GPT Image 2 via official CLI and developer API
- Supports text-to-image generation, prompt-based editing, restyling, and product-photo transformation
- Accepts --input for one or more local reference images

## 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:

```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>
```

## Gpt Image 2 FAQ

### How do you run gpt-image-2 from the command line?

gpt-image-2 uses `pnpm dlx @pilio/cli gpt-image-2 --prompt "<prompt>" --aspect-ratio "1:1"` for generation. Set PILIO_API_KEY in the environment; the skill instructs agents not to ask users to paste API keys into chat.

### What image tasks does gpt-image-2 cover beyond generation?

gpt-image-2 handles prompt-based image editing, restyling, product-photo transformation, and composition from one or more local reference images. Upload, polling, credits, and API errors follow the official Pilio SDK workflow.

### Is Gpt Image 2 safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

## Machine access

- [Sitemap](https://skillselion.com/sitemap.xml)
- [llms.txt](https://skillselion.com/llms.txt)
- [llms-full.txt](https://skillselion.com/llms-full.txt)
- [Developer resources](https://skillselion.com/developers)
- [OpenAPI spec](https://skillselion.com/openapi.json)
- [MCP handshake](https://skillselion.com/.well-known/mcp)
- [API catalog](https://skillselion.com/.well-known/api-catalog)
- [AI catalog](https://skillselion.com/.well-known/ai-catalog.json)
- [Pricing](https://skillselion.com/pricing.md)
- [Auth](https://skillselion.com/auth.md)
- [AGENTS.md](https://skillselion.com/AGENTS.md)
- [Contact](https://skillselion.com/contact)
- [Home](https://skillselion.com/)
