RouteMux Docs
Integrations

Agent Skills

Let Claude Code, Codex, Cursor and other coding agents generate images and video with your RouteMux API key. Three steps — get a key, install, ask.

RouteMux Agent Skills give your coding agent new abilities: generate and edit images with GPT Image 2.5, make short videos with MiniMax H3, look up models and prices, and connect your tools to RouteMux. You ask in plain words; the agent does the rest and bills your RouteMux wallet.

They work in Claude Code, Codex, Cursor, OpenCode, Gemini CLI and any other agent that reads the SKILL.md format.

Before you start

  • A RouteMux account that has topped up at least once. The image models (openai/gpt-image-2.5-flare, openai/gpt-image-2.5-sunburst) and the video model (minimax/minimax-h3) unlock after your first top-up. Any amount works — top up here.
  • bash, curl and python3 on your machine. The skills use nothing else.

Step 1: Get your API key

Already using RouteMux in Claude Code, Codex, Qwen Code or Gemini CLI? Skip this step: the skills reuse the key your agent already sends to RouteMux. See Where the key comes from.

Otherwise:

  1. Create a key at routemux.com/console/keys.

  2. Add this line to your shell profile — ~/.zshrc if you use zsh (the macOS default), ~/.bashrc if you use bash:

    export ROUTEMUX_API_KEY='sk-...'
  3. Open a new terminal so the change takes effect.

If you use the install script in step 2, it can ask for the key and save it to your profile for you.

Step 2: Install the skills

npx skills add https://routemux.com -g

This needs Node.js. It finds the agents installed on your machine and asks which ones to install into. To skip the question, name the agent:

npx skills add https://routemux.com -g -a codex
npx skills add https://routemux.com -g -a claude-code

-g installs for all your projects. Leave it out to install into the current project only.

No Node.js, or prefer a Claude Code plugin? See Other ways to install.

Step 3: Ask

Start your agent from a new terminal, so it sees the key, and ask:

Draw a minimalist coffee shop logo and save it to ./logo.png

The agent writes a detailed prompt, generates the image and tells you where it saved it, its real size, the model and the price.

The first time a skill runs, your agent asks for permission. Allow it:

  • Claude Code asks to run a Bash command.
  • Codex may ask to approve network access.

If Codex was already running when you installed, restart it first.

Started your agent from the Dock?

Agents started from the Dock or a desktop launcher do not read your shell profile, so they may not see the key. Start the agent from a terminal, or set the key in the agent's own config — see Agent cannot see the key.

Call a skill by name

Asking in plain words is enough. To call a skill directly:

AgentImagesVideo
Claude Code, installed as a plugin/routemux:routemux-images/routemux:routemux-video
Claude Code, installed with npx or the script/routemux-images/routemux-video
Codex$routemux-images$routemux-video
Any other agentJust askJust ask

What's included

SkillWhat it doesTry asking
routemux-imagesGenerate and edit images with GPT Image 2.5. Guide"Make a poster for a jazz night"
routemux-videoMake videos from text with MiniMax H3. Guide"A 5-second clip of rain on a window"
routemux-modelsWhich models your key can call, what they cost, what they support"Which image models can my key use?"
routemux-setupPoint your tools at RouteMux"Set up Codex to use RouteMux"

Other ways to install

Claude Code plugin

Requires Claude Code 2.1.224 or later. Type these inside a Claude Code session, one at a time:

/plugin marketplace add https://routemux.com/.well-known/agent-skills/marketplace.json
/plugin install routemux@routemux
/reload-plugins

Plugin or npx — pick one

For Claude Code, install either the plugin or the npx version, not both. With both, every skill shows up twice.

Install script (no Node.js)

curl -fsSL https://routemux.com/.well-known/agent-skills/install.sh | sh

The script:

  • Finds the agents on your machine and installs the skills into each one's skills directory.
  • Checks every download against its sha256 digest and stops if one does not match.
  • If ROUTEMUX_API_KEY is not set, asks for your key (the input is hidden), checks it with RouteMux, and — only if you say yes — adds it to your shell profile. It tells you plainly that the key is stored there in plain text. If your agent already uses RouteMux, press Enter to skip this.

To install for one agent only:

curl -fsSL https://routemux.com/.well-known/agent-skills/install.sh | sh -s -- --agent codex

Other options: --dir PATH installs into a directory you choose, and --no-key skips the key step.

AgentSkills directory
Claude Code~/.claude/skills
Codex~/.agents/skills
Cursor~/.cursor/skills
OpenCode~/.config/opencode/skills
Gemini CLI~/.gemini/skills

Manual download

The index at routemux.com/.well-known/agent-skills/index.json lists one zip per skill. Each entry has a url (relative to https://routemux.com) and a digest (sha256:...).

  1. Download the zip for the skill you want.

  2. Check that its sha256 matches the digest — shasum -a 256 on macOS, sha256sum on Linux.

  3. Unzip it into a folder named after the skill, inside your agent's skills directory (see the table above). SKILL.md sits at the root of the zip:

    mkdir -p ~/.claude/skills/routemux-images
    unzip routemux-images-*.zip -d ~/.claude/skills/routemux-images

Where the key comes from

The skills take the first key they find, in this order:

WhereUsed when
ROUTEMUX_API_KEYAlways
ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEYANTHROPIC_BASE_URL is https://api.routemux.com — Claude Code set up for RouteMux
OPENAI_API_KEYOPENAI_BASE_URL is https://api.routemux.com/v1 — Qwen Code, OpenAI SDKs
GEMINI_API_KEYGOOGLE_GEMINI_BASE_URL is https://api.routemux.com/vertex-ai — Gemini CLI
~/.codex/config.toml: a provider's experimental_bearer_token, or the variable its env_key namesthat provider's base_url is https://api.routemux.com/v1 — Codex. The active model_provider is tried first
~/.claude/settings.json: env.ANTHROPIC_AUTH_TOKEN or env.ANTHROPIC_API_KEYenv.ANTHROPIC_BASE_URL is https://api.routemux.com — Claude Code, when the skill runs in another agent

Only the host of the base URL is compared, so /v1 or a trailing slash makes no difference. A key whose base URL points anywhere else — the vendor's own API, another gateway, or no base URL at all — belongs to that service, and the skills never use it. In the config files a key is only ever paired with the base URL of its own entry, and CODEX_HOME / CLAUDE_CONFIG_DIR are honoured.

What the skills touch

  • The key comes from the places above only: environment variables, and the RouteMux entry of the Codex and Claude Code config files. The skills never read .env or any other file, never write the key anywhere, and only send it to api.routemux.com.
  • The only files they write are the images and videos you ask for.
  • No eval, no SDK — just bash, curl and a little python3. MIT-licensed.

Next

  • Images — sizes, editing, models and pricing
  • Video — length, resolution, aspect ratio and pricing
  • Troubleshooting — key not found, top-up required, updating and uninstalling

On this page