gpt-image-2-apilisted
Install: claude install-skill kiakun-collab/kiakun-skills
# GPT Image 2 API
The scripts are already built and tested. **Run them directly — never rewrite, regenerate,
or reimplement them.** Just call `node scripts/<name>.js` from this skill directory with the
right flags. Reach for `references/api-reference.md` only when you need provider payloads or to
diagnose an API error.
## Start Here (no setup needed on each run)
```bash
# Text to image
node scripts/generate.js --prompt "a red fox in snow"
# Edit one image
node scripts/edit.js --image photo.png --prompt "add sunglasses"
# Batch: many prompts at once
node scripts/batch.js --promptlist prompts.txt
# Default: XApex asynchronous submission and polling
node scripts/generate.js --prompt "a red fox in snow" --quality low
node scripts/edit.js --image photo.png --prompt "add sunglasses"
# Force synchronous XApex or a specific fallback provider only when needed
node scripts/generate.js --sync --prompt "a lighthouse at dusk"
node scripts/generate.js --profile vip --prompt "force aifast max"
```
Add `--dry-run` for a no-cost route/cost preview. Add `--json` for a machine-readable result.
If a run fails with a missing-key or config error, do the one-time setup below. Otherwise skip it.
## Choosing a command
| You want to... | Use |
|---|---|
| One image from text | `generate.js` |
| One image edited from a reference | `edit.js` |
| Many images in one go | `batch.js` |
## Reference-image intent (decide before editing)
When the user supplies a reference image, decide **why** the