RouteMux Docs
Integrations

Agent Skills

Install RouteMux skills so Codex CLI, Claude Code and Cursor can generate images and video with your API key.

Agent Skills are plain SKILL.md files that teach a coding agent how to do something. RouteMux publishes four of them, and they work in any agent that reads the open format: Claude Code, Codex CLI, Cursor, OpenCode and others.

Source: github.com/rootfily-ai/routemux-skills (MIT).

Why you may need the images skill

Point a coding agent at any third-party gateway and its built-in image tool stops working. Codex CLI's $imagegen is the usual example: it rides the vendor's own subscription session and ignores the base_url you configured.

This is not a misconfiguration, and there is nothing to fix in your config — it is how the built-in tool is wired. The fix is to give the agent a skill that calls the image endpoint over plain HTTP instead, which works regardless.

What's published

SkillWhat it does
routemux-imagesGenerate and edit images, save them to a path you choose
routemux-videoSubmit a video job, poll it, download the result
routemux-modelsWhich models your key can call, what they cost, what they support
routemux-setupPoint Codex CLI / Claude Code / Cursor / Cline / … at RouteMux

Install

GitHub CLI

Requires gh 2.90 or newer.

# everything
gh skill install rootfily-ai/routemux-skills

# just one
gh skill install rootfily-ai/routemux-skills routemux-images

# for all your projects instead of just this repo
gh skill install rootfily-ai/routemux-skills routemux-images --scope user

Claude Code

/plugin marketplace add rootfily-ai/routemux-skills
/plugin install routemux@routemux

Manual

For OpenCode or anything else that reads a skills directory:

git clone https://github.com/rootfily-ai/routemux-skills /tmp/routemux-skills
cp -r /tmp/routemux-skills/skills/* ~/.config/opencode/skills/
rm -rf /tmp/routemux-skills

Set your key

Every skill reads exactly one environment variable:

export ROUTEMUX_API_KEY='sk-...'

Create the key in the console, and add that line to ~/.zshrc or ~/.bashrc so new terminals have it.

The key is read from the environment and nowhere else

These skills do not read .env, do not read any credential or config file on your disk, and never write the key into a file, a log line or a commit. The only thing they write is the artifact you asked for, at the path you gave. No eval, no SDK install — just curl and a little python3. Every script is short enough to read in one sitting, and we would rather you did.

Then just ask

draw a paper map of the world folded into a single hop, save it to ./hop.png

The agent loads routemux-images, picks an image model from the live catalogue, calls POST /v1/images/generations, and writes the file.

Things worth knowing

  • One image per call. The skill does not batch variants. Each image is billed separately and the pre-authorisation scales with the count, so a batch default would lock out exactly the people who just topped up a small amount.
  • Model names are never hard-coded. The skills query /v1/models?capability=image_generation every time, because slugs change — these docs shipped a stale example model for several days after the family default moved.
  • A backup model may answer. If the primary image upstream is down, RouteMux can serve the request with a different image model rather than failing. Billing follows the model that actually answered, and the response headers name it.
  • There is a daily image allowance per key. Exceeding it returns RMX-LIMIT-4004; it resets at 00:00 UTC.

On this page