Files
2026-05-11 20:14:50 -05:00

29 lines
1.5 KiB
Markdown

# Recap Relay
Operator-side credit-metered proxy for Recap clients. Fronts Google Gemini (and optionally a local Parakeet+Gemma setup) so Recap users on Core/Pro/Max tiers can summarize videos without bringing their own API keys.
## What it does
- Receives `POST /relay/transcribe` and `POST /relay/analyze` from Recap installs
- Validates `X-Recap-Install-Id` and optional `Authorization: Bearer LIC1-...` against a Keysat license server (cached online check)
- Tracks per-install credit balances in `/data/credits.json` with calendar-month rollover for paid tiers
- Routes to Gemini first; falls back to the operator's Parakeet+Gemma above the per-user-per-month Gemini cap
## Setup
After installing, set:
1. **Gemini API Key** — required, the relay's primary backend
2. **Keysat URL** — defaults to `https://keysat.xyz`; override to the internal hostname if Keysat is co-located on this Start9 server
3. **Admin Password** — gates the `/admin/*` dashboard
4. (Optional) **Parakeet URL** + **Gemma URL** — operator-hardware fallback for Pro/Max overflow
Then forward a public hostname (e.g. `relay.yourdomain.com`) to this service via StartTunnel, and point your Recap install's "Set Relay URL" action at that hostname.
## Tier defaults
- **Core** (unlicensed): 5 lifetime credits
- **Pro** (`relay_pro` entitlement): 50 monthly credits, max 25 via Gemini
- **Max** (`relay_max` entitlement): unlimited monthly, max 50 via Gemini
Adjust via the "Adjust Tier Quotas" action without redeploying.