From 49dd4c2e4f6156e8deec67df551bb66dc82024de Mon Sep 17 00:00:00 2001 From: unknown <> Date: Thu, 9 Jul 2026 17:03:47 +0000 Subject: [PATCH] docs(openrouter-images): document streaming SSE events incl. image_generation.text_chunk Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- skills/openrouter-images/SKILL.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/skills/openrouter-images/SKILL.md b/skills/openrouter-images/SKILL.md index 52e1c25..7596ab2 100644 --- a/skills/openrouter-images/SKILL.md +++ b/skills/openrouter-images/SKILL.md @@ -154,6 +154,18 @@ Images come back base64-encoded in a `data` array. For raster PNG output, `media } ``` +### Streaming + +Endpoints with `supports_streaming` accept `"stream": true` on `POST /api/v1/images` and respond with SSE events: + +| Event | Payload | +|---|---| +| `image_generation.partial_image` | `partial_image_index`, `b64_json` — a partial raster image | +| `image_generation.text_chunk` | `text`, `phase` — a text fragment for text-based formats (e.g. partial SVG markup). `phase` is `content`, `reasoning`, or `draft`; only `content` is renderable output | +| `image_generation.completed` | Final `b64_json`, `media_type`, `created`, `usage` | + +The skill's scripts use non-streaming requests; streaming is useful when rendering output progressively (e.g. SVG as it's generated). + ## Using a Different Model The default model is `google/gemini-3.1-flash-image-preview` (Nano Banana 2). To use another, pass `--model ` with any image model ID (e.g. `google/gemini-3.1-flash-lite-image`). Run `discover.ts` to browse image models and `discover.ts ` to confirm which parameters and providers it supports before generating.