Back to ERDB
Dedicated API Docs

ERDB renderer, helper endpoints, and the real query surface.

This page documents the routes that actually exist in the codebase. The important change is simple: ERDB now uses a secure, persistent token-based account system. Instead of passing TMDB keys, MDBList keys, layouts, and provider settings in every request, you use your Tk-... token and ERDB resolves the saved configuration server-side.

For addon integrations, default to https://easyratingsdb.com but allow advanced users to override the ERDB base URL for self-hosted instances. The integration should normalize the base URL automatically so it works with or without a trailing slash.

Public Endpoints

Main public surface exposed by the app.

MethodPathPurposeNotes
GET/{token}/{type}/{id}.jpgToken-based poster/backdrop/logo/thumbnail rendering.Main image API. Resolves configurations via accounts.db.
POST/api/workspace-authLogin, register, and logout for the workspace.Cookie-based session for /configurator.
POST/api/tokenCreate a new token with the current settings.Used by the workspace.
PUT/api/tokenUpdate settings for an existing token.Requires matching password.
GET/api/token?token=...Fetch settings for a token.Used by the workspace and loaders.
GET/api/versionReturns currentVersion, githubPackageVersion, repoUrl.Useful for self-hosted version checks.
Image Renderer

Canonical route: GET /{token}/{type}/{id}.jpg

The image renderer no longer relies on query strings. All settings, including API keys, layouts, badges, and providers, are stored in the server database and resolved using the provided token.

FieldValuesDefaultNotes
tokenTk-xxxxxxxxxxxxxxxrequiredUnique account token generated via the UI or /api/token.
typeposter, backdrop, logo, thumbnail-thumbnail is episode-only.
stored configproviders: tmdb, mdblist, imdb, tomatoes, tomatoesaudience, letterboxd, metacritic, metacriticuser, trakt, simkl, filmweb, filmwebcritics, rogerebert, myanimelist, anilist, kitsusaved in tokenSaved server-side, including styles (glass, square, plain), layouts (top, bottom, left, right, top-bottom, left-right; center, right-vertical; center, center-top, center-bottom, center-vertical, center-top-vertical, center-bottom-vertical, left, left-top, left-bottom, left-vertical, left-top-vertical, left-bottom-vertical, right, right-top, right-bottom, right-vertical, right-top-vertical, right-bottom-vertical), thumbnail sizes (small, medium, large), logo fonts (spicy-sale, somelist, rubik-spray-paint, nabla, honk, paper-scratch, sludgeborn, playgum, atlasmemo, dracutaz, banana-chips, holy-star, rocks-serif), and logo modes (logo-ratings, ratings-only, custom-logo).
lang behaviorTMDB language codesaved in tokenUsually configured once in the workspace and reused automatically.
query overridesnot requiredoffIntegrations should prefer token-only renderer URLs and avoid per-request config fields.
TypeUse caseAccepted IDsNotes
posterMovie poster or series poster.IMDb, TMDB, TVDB bridge, anime IDsMain vertical artwork endpoint. Works for movies and series.
backdropMovie backdrop or series backdrop.IMDb, TMDB, TVDB bridge, anime IDsMain horizontal hero/background artwork endpoint.
logoTitle logo for movies or series.IMDb, TMDB, anime IDsReturns branded logo artwork when available.
thumbnailEpisode thumbnail / still frame.Episode-style IDs onlyUse episode IDs like tt0944947:1:1, tmdb:tv:1399:1:1, tvdb:121361:1:1, or realimdb:tt0944947:1:1.
ID formatKindBehavior
tt0133093IMDb titleMovie or series lookup.
tt0944947:1:1IMDb episodeSeries IMDb ID plus season and episode.
tmdb:603TMDB inferredWorks, but tmdb:movie:603 or tmdb:tv:1399 is preferred.
tmdb:tv:1399:1:1TMDB episodeExplicit TV episode lookup.
tvdb:121361:1:1TVDB aired-order episodeUseful for bridged episode numbering.
realimdb:tt0944947:1:1IMDb TV bridgeUse this when the addon really sources series or episode metadata from IMDb IDs and you want ERDB to keep that IMDb-oriented TV resolution.
kitsu:1Kitsu animeAnime-native mapping flow.
anilist:16498 / mal:5114 / anidb:69Anime-native IDsEnable anime-only provider paths.
PatternUse whenExample
/{token}/poster/{imdbId}.jpgMovie or series posters from IMDb IDs./Tk-abc123/poster/tt0133093.jpg
/{token}/backdrop/{imdbId}.jpgMovie or series backdrops from IMDb IDs./Tk-abc123/backdrop/tt0944947.jpg
/{token}/logo/{imdbId}.jpgMovie or series logos from IMDb IDs./Tk-abc123/logo/tt0944947.jpg
/{token}/thumbnail/{seriesImdbId}:{season}:{episode}.jpgEpisode thumbnails using IMDb episode addressing./Tk-abc123/thumbnail/tt0944947:1:1.jpg
/{token}/thumbnail/realimdb:{seriesImdbId}:{season}:{episode}.jpgEpisode thumbnails when the addon uses real IMDb TV metadata./Tk-abc123/thumbnail/realimdb:tt0944947:1:1.jpg
/{token}/thumbnail/tvdb:{tvdbId}:{season}:{episode}.jpgEpisode thumbnails when the addon uses TVDB numbering./Tk-abc123/thumbnail/tvdb:121361:1:1.jpg
/{token}/poster/tmdb:movie:{tmdbId}.jpgMovie posters when you only have a TMDB movie ID./Tk-abc123/poster/tmdb:movie:603.jpg
/{token}/backdrop/tmdb:tv:{tmdbId}.jpgSeries backdrops when you only have a TMDB TV ID./Tk-abc123/backdrop/tmdb:tv:1399.jpg
GET /Tk-abc123xyz/poster/tt0133093.jpg
GET /Tk-abc123xyz/backdrop/tt0944947.jpg
GET /Tk-abc123xyz/logo/tt0944947.jpg
GET /Tk-abc123xyz/thumbnail/realimdb:tt0944947:1:1.jpg
AI Integration Prompt

A ready-to-use prompt for wiring ERDB into another addon or media app using the documented config fields and routes.

This section should be usable as-is: copy the prompt, give it to an AI or developer, and implement the ERDB renderer from a single ERDB Token field.

It instructs the AI to default to https://easyratingsdb.com/{token}/{type}/{id}.jpg while keeping the ERDB base URL configurable.

Act as an expert media center addon developer. I want to implement ERDB into my addon to provide enhanced posters, backdrops, logos, and thumbnails with rating badges and stream quality overlays.

### --- CONFIG INPUT ---
Add a single text configuration field called "erdbToken".
The user will paste their ERDB token from the configurator after logging in.

Also add an optional text configuration field called "erdbBaseUrl".
Use this ERDB base URL by default:
https://easyratingsdb.com

The addon must allow advanced users to change the ERDB base URL, but it should default to `https://easyratingsdb.com`.
It must also normalize the base URL automatically so both `https://easyratingsdb.com` and `https://easyratingsdb.com/` work correctly.

Do NOT ask for TMDB keys, MDBList keys, layout fields, or rating provider lists inside the addon UI.
Those settings are already stored server-side behind the token.

### --- API MODEL ---
ERDB is now token-based for renderer URLs.

**Renderer endpoint:**
GET {erdbBaseUrl}/{erdbToken}/{type}/{id}.jpg

Path parameter | Values
--- | ---
erdbBaseUrl | Defaults to https://easyratingsdb.com but should be user-configurable
erdbToken | Tk-...
type | poster, backdrop, logo, thumbnail
id | IMDb (tt...), TMDB (tmdb:id, tmdb:movie:id, tmdb:tv:id), TVDB episode IDs, Kitsu, AniList, MAL

All visual settings, provider choices, API keys, language defaults, layouts, and badge options are resolved from the token on the server.

### --- COMMON URL PATTERNS ---
Use these patterns directly if you are not generating the integration from the ERDB workspace UI:

Pattern | Use case
--- | ---
{erdbBaseUrl}/{erdbToken}/poster/{imdbId}.jpg | Movie or series poster
{erdbBaseUrl}/{erdbToken}/backdrop/{imdbId}.jpg | Movie or series backdrop
{erdbBaseUrl}/{erdbToken}/logo/{imdbId}.jpg | Movie or series logo
{erdbBaseUrl}/{erdbToken}/thumbnail/{seriesImdbId}:{season}:{episode}.jpg | Episode thumbnail with IMDb episode addressing
{erdbBaseUrl}/{erdbToken}/thumbnail/realimdb:{seriesImdbId}:{season}:{episode}.jpg | Episode thumbnail when the addon uses real IMDb TV metadata
{erdbBaseUrl}/{erdbToken}/thumbnail/tvdb:{tvdbId}:{season}:{episode}.jpg | Episode thumbnail when the addon uses TVDB numbering
{erdbBaseUrl}/{erdbToken}/poster/tmdb:movie:{tmdbId}.jpg | Movie poster when only TMDB movie ID is available
{erdbBaseUrl}/{erdbToken}/backdrop/tmdb:tv:{tmdbId}.jpg | Series backdrop when only TMDB TV ID is available

### --- INTEGRATION REQUIREMENTS ---
1. Minimal UI: Use `erdbToken` and optionally `erdbBaseUrl` with default `https://easyratingsdb.com`.
2. Artwork Toggles: Provide optional toggles to enable or disable ERDB for posters, backdrops, logos, and thumbnails.
3. Smart Fallback: If ERDB is disabled for a type, or if the token is missing, keep the original artwork URL.
4. URL Building: Use `erdbBaseUrl` when provided, otherwise default to `https://easyratingsdb.com`, then append token, type, and media id.
   Normalize trailing slashes automatically before building renderer URLs.
5. Preserve Existing IDs: Do not rewrite IDs unless your addon already has a normalization layer.

### --- URL BUILD LOGIC ---
function buildErdbUrl({ erdbToken, erdbBaseUrl = 'https://easyratingsdb.com', type, id }) {
  if (!erdbToken || !type || !id || !erdbBaseUrl) {
    return null;
  }

  const baseUrl = erdbBaseUrl.replace(//+$/, '');
  return `${baseUrl}/${erdbToken}/${type}/${id}.jpg`;
}

### --- EXAMPLES ---
Movie poster:
```
https://easyratingsdb.com/Tk-abc123/poster/tt0133093.jpg
```

Series backdrop:
```
https://easyratingsdb.com/Tk-abc123/backdrop/tt0944947.jpg
```

Episode thumbnail:
```
https://easyratingsdb.com/Tk-abc123/thumbnail/tt0944947:1:1.jpg
```

If the addon uses real IMDb TV metadata for episodes and thumbnails, use the `realimdb:` prefix for the episode id.
Example:
```
https://easyratingsdb.com/Tk-abc123/thumbnail/realimdb:tt0944947:1:1.jpg
```

### --- PROXY NOTE ---
If you also integrate the ERDB proxy manifest, keep that as a separate feature.
For artwork rendering, the addon should not append TMDB, MDBList, SIMKL, style, or layout query parameters when a token is available.
Default the base URL to `https://easyratingsdb.com`, but keep it user-configurable for self-hosted ERDB instances.
Handle base URLs with or without a trailing slash automatically.
Helpers And Headers

Useful integration details that are easy to miss when wiring ERDB behind another proxy or CDN.

TopicBehavior
/api/versionReturns currentVersion, githubPackageVersion, and repoUrl.
/api/proxy-manifestReturns normalized catalog descriptors including key, extraKeys, supportsSearch, searchRequired, and discoverOnly.
Vary: AcceptImportant for caching poster/backdrop/thumbnail responses.
X-ERDB-CacheImage responses expose hit, miss, or shared.
Server-TimingImage responses expose auth, tmdb, mdb, stream, render, and total timing phases.
Proxy CORSProxy routes and /proxy/manifest.json send Access-Control-Allow-Origin: * and support OPTIONS.