MetaMender is a lightweight metadata enhancer for Jellyfin. It scans media items with missing or thin overviews, asks an AI provider to write short streaming-style summaries, applies the updates through the Jellyfin API, and logs every change.
- Finds albums, artists, movies, series, episodes, books, or other configured item types with short overviews.
- Generates concise metadata with OpenAI, Anthropic, xAI/Grok, or an OpenAI-compatible provider.
- Automatically writes the improved overview back to Jellyfin.
- Keeps timestamped before/after logs in
logs/. - Tracks input and output token usage separately for better cost estimates.
- Python 3.10 or newer.
- A Jellyfin API key and user ID.
- An API key for the configured AI provider, unless you use a local provider that does not require one.
Install dependencies:
python -m pip install -r requirements.txtMetaMender requires config.json. The script reads its Jellyfin connection,
AI provider, API key, model, and target item types from that file.
- Copy
config.template.jsontoconfig.json. - Fill in these required values:
jellyfin_urljellyfin_api_keyuser_idai_providerai_api_keyfor hosted providers
- Adjust optional settings as needed:
library_iditem_typesai_base_urlai_modelai_reasoning_effortai_max_output_tokensai_temperatureai_input_cost_per_millionai_output_cost_per_million
config.json is ignored by Git so your local credentials stay out of commits.
The default model is gpt-5.4-mini with ai_reasoning_effort set to
none, which is a cost-conscious default for short metadata rewriting. Use
gpt-5.4 when you want higher quality and are comfortable with higher cost.
Set ai_provider to one of these values:
openai: Uses OpenAI's Responses API. This is the default.anthropic: Uses Anthropic's Messages API.xaiorgrok: Uses xAI's Responses API withhttps://api.x.ai/v1.openai_compatible: Uses Chat Completions against yourai_base_url.openrouter: Uses Chat Completions withhttps://openrouter.ai/api/v1.lmstudio: Uses Chat Completions withhttp://localhost:1234/v1.ollama: Uses Chat Completions withhttp://localhost:11434/v1.
When ai_model is omitted, provider defaults are:
openai:gpt-5.4-minianthropic:claude-haiku-4-5xaiorgrok:grok-4.20-reasoning
Other OpenAI-compatible providers require ai_model because local/router model
names vary. Hosted providers also require ai_api_key; local providers such as
LM Studio and Ollama usually do not. ai_reasoning_effort only applies to the
OpenAI Responses API path. MetaMender omits it for Anthropic, xAI/Grok, and
compatible providers.
Example Anthropic config:
"ai_provider": "anthropic",
"ai_api_key": "your-anthropic-key",
"ai_model": "claude-haiku-4-5"Example Grok config:
"ai_provider": "grok",
"ai_api_key": "your-xai-key",
"ai_model": "grok-4.20-reasoning"From a terminal, set the working directory to the MetaMender installation directory, then start the script with the Python launcher:
cd "C:\path\to\MetaMender"
py metamender.pyIf every configured item already has a usable overview, MetaMender exits without making changes. Otherwise it updates matching items automatically.
Each run creates a timestamped log in logs/ with:
- Item names, types, and IDs.
- Original and generated overviews.
- Input and output token usage.
- Estimated cost when pricing is known or configured.
- Skipped items and HTTP errors.
Provider pricing changes over time. MetaMender includes pricing for a few known
OpenAI models, but you can set ai_input_cost_per_million and
ai_output_cost_per_million in config.json when exact accounting matters.