gen

A shortcut command for creating a RunAPI media-generation task from a supplied prompt. It selects and checks a suitable model before submitting the task.

In plain words
What is it for?
Use it with a prompt to generate an image, video, music, or audio task, then view the task status, output links, and available cost details.
Why use it?
It reduces the steps needed for a straightforward RunAPI request when broad model exploration is unnecessary.

Command

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.

agentmods
npx agentmods add commands/runapi-ai/mcp/gen
Clone the repo
git clone --depth 1 https://github.com/runapi-ai/mcp
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 270 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00025 $0.00270
Opus 5 $0.00013 $0.00135
Sonnet 5 $0.00005 $0.00054
Haiku 4.5 $0.00003 $0.00027

Measured yesterday against content hash 1af9032d276d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gen scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/commands/gen.md · 26 lines

What it actually says

Quick Generate

Create a RunAPI media task from $ARGUMENTS.

Instructions

  1. If $ARGUMENTS is empty, ask for the prompt or task description.
  2. Call mcp__runapi__list_models with the most likely modality filter.
  3. Call mcp__runapi__get_model_info with the selected service, action, and model slug, then obey returned input rules.
  4. If the selected task is video, music, or a batch, ask for confirmation before creating it.
  5. Generate one new opaque idempotency key for this logical task.
  6. Delegate the creation to the task-executor agent with exact service, action, model, params, idempotency key, and wait settings.
  7. Present task ID, status, output URLs, and cost fields when available.

Do not invent model slugs. Do not quote prices without mcp__runapi__check_pricing. Do not describe generated media content. Do not retry an unknown create result automatically. An explicit retry must reuse the original idempotency key and identical input.

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. yesterday First seen · 26 lines · 25 tokens per session scan A 1af9032d276d

Subscribe to this mod's changes

gen is a command published in the GitHub repository runapi-ai/mcp (55 stars, last pushed 7d ago), licensed Apache-2.0. It adds 25 tokens to every session and 270 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.