Providers
How Kunai chooses among third-party adapters, retries, recovers, and falls back when one fails, plus the live status table for every registered provider.
Kunai resolves playable streams through direct HTTP provider adapters. You pick a title; Kunai asks registered providers for stream inventory; playback goes to mpv.
This page explains user-visible provider behavior. It does not document scraper internals, crypto constants, or site-specific extraction logic.
Third-party providers
/recover, then /fallback (or Shift+F during playback), then /diagnostics; each command maps to a distinct recovery strategy.Active providers
Live registry synced from the CLI when docs are generated. Click a provider name to jump to its notes below.
| Provider | Domain | Media | Description |
|---|---|---|---|
| Videasy videasy | videasy.to | movie, series | Registered movies/series adapter; source and subtitle inventory vary by titleKnown limitations (10)
|
| VidLink vidlink | vidlink.pro | movie, series | Movies and series with multi-language subtitlesKnown limitations (3)
|
| VidRock vidrock | vidrock.net | movie, series | Backup source for movies and series with direct video filesKnown limitations (8)
|
| Rivestream rivestream | rivestream.app | movie, series | Mirror-aggregator for movies/series; coverage varies by titleKnown limitations (1)
|
| Movy movy | movy.sx | movie, series | Movies and series via a multi-lane source aggregatorKnown limitations (4)
|
| AllManga allanime | mkissa.to | anime | Anime episodes in sub and dub — the ani-cli parity sourceKnown limitations (4)
|
| HiAnime hianime | hianime.at | anime | Anime episodes in sub and dub via HiAnime (ani-cli parity lane)Known limitations (6)
|
| Miruro miruro | www.miruro.bz | anime | Primary anime source — sub and dub from many backends behind one AniList-keyed pipeKnown limitations (14)
|
| AnimeGG animegg | www.animegg.org | anime | Independent anime source — direct MP4s, sub and dub, no AniList dependencyKnown limitations (9)
|
| KickAssAnime kickassanime | kaa.lt | anime | Independent anime source — HLS with separate subtitle tracks, sub and dubKnown limitations (9)
|
| YouTube youtube | youtube.com | video | YouTube via Invidious search and yt-dlp playbackKnown limitations (1)
|
Mode defaults at a glance:
- Movies / series start with VidLink, then try Rivestream, VidRock, Movy, and Videasy.
- Anime starts with HiAnime, then tries AnimeGG, KickAssAnime, Miruro, and AllManga. AniDB has been retired.
- YouTube has a dedicated video mode with Invidious search and yt-dlp playback.
Legacy id vidking maps to Videasy in config and cache. Cineby is research-only, not registered for production resolve.
Videasy
Adapter role: registered movies/series adapter, last in the automatic lane. The operator announced a shutdown, and the latest sweep could not resolve a stream. A separate catalog mirror can still supply title metadata.
Config id: videasy (legacy alias vidking still accepted).
Caveats: choose another provider if Videasy is unavailable.
VidLink
Adapter role: registered default for movies and series; also carries the best subtitle inventory of the lane.
Config id: vidlink.
Caveats: subtitle language coverage is not guaranteed for every title.
Rivestream
Adapter role: mirror-aggregator for movies/series. Second in the automatic series lane after VidLink.
Config id: rivestream.
Caveats: coverage varies by title and mirrors churn; when a mirror refuses, fallback to the next provider is expected behavior, not a malfunction.
VidRock
Adapter role: third in the movies/series order. Offers multiple audio and quality options where the source provides them.
Config id: vidrock.
Caveats: the stream API has refused some networks with HTTP 403. Availability can vary by network and title.
KickAssAnime
Adapter role: third in the anime order. It matches titles against its own catalogue by name and year.
Config id: kickassanime.
Caveats: the provider denied access from the sweep runner. If it accepts your network, you can
select it in anime mode. Use /tracks to switch available subtitle languages. When an episode
has no English audio, Kunai reports the fallback to subbed playback in the trace.
AnimeGG
Adapter role: first anime fallback after HiAnime. AnimeGG matches titles against its own catalogue and serves sub and dub from separate episode tabs.
Config id: animegg.
Sweep result: on November 23, 2026, AnimeGG was the only anime fallback to return streams. It took 21.9 seconds, exceeding the default 12-second attempt budget. Its independent catalogue and that result are why it stays first among the fallbacks.
Caveats: anime mode must be active. Subtitles are burned into the picture on subbed episodes, so there is no separate subtitle track to switch. Not every show has a dub, and Kunai says so in the playback trace when it falls back to the subbed version. Its catalogue is smaller than Miruro's, and when more than one of its shows could be the one you picked, it steps aside rather than guess.
Movy
Adapter role: fourth in the movies/series order. Each upstream lane is a separate source that
you can select with /source.
Config id: movy.
Caveats: the website can load while the stream API denies access. The sweep observed HTTP 403 before any source could be fetched.
AllManga
Adapter role: last in the default anime order.
Config id: allanime.
Caveats: the episode list may load while playback fails. The upstream retired the build Kunai uses to authorize stream requests. Choose another anime provider if AllManga reports that its stream authorization is out of date.
HiAnime
Adapter role: the default anime provider, first in the order. HiAnime has its own catalogue and search. It resolves the ZokoAnime server for each episode, the same one ani-cli uses, and hands the HLS ladder and subtitle tracks to the player.
Config id: hianime.
Caveats: anime mode must be active. Sub and dub are separate episode fetches; a show without
English audio plays subbed and says so in the playback trace. Each season is its own entry in
HiAnime's catalogue, so a season jump is a new title rather than a deeper episode number. Only the
ZokoAnime server is resolved; other servers the catalogue lists are observed but unsupported. On
networks where Kunai's own HTTP client meets Cloudflare, it falls back to curl.
Miruro
Adapter role: fourth in the anime order. Miruro can try multiple streaming backends for an AniList title and also provides its own anime search.
Config id: miruro.
Caveats: Miruro's API refused the sweep runner on multiple mirrors. If the provider accepts your network or your existing metadata relay, Miruro is still selectable. Subtitle availability depends on the server and some subtitles are burned into the video.
YouTube
Adapter role: YouTube mode: Invidious search, yt-dlp stream handoff to mpv. This is not a TMDB movie/series adapter.
Config id: youtube. Switch with /youtube-mode or Tab to cycle catalog mode.
Caveats: requires network; yt-dlp must be available for resolve. Kunai does not bypass DRM or circumvent YouTube access controls. It only forwards optional cookies you already have to yt-dlp/mpv.
Search can return videos, Shorts, playlists, and channels. Results retain
their shape and the shell labels it before playback, so a Short is not mistaken
for a collection. Playlists and channels are catalog collections
(youtube-playlist:… / channel ids): pick a video inside them to play. Live
and upcoming entries carry their own status badge (● LIVE for an active
broadcast, Upcoming for a premiere that has not started, Was Live for an
archived stream). Backends that omit a shape or status signal are labelled
conservatively. Use type:short in YouTube search to narrow to Shorts; that query
runs YouTube's own Shorts search through yt-dlp rather than filtering ordinary
results, which never include Shorts. If it finds none, it says so instead of
falling back to regular videos.
Live URLs (youtube.com/live/…) resolve as videos. Kunai passes
--no-live-from-start to yt-dlp so a live handoff joins at the live edge, and it
will not offer to resume a broadcast from a saved position; a live stream has no
fixed position to return to. Opening a premiere that has not started tells you so
instead of handing mpv a stream that cannot play yet.
SponsorBlock is off unless you set youtubeMetadata.sponsorblockRemove in Settings › Sources › YouTube (for example sponsor,intro). That value is forwarded to yt-dlp / mpv. There is no shipped default category list.
Forwarding SponsorBlock options does not establish that segment removal works during streaming. Kunai makes no ad-free or Premium-equivalent playback promise.
Quality choices preserve yt-dlp's discovered format IDs. Codec, frame rate and average bitrate appear when reported; two rows at the same resolution can be different formats. Bitrate is reported metadata, not measured connection speed. Primary/fallback connections are extractor methods for the same video. Picking a quality keeps the current connection when it has that format. Exact video formats do not silently fall back to a different video format; availability is still checked by mpv. Video-only formats use yt-dlp's best audio choice.
Cookie safety (age-restricted / members)
Optional keys under youtubeMetadata in ~/.config/kunai/config.json (also editable from /settings → Sources → YouTube):
| Key | Safe usage |
|---|---|
cookiesFromBrowser | Browser name for yt-dlp --cookies-from-browser (for example chrome, firefox). Reads cookies from that browser profile on your machine. |
cookiesFile | Absolute path to a Netscape cookie file passed as yt-dlp --cookies. Relative paths are easy to mis-resolve; use an absolute path. |
poToken | Proof of Origin token in yt-dlp's CLIENT.CONTEXT+TOKEN form (for example visionos.gvs+...). A bare token is scoped to whichever client Kunai is asking for. Used for playback and downloads alike. |
Safety rules:
- Never paste cookie file contents into issues, chats, or support bundles.
- Prefer
cookiesFromBrowserwhen it works; keepcookiesFileprivate on disk. - Before sharing
/export-diagnosticsor/report-issueoutput, open the redacted bundle locally and confirm cookies/tokens/paths stay redacted. - There is no shipped default cookie file and no claim of DRM bypass.
How resolution works (user view)
You select a title and episode
Kunai builds a resolve request from your mode, language profiles, and any per-title provider preference.
Kunai tries the default provider first
Your provider or animeProvider config key sets the session default. Startup priority policy may influence first pick.
Falling back to another provider can change the available source inventory (quality ladder, sub/dub mix). Title and catalog identity never silently cross to another catalog: an advanced search with no compatible catalog is reported as unsupported rather than quietly answered by TMDB.
Provider-local cycling
Within one provider, Kunai may try multiple sources, servers, or variants before giving up. Diagnostics shows this as retry progress, not necessarily an error.
Global fallback
If the active provider is exhausted, skipped, or unhealthy for this request, Kunai moves to the next id in your priority list.
Stream handoff
The winning stream becomes mpv input with required headers and subtitle attachments. Inventory is cached for faster re-selection.
More detail on pickers: Media selection.
Fallback chain configuration
Configure order in /settings or ~/.config/kunai/config.json:
{
"provider": "vidlink",
"providerPriority": ["rivestream", "vidrock", "movy", "videasy"],
"animeProvider": "hianime",
"animeProviderPriority": ["animegg", "kickassanime", "miruro", "allanime"]
}The anime client shows as AllManga in the UI; the config id remains allanime. Every
registered anime provider is tried automatically when the selected one fails. The priority list
sets the order, it does not decide who is included.
On the first launch after updating, Kunai upgrades a saved anime order if the provider and priority list exactly match the defaults for that configuration's revision. Custom orders are preserved. A saved AniDB selection maps to HiAnime, and retired AniDB entries are removed.
Rules:
- Empty priority arrays use registry default order.
- Unknown ids in the list are ignored.
- Providers not listed remain available after configured entries.
- Per-title overrides in
titleProviderPreferenceswin over history provider on resume.
See Customization.
Retry vs recover vs fallback
Kunai uses three distinct user-facing actions. They are not interchangeable.
| Action | Keys / command | What happens |
|---|---|---|
| Recover | r, /recover | Refresh current playback intent on the active provider: new resolve, cache revalidation, or mpv reload |
| Retry (automatic) | none | Provider-local cycling through sources/variants before global fallback; shown in diagnostics timeline |
| Fallback provider | ⇧F, /fallback | Stop active provider; global engine picks next compatible provider |
| Recompute | /recompute | Bypass stream cache and provider health memory for current episode |
Recover before fallback
When a stream dies mid-playback, try recover first. Fallback switches providers and may change source quality or subtitles.
Recovery mode setting
recoveryMode in config changes default aggressiveness:
| Mode | Behavior |
|---|---|
guided (default) | Explain failures; suggest recover then fallback |
fallback-first | Prefer moving to next provider sooner after classified failures |
manual | Minimal automatic fallback; user drives /recover and /fallback |
Provider health and cache
Kunai remembers provider health locally to avoid hammering known-bad paths. Health updates come from resolve outcomes, not from your home network being offline.
- Cache hit: reuse recent stream inventory when still valid.
- Stale cache: revalidate before play when health checks fail.
- Cold resolve: full provider lookup when no usable cache exists.
/diagnostics shows cache provenance and health deltas without exposing signed URLs.
Network-unavailable failures stop cycling early. Kunai does not mark unrelated providers as unhealthy because your Wi-Fi dropped.
Domain overrides
Provider domains for the media (movie/TV and anime) providers are compiled in; changing a media-provider domain requires a code change and rebuild, not a config file. Exception: YouTube metadata endpoints are configurable via youtubeMetadata.instanceUrl and youtubeMetadata.pipedApiUrl in settings or config.json, no rebuild needed. To use a different network path for metadata calls, set providerRelay.baseUrl in /settings or config.json to your own relay; see Provider geo relay.
Provider geo relay
Some provider metadata APIs are geo-blocked from some countries while the final video CDN still works globally. Kunai supports an optional user-owned provider relay for those metadata calls.
What it does:
- Routes provider API/search/source JSON through your relay when
providerRelay.baseUrlis set. - Keeps playback direct: mpv receives the final stream URL and fetches it from your network.
- Uses provider manifest allowlists, so it is not an arbitrary URL proxy.
What it does not do:
- Kunai does not operate a public relay for you.
- Kunai does not host or proxy video. There is no video-relay configuration; stream URLs always stay direct.
- The relay does not bypass provider login or DRM.
Installed binaries: leave providerRelay.baseUrl empty (the default) for direct fetches. To use a relay you operate, set baseUrl in /settings or config.json to your origin; Kunai never ships a public relay URL. An internet relay requires a matching bearer token; only a relay bound to numeric loopback may run without one. fallbackToDirect: true degrades to direct fetches after relay network or authorization-policy failures where the provider is not geo-blocked. Env overrides: KUNAI_RELAY_BASE_URL, KUNAI_RELAY_TOKEN.
Deploying your own relay
A relay requires a network from which the provider accepts metadata requests. If the provider
asks for a CAPTCHA or denies access, choose another provider. Both deployment options use a
source checkout because the relay imports the @kunai/relay and @kunai/providers workspace packages.
On Vercel. Full steps and the reason handler bundling is required are in apps/relay-server/README.md:
cd apps/relay-server
vercel env add RELAY_TOKEN # a random secret; the relay refuses internet traffic without one
vercel build --prod --yes
vercel deploy --prebuilt --prodLocally, for development or a home server on an ungated network:
bun run dev:relay # listens on http://127.0.0.1:8787Pointing Kunai at your relay
Set the origin and token in any one of three places (/settings → Sources → Provider relay, config.json, or the environment) and keep fallbackToDirect on so Kunai degrades to direct fetches when the relay is unreachable and the provider is not geo-blocked.
{
"providerRelay": {
"baseUrl": "https://your-relay.vercel.app",
"token": "your-secret-token",
"fallbackToDirect": true
}
}Environment overrides: KUNAI_RELAY_BASE_URL, KUNAI_RELAY_TOKEN. Leave the token blank only for a relay bound to numeric loopback; any internet origin needs one.
Source-checkout smoke and verification steps: Debugging workflow and apps/relay-server/README.md.
Stremio addons
Stremio addons are experimental and off by default. Kunai ships none. Enable them in Settings → Sources → Experimental: Stremio addons or run kunai addons enable.
Stremio addons are third-party servers you choose. Kunai checks each addon stream, but mpv opens its own connection. A hostile addon server could answer mpv differently and reach a device on your network. Older FFmpeg versions may follow redirects. Downloads and Android handoff do not use addons.
Only install addons you trust.
kunai addons enable
kunai addons add https://example-addon.com/manifest.json
kunai addons list
kunai addons check
kunai addons disable
kunai addons remove 1kunai addons enable asks you to confirm when standard input, output, and error are attached to a terminal. An empty answer or closed input declines. Kunai shows the warning the first time and remembers your acknowledgement across disable and re-enable. In a script or CI job, run kunai addons enable --accept-risk to accept without a prompt. An interactive add can ask you to enable addons in the same step. A non-interactive add while addons are off refuses before contacting the addon: run kunai addons enable first.
If the URL carries an account token, prefer --stdin so it stays out of your
shell's process list and history. Kunai reads one line of standard input;
paste it there, or redirect a file:
kunai addons add --stdin < addon-url.txtYou can also add and remove addons in Settings → Sources → Stremio addons, and turn the whole feature on or off under Experimental: Stremio addons there.
- On and off.
kunai addons disablestops addon use at the next resolve, including in a session that is already running, and keeps your installed list and preferences.kunai addons enableturns them back on; addons that were already loaded can answer again at the next resolve. A Kunai session that started while addons were off never loaded them, so restart that session to use addons, and restart any session to pick up newly installed addons.kunai addons listandkunai addons checkstill work while off: they report the disabled state, andcheckdoes not contact the addon. - What to paste. The addon's
https://…/manifest.jsonaddress. Astremio://…/manifest.jsonlink is the same address and works too. If the addon has a configure page, finish that first and paste the URL it gives you. - Where it sits. A new addon goes after your other movie and series providers, so it is asked only when the ones before it have nothing. Move it up in Settings → Sources → Provider priority, or pause it with its provider switch.
- When it applies. Adding takes effect the next time Kunai starts. Removing inside the app applies on the next title;
kunai addons removeasks already-running sessions to restart first. Remove deletes the entry; disable keeps it and stops addon use instead. - What plays. Only direct video files: MP4-family and WebM/Matroska. Kunai's probe refuses playlists (HLS, DASH) and redirects, and Kunai re-checks the link with a small ranged request immediately before handing it to
mpv; that check confirms the file answers, not that it plays in mpv end to end. Kunai has no torrent client, so torrent-only results are skipped, and Kunai tells you when that is all an addon offered. Subtitles an addon offers get the same treatment: they are downloaded through a guarded, size-limited request and must prove they are really WebVTT, SRT, or ASS text (anything else is skipped), and mpv only ever sees the local copy, never the remote URL. - Desktop mpv only. Addon streams do not support Android player handoff or downloads: no addon candidate participates in a download, the cached-stream and enqueue guards stay in place, and a playback fallback that lands on an addon is refused there too. To download the title, choose a built-in provider.
- Which titles. Movies and series that have an IMDb id. Addons are not used in anime mode.
Treat the URL like a password. A configured addon keeps your settings, and sometimes an account token, in its URL. Kunai shows a configured addon only as addon @ host, never the full URL or its reported name and version, and keeps it out of logs and diagnostics. It is stored in your config.json.
An addon is a third-party server you chose. Kunai sends it the IMDb id of what you are about to watch. It accepts only JSON from it, runs nothing it sends, and checks that a link answers before handing it to mpv; that check confirms the link responds, not that it plays in mpv end to end. mpv opens a separate connection and looks up the host again, so this is not a network sandbox. mpv builds linked against older FFmpeg may still follow an HTTP redirect during playback, even though Kunai's probe refuses it.
When providers fail (expected behavior)
Provider catalogs drift. Failure is operational, not exceptional.
- Diagnostics records failure class and stage.
- Kunai attempts provider-local retries when inventory exists.
- Global fallback runs when configured and appropriate.
- You stay in the shell with context intact; search, history, and offline library remain available.
If all providers fail, Kunai explains why in diagnostics and the shell footer. Collect evidence with /export-diagnostics; see Troubleshooting.
What Kunai does not do with providers
- No browser/Playwright scraping in the active beta runtime
- No Kunai-hosted proxy or stream relay; the optional provider geo relay is user-owned and metadata-only by default
- No guarantee of subtitle language, quality tier, or dub availability
- No silent provider switching without user action (except configured automatic fallback within policy)
- No bundled Stremio addons and no torrent playback; an addon you add yourself can only supply direct video links
See Supported and Unsupported.
Picking a provider manually
Before playback starts:
- Provider picker in the starting-episode flow when multiple providers are compatible.
/sourceor/tracksduring playback when inventory supports switching without full re-resolve.
After explicit pick, Kunai stores per-title preference for future resume.
Downloads and Offline
Queue Kunai downloads, play local files, manage the offline library, clean up finished jobs, and diagnose a download that stalled or failed to resume.
Provider status
Daily live check on every registered provider, covering upstream reachability, resolve health, lane counts, and known gate reasons.