Skip to content
Back to skills

Keirouter Image

BSecurity

Generate images via KeiRouter /v1/images/generations using OpenAI DALL-E / Gemini Imagen / FLUX / MiniMax / Stability AI / Fal.ai models. Use when the user wants to create, generate, draw, or render an image, picture, or text-to-image (txt2img).

  • 145 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added August 30, 2026
ai-agentsgobashgit

Security analysis

B88/100
  • criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study

Pro shows the line behind each finding and how to fix it

Scanned August 30, 2026

npx -y skills add mydisha/keirouter --skill keirouter-image --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Keirouter Image?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Keirouter Image
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/mydisha-keirouter-image/badge)](https://www.skillsdirectory.com/skills/mydisha-keirouter-image)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: keirouter-image
description: Generate images via KeiRouter /v1/images/generations using OpenAI DALL-E / Gemini Imagen / FLUX / MiniMax / Stability AI / Fal.ai models. Use when the user wants to create, generate, draw, or render an image, picture, or text-to-image (txt2img).
---

# KeiRouter — Image Generation

Requires `KEIROUTER_URL` (and `KEIROUTER_KEY` if auth enabled). See https://raw.githubusercontent.com/mydisha/keirouter/main/skills/keirouter/SKILL.md for setup.

## Discover

```bash
curl $KEIROUTER_URL/v1/models/image | jq '.data[].id'
# Per-model params/options (size enum, quality enum)
curl "$KEIROUTER_URL/v1/models/info?id=openai/dall-e-3"
```

## Endpoint

`POST $KEIROUTER_URL/v1/images/generations`

| Field | Required | Notes |
|---|---|---|
| `model` | yes | from `/v1/models/image` |
| `prompt` | yes | image description |
| `n` | no | count (provider-dependent) |
| `size` | no | `1024x1024`, `1792x1024`, ... |
| `quality` | no | `standard` / `hd` (OpenAI) |
| `response_format` | no | `url` (default) or `b64_json` |

Add query `?response_format=binary` to receive raw image bytes (handy for saving file).

## Examples

Save to file (binary):

```bash
curl -X POST "$KEIROUTER_URL/v1/images/generations?response_format=binary" \
  -H "Authorization: Bearer $KEIROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini/gemini-3-pro-image-preview","prompt":"watercolor mountains at sunrise","size":"1024x1024"}' \
  --output out.png
```

JS (URL response):

```js
const r = await fetch(`${process.env.KEIROUTER_URL}/v1/images/generations`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.KEIROUTER_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "gemini/gemini-3-pro-image-preview", prompt: "neon city", size: "1024x1024" }),
});
const { data } = await r.json();
console.log(data[0].url || data[0].b64_json.slice(0, 40));
```

## Response shape

JSON (default `response_format=url`):
```json
{ "created": 1735000000, "data": [{ "url": "https://..." }] }
```

`response_format=b64_json`:
```json
{ "created": 1735000000, "data": [{ "b64_json": "iVBORw0KGgo..." }] }
```

Query `?response_format=binary` returns raw image bytes (Content-Type `image/png` or `image/jpeg`).

## Provider quick reference

| Provider | ID | Notes |
|---|---|---|
| OpenAI | `openai` | DALL-E 3, standard/hd quality |
| Gemini | `gemini` | Imagen, only `prompt` required |
| MiniMax | `minimax` | Standard OpenAI shape |
| Stability AI | `stability-ai` | `style` preset, `output_format` |
| Fal.ai | `fal-ai` | Async polling, img2img via `image` |
| NanoBanana | `nanobanana` | Edit mode via `image`/`images[]` |
| OpenRouter | `openrouter` | Routes to underlying image models |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.