rexai-image-generation

Installation
SKILL.md

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. Read it live from the OS on Windows (powershell [Environment]::GetEnvironmentVariable('REXAI_API_KEY','Machine')) — a bash/PowerShell session started before the key was set holds a stale snapshot.
  2. Choose the product ID (verify against the current instance's product list with one probe; these IDs have drifted before):
    • Text-to-image: gpt-image-2.
    • Image-to-image: the same gpt-image-2 product with the -Image parameter — the relay selects the image-to-image route when the body carries images. gpt-image-2-i2i does NOT exist (404 image_product_not_found); do not use it.
  3. Pick the executor — prefer Python on every platform (the shell script's silent poll loop reads as a hang):
    • Any platform with python3 (default choice): use scripts/impl/rexai-image.py; stdlib only. It prints live poll progress every poll (agents can watch it run), reports the job id on submit/timeout, auto-resubmits on relay circuit-breaker/429 failures (bounded to 3 attempts), tolerates transient 5xx/network errors during polling, and always exits within the per-job --timeout (default 600s) — it cannot hang. If the agent's shell tool has its own timeout, pass a matching --timeout so the script self-reports the job id instead of being killed mid-poll.
    • Windows without Python: use scripts/impl/rexai-image.ps1; it only needs built-in PowerShell/.NET.
    • macOS/Linux without Python: use scripts/impl/rexai-image-macos.sh; it uses common system tools (bash, curl, perl, base64). Pass --timeout-ms 600000 for large sizes.
  4. Use scripts/impl/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.

Installs
1
Repository
rexleimo/aios
GitHub Stars
54
First Seen
5 days ago