Skip to content

Commit 8f807ae

Browse files
committed
docs: explain OpenRouter image route compatibility (#101367)
1 parent e2d0470 commit 8f807ae

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

‎docs/providers/openrouter.md‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,17 @@ under `agents.defaults.mediaModels.image`:
115115
}
116116
```
117117

118-
OpenClaw sends image requests to OpenRouter's dedicated image API
119-
(`POST /api/v1/images`) with `model`, `prompt`, and `n`. Gemini image models
120-
additionally receive `aspect_ratio` and `resolution` hints; other image models
121-
do not. Image edits pass source images as `input_references`. Generated images
122-
come back as base64 (`b64_json`) with an optional `media_type`; when
123-
`media_type` is absent, OpenClaw sniffs the image format from the bytes. Use
124-
`agents.defaults.mediaModels.image.timeoutMs` for slower models; the
125-
`image_generate` tool's per-call `timeoutMs` still wins.
118+
OpenClaw sends canonical OpenRouter image requests to the dedicated image API
119+
(`POST /api/v1/images`). Gemini image models additionally receive
120+
`aspect_ratio` and `resolution` hints, and image edits pass source images as
121+
`input_references`. Generated images come back as base64 (`b64_json`) with an
122+
optional `media_type`; when `media_type` is absent, OpenClaw sniffs the image
123+
format from the bytes.
124+
125+
Configured custom OpenRouter `baseUrl` destinations retain the existing
126+
chat-completions image route for compatibility with proxies that do not expose
127+
the dedicated endpoint. Use `agents.defaults.mediaModels.image.timeoutMs` for
128+
slower models; the `image_generate` tool's per-call `timeoutMs` still wins.
126129

127130
## Video generation
128131

‎docs/tools/image-generation.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,10 @@ and ComfyUI support 1.
399399
</Accordion>
400400
<Accordion title="OpenRouter image models">
401401
OpenRouter image generation uses the same `OPENROUTER_API_KEY` and
402-
routes through OpenRouter's chat completions image API. Select
403-
OpenRouter image models with the `openrouter/` prefix:
402+
routes canonical requests through OpenRouter's dedicated `/api/v1/images`
403+
endpoint. Configured custom OpenRouter base URLs retain the existing
404+
chat-completions image route for proxy compatibility. Select OpenRouter
405+
image models with the `openrouter/` prefix:
404406

405407
```json5
406408
{

0 commit comments

Comments
 (0)