rexai-image-generation

rexai-image-generation is a skill for Codex from rexleimo/aios. It costs 80 tokens per session (2,113 once invoked), scanned A, original, MIT.

An image-generation skill that uses RexAI to create new images from text or transform existing images from other images. It returns the result as a local file.

In plain words
What is it for?
Use it for text-to-image and image-to-image work, including creating visual artwork, editing an existing image, and producing usable local image files.
Why use it?
It provides a defined process for image jobs, including choosing the correct image mode, checking for the required API key, and reporting the generated file and job details.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex; mentions OpenCode.

Good fit Use it for text-to-image and image-to-image work, including creating visual artwork, editing…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rexleimo/aios/rexai-image-generation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rexleimo/aios --skill rexai-image-generation
Clone the repo
git clone --depth 1 https://github.com/rexleimo/aios

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rexai-image-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/rexleimo/aios/rexai-image-generation.svg)](https://agentmods.dev/skills/rexleimo/aios/rexai-image-generation)
Your own site
<a href="https://agentmods.dev/skills/rexleimo/aios/rexai-image-generation"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/rexai-image-generation.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.02113
Opus 5 $0.00040 $0.01056
Sonnet 5 $0.00016 $0.00423
Haiku 4.5 $0.00008 $0.00211

Measured today against content hash 5b43bdba0e7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rexai-image-generation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/rexai-image-macos.sh, scripts/rexai-image-macos.test.sh, scripts/rexai-image.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- macOS/Linux: use `scripts/rexai-image-macos.sh`; it uses common system tools (`bash`, `curl`, `perl`, `base64`).
skill-sources/rexai-image-generation/SKILL.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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:

$env:REXAI_API_KEY = "cr_xxx"

Windows PowerShell, persistent for new terminals:

setx REXAI_API_KEY "cr_xxx"

macOS/Linux, current shell only:

export REXAI_API_KEY="cr_xxx"

macOS zsh, persistent for new terminals:

printf '%s\n' 'export REXAI_API_KEY="cr_xxx"' >> ~/.zshrc

Read the full file on GitHub · 184 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +16 lines 5b43bdba0e7d
  2. 7d ago First seen · 168 lines · 80 tokens per session scan A 10a1fd154b36

Subscribe to this mod's changes

rexai-image-generation is a skill published in the GitHub repository rexleimo/aios (52 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 2,113 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.