The image module is not tied to OpenRouter any more

`IMAGE_API_BASE_URL` decides where the image requests go. The default is still
OpenRouter — one key, many models, and the model list in the admin area fills
itself in — but the request body was already written in the OpenAI image shape,
so pointing it at a LiteLLM gateway, a company proxy or a server of your own
works. `GET /images/models` is an OpenRouter route; a base that answers 404 is
treated as "cannot list models", not as an error, and the model id is typed
instead. `IMAGE_API_KEY` is the new name; `OPENROUTER_API_KEY` is still read so
existing instances keep working.

Also: the seeded example recipes now show four different task combinations
rather than four sizes — clean up, poster, cut out to transparent PNG, sticker
with contour, square for social. They are examples to read and replace.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nh4A79bbqT9dcd2inzYUdg
This commit is contained in:
tillandClaude Opus 5 committed 2026-09-15 15:42:12 +00:00
1 parent 0798eb7438
commit eea374d328
6 files changed
+70 -13

No files matched your search

+12 -1
View File
@@ -75,7 +75,7 @@ of the PDF above measures 210.00 × 297.00 mm, because that is what A4 is.
| Module | What it adds | What it needs |
|---|---|---|
| `print` | everything above | nothing — always on |
| `ai` | clean up screenshots, convert, combine, generate | an OpenRouter key (paid per image) |
| `ai` | clean up screenshots, convert, combine, generate | a key for an images API (paid per image) |
| `delivery` | push finished files to an SFTP/FTPS server you already have | that server |
| `mirror` | a second copy of every result, sorted by month | a second target |
| `share` | public links: expiring, revocable, optional passphrase, ZIP download | a public URL |
@@ -92,6 +92,17 @@ A module that is off is off: no navigation entry, no settings card, and its API
routes answer 404 rather than 403 — a disabled instance does not advertise what it
could have done.
![The studio with the AI module on: four tasks, saved presets, exact output size](docs/screenshots/studio.png)
### Which image model
The `ai` module posts to `{IMAGE_API_BASE_URL}/images` in the OpenAI image shape.
The default base is OpenRouter — one key, many models, and the model list in the
admin area fills itself in. Point `IMAGE_API_BASE_URL` at a LiteLLM gateway, a
company proxy or a server of your own and Klarbild talks to that instead; you then
type the model id rather than picking it from a list. Either way the pictures go to
exactly one endpoint and you chose which.
## Why self-hosted matters here
The pictures are family photos, passport photos, ID pictures and client work.