Docs / Integrations
Integrations
Connect your debrid stack + an optional stream proxy. Tokens are AES-256-GCM encrypted at rest.
Debrid backends
All five accept magnets. Premiumize, Real-Debrid, AllDebrid, and TorBox also accept hoster URLs.
Real-Debrid
Get your token at real-debrid.com/apitoken. Paste it into the Real-Debrid card at /dashboard/integrations. Toru's flow: POST /torrents/addMagnet → automatic selectFiles=all → poll /torrents/info/{id} → POST /unrestrict/link per file once status=downloaded.
AllDebrid
Get your API key at alldebrid.com/apikeys. Toru's flow: GET /v4/magnet/upload → poll /v4/magnet/status → GET /v4/link/unlock per file at statusCode=4. Magnet uploads require a premium account.
Premiumize
Get your API key from premiumize.me/account. Toru's flow: POST /api/transfer/create?src=… → poll /api/transfer/list → POST /api/folder/list?id=… once status=finished. Premiumize is the only backend whose transfer/create accepts both magnets and hoster URLs on the same endpoint.
TorBox
Get your token at torbox.app/settings. Magnets go through /torrents/createtorrent; hoster URLs go through /webdl/createwebdownload. /torrents/requestdl mints stream URLs per file.
Debrid-Link
Get your token at debrid-link.com/webapp/apikey. Cache-only — no cold-start; Toru fans Debrid-Link out alongside other backends in the cache check fast-path.
Torrin
If you self-host or have a lifetime account, paste your tr_ token. Optionally override base_url for self-hosted instances. Toru's flow: POST /api/jobs → poll /api/jobs/{id} → use the stream_urls[].signed_url values once status=complete.
Stream proxy (optional)
Wraps debrid stream URLs to bypass single-IP locks. Only one is active at a time.
MediaFlow
Self-hosted MediaFlow instance. Set the Proxy URL + API password (the MEDIAFLOW_PROXY_API_PASSWORD env var on your MediaFlow). Toru's wrapping shape: {base}/proxy/stream?d=<upstream>&api_password=<pw> for non-HLS, /proxy/hls/manifest.m3u8 for HLS.
StremThru proxy
StremThru's built-in proxy mode. Set the Proxy URL + Auth token (sent as X-StremThru-Authorization). Toru wraps as {base}/v0/proxy?u=<upstream>&authorization=Bearer <token>.
Auto-mint cascade order
When the user has no debrid connected (or none has the file cached), Toru falls
through to its own pool of credentials in the order configured by
TORU_COLD_START_ORDER (default: premiumize,torrin,torbox,realdebrid,alldebrid).
The first rung that accepts the magnet wins; subsequent rungs are skipped.
Resolver order at stream time
- Toru R2 cache hit → signed Cloudflare Worker URL (
source: "r2"). - External upstream (Torrin / Premiumize / TorBox) → URL stored on the job, optionally proxy-wrapped if the user opted in (
source: "external" | "mediaflow" | "stremthru-proxy"). - User's debrid via StremThru aggregator →
GenerateLinkForUser, optionally proxy-wrapped. - Direct upstream from debrid (
source: "upstream").
Bring-your-own architecture means Toru never sees a credential it didn't earn — your debrid quotas stay yours, the shared pool is for users who haven't connected anything yet.