rexai-image-generationlisted
Install: claude install-skill rexleimo/harness-cli
# RexAI Image Generation
Use RexAI's async image API to create images and return usable local files.
## Quick Workflow
1. Use `REXAI_API_KEY` for authentication. If it is missing, teach the user how to configure it for their platform before running the job.
2. Choose the product ID:
- Text-to-image: `gpt-image-2`.
- Image-to-image: `gpt-image-2-i2i`.
3. Pick the zero-install executor for the user's platform:
- Windows/Codex: use `scripts/rexai-image.ps1`; it only needs built-in PowerShell/.NET.
- macOS/Linux: use `scripts/rexai-image-macos.sh`; it uses common system tools (`bash`, `curl`, `perl`, `base64`).
4. Use `scripts/rexai-image.mjs` only when Node is already available.
5. Report the local file path, job id, source URL if present, and expiry time if present.
Read `references/api.md` when you need endpoint details, supported sizes, error codes, or examples.
## API Key Setup
First check whether the key is already available. Do not print the key value:
```powershell
if ($env:REXAI_API_KEY) { "REXAI_API_KEY is set" } else { "REXAI_API_KEY is missing" }
```
If it is missing, tell the user to choose one setup path:
Windows PowerShell, current session only:
```powershell
$env:REXAI_API_KEY = "cr_xxx"
```
Windows PowerShell, persistent for new terminals:
```powershell
setx REXAI_API_KEY "cr_xxx"
```
macOS/Linux, current shell only:
```bash
export REXAI_API_KEY="cr_xxx"
```
macOS zsh, persistent for new terminals:
```bash
printf '%s\n' 'export REXAI_A