Skip to content

Translation Cost & Memory

This page is the audit + optimisation surface for paid translation. It tracks every translation job’s cost, surfaces hit-rate of the translation memory (TM), and lets you prune the TM when it gets stale. The goal is simple: pay once per unique cue, not once per re-run.

Settings → Translation → Cost & Memory — split into two tabs that share the page:

TabContent
CostPer-job cost log + aggregate by backend, day, and series.
MemoryTranslation memory entries with hit count, last-used timestamp, source + target.

Every completed translation job writes a row to translation_events:

FieldEffect
Job IDUnique identifier; click to open the produced file.
Series / MovieSource media.
BackendThe provider that did the work.
Source languageTargetLanguage pair.
Tokens / chars inInput volume sent to the backend.
Tokens / chars outOutput volume returned.
LatencyWall-clock time from queue to finish, in seconds.
Cost (USD)Computed from in/out volumes × backend’s configured price.
TM hit rateFraction of cues served from translation memory rather than the backend.

The header shows running totals:

TilePeriod
TodayJobs in the current server-day.
Last 7 daysRolling week.
Last 30 daysRolling month.
All timeSince the database was created.

Each tile breaks down per backend so you can see where spend lives. Click a tile to expand into a per-backend daily chart.

Cost is computed at job time from the configured price under Settings → Translation → Backends → <backend> → Price. Changing the price doesn’t retroactively rewrite history — but the new price applies to every new job. For OpenAI / Anthropic / Gemini, prices are per 1M input + output tokens; for DeepL / Azure, per 1M characters.

Translation memory caches (source language, source text, target language, backend) → translated text. On every translation job, Sublarr checks the cache first; only cache misses hit the backend.

ScenarioWithout TMWith TM
Re-translate same episode after editing a cueRe-translate the entire fileHit cache for unchanged cues, only pay for the edited one
Translate a recap episodePay full cost for all the recapped linesCache hit — recap lines already translated for prior episodes
Same cue across multiple shows (e.g. opening credits)Pay each timePay once
ColumnEffect
Source textCue text exactly as it appeared.
Target textTranslated rendering.
Source / target languageLanguage pair.
BackendBackend that produced this entry — the cache is keyed per backend so quality stays consistent.
HitsHow many times this entry was served from cache.
Last usedTimestamp of the most-recent hit.
CreatedOriginal translation timestamp.
FilterEffect
SearchSubstring match on source or target text.
BackendRestrict to one backend.
Language pairen → de, ja → en, etc.
Min hitsOnly entries used at least N times — finds your “load-bearing” cache.
Last used”Older than 90 days” — finds candidates for pruning.

When the TM grows too large or contains entries from a backend you no longer use:

ActionEffect
Delete selectedRemove specific rows.
Delete by filterDelete every row matching the current filter. Confirm prompt shows count.
Delete by backendDrop everything from a specific backend (after a quality regression, e.g.).
ResetWipe the entire TM. Future jobs start with cold cache.

The TM hit rate per job is a quick proxy for how much money you’re saving:

Hit rateReading
0%Cold start or unique content.
10–30%Typical for fresh anime — a lot of unique dialogue.
40–60%Recap episodes, sequels reusing OP/ED, sitcoms with catchphrases.
70%+Re-translation after an edit; or repetitive content (clip shows, training videos).

If hit rate is consistently below your expectation:

  1. Confirm the same backend is used (cache is keyed per backend).
  2. Confirm the source language hasn’t been re-detected (a swap from en to und would miss the cache).
  3. Ensure the source file hasn’t been re-encoded with subtle whitespace differences — the TM is exact-match on text.

Each backend has its own cache because translation quality differs. Switching the primary backend means:

EffectWhat happens
First job after switchCache miss for everything; full cost on the new backend.
Old backend’s cacheStill present; usable if you switch back.
Hybrid runsMid-job backend swap (e.g. Ollama failed, fall back to Claude) creates two separate cache entries per cue.

Use Settings → Translation → Memory → Backend filter to inspect each backend’s cache independently.

Both cost rows and memory entries can be exported as CSV from the page header. Useful for:

  • Monthly cost reconciliation against your backend’s invoice.
  • Sharing with auditors.
  • Bulk editing the TM externally and re-importing.