mcpField
O
openrouter-img

openrouter-img

github.com/rtadewaldCreative & media25744 installsUpdated 4d ago
Repository

About openrouter-img

A command-line skill for generating and editing images through OpenRouter's Image API. It supports model aliases, resolution and aspect-ratio options, and can list models with current endpoint prices.

Key features

  1. 01Generate images through OpenRouter
  2. 02Edit an image from an input file
  3. 03Select model, resolution, and ratio
  4. 04List models and endpoint prices
  5. 05Read API key from environment files

Use cases

  1. 01Generate an image from a prompt
  2. 02Edit an existing image
  3. 03Compare available image models
  4. 04Check endpoint prices before generation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/rtadewald/skills --skill openrouter-img

After installing, type/openrouter-imgin Claude Code to confirm it loaded.

Bundled filesagents/openai.yamlscripts/generate_image.py

Details

From the project README

OpenRouter Img

Gera imagens pela Image API do OpenRouter (POST /api/v1/images). Chave: OPENROUTER_API_KEY (cwd .env ou ~/.env).

Uso

# Listar top 10 + preços ao vivo do endpoint
uv run ~/.agents/skills/openrouter-img/scripts/generate_image.py --list --top

# Gerar
uv run ~/.agents/skills/openrouter-img/scripts/generate_image.py \
  --prompt "..." --filename "yyyy-mm-dd-hh-mm-ss-name.png" \
  --model flash --resolution 1K --aspect-ratio 16:9

Aliases de --model: ver tabela abaixo — ou o slug completo.

Default: flash @ 1K / 16:9. Só subir resolução se o usuário pedir. Rodar no cwd do usuário. Não ler a imagem de volta — informar path (+ usage.cost se vier).

Edição: --input-image path.png + prompt de edição.

Modelos empregados (top 10)

#AliasNomeSlug OpenRouter
1pro / nb-proNano Banana Pro (Gemini 3 Pro Image)google/gemini-3-pro-image
2gpt / gpt2GPT Image 2openai/gpt-image-2
3flux-maxFLUX.2 Maxblack-forest-labs/flux.2-max
4fluxFLUX.2 Problack-forest-labs/flux.2-pro
5seedream-proSeedream 5.0 Probytedance-seed/seedream-5-0-pro
6seedreamSeedream 5.0 Litebytedance-seed/seedream-5-0-lite
7flash / nb-flashNano Banana 2 (Gemini 3.1 Flash Image)google/gemini-3.1-flash-image
8qwenQwen Image 3 Proqwen/qwen-image-3-pro
9grokGrok Imagine Image 2.0x-ai/grok-imagine-image-2.0
10seedream-4.5Seedream 4.5bytedance-seed/seedream-4.5

Tabela de custo (consulta)

Valores OpenRouter (snapshot ago/2026). Atualizar com --list --top. O response usage.cost é a verdade da cobrança.

Alias5121K2K4K / outroUnidade
flash~$0.045~$0.067~$0.101~$0.151 @4Ktoken → $/img estimado
pro—~$0.134~$0.134— (sem 4K neste endpoint)token → $/img estimado
seedream——$0.035$0.035 @4K$/imagem fixo
seedream-pro—$0.045$0.045$0.09 high-res$/imagem
seedream-4.5—$0.04$0.04$0.04$/imagem
qwen—$0.04$0.075—$/imagem
grok—$0.04–0.06$0.06–0.08—$/imagem (low/medium)
flux—~$0.03~$0.12*—$0.03 / megapixel
flux-max—~$0.07~$0.28*—$0.07 / megapixel
gpt2—ver usage.costver usage.cost—token (input+output)

*Estimativa 2K ≈ 4 MP (2048²); o custo real depende dos pixels gerados.

Resoluções “—” = não listadas / não suportadas nesse endpoint. Se a API rejeitar, mudar --resolution.

Escolha rápida

  • UI/mock com texto → pro ou flash
  • Volume barato → flash@512, seedream, flux
  • Fotorrealismo / arte → flux-max, seedream-pro, gpt2

Comments

Markdown supported