The image module is not tied to OpenRouter any more
CI / check (push) Has been cancelled

`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:
Claude committed 2026-09-15 15:34:54 +00:00
1 parent 0798eb7438
commit 31d9bb1270
6 files changed
+70 -13

No files matched your search

+13 -2
View File
@@ -73,9 +73,20 @@ PUBLIC_BASE_URL=http://localhost:4321
# ─────────────────────────────────────────────────────────────────────────────
# 4. Module: ai — image generation
# ─────────────────────────────────────────────────────────────────────────────
# Klarbild calls image models through OpenRouter. This costs money per image.
# The key can also be entered in the admin area; the database value wins.
# Klarbild calls image models over an OpenAI-shaped images endpoint. This costs
# money per image, whoever you call. The key can also be entered in the admin
# area, and that value wins over anything set here.
IMAGE_API_KEY=
# Where those requests go. The default is OpenRouter, which is one key for many
# models. Point this at anything that answers POST {base}/images in the OpenAI
# image shape — a LiteLLM gateway, a company proxy, a server of your own — and
# Klarbild talks to that instead.
IMAGE_API_BASE_URL=https://openrouter.ai/api/v1
# The old name for IMAGE_API_KEY. Still read, so instances set up before the
# endpoint became configurable keep working.
OPENROUTER_API_KEY=
# ─────────────────────────────────────────────────────────────────────────────