Connect your API keys
For OpenRouter testing, add OPENROUTER_API_KEY and OPENROUTER_MODELS to the same private local configuration. The model list accepts one to three approved Google Gemini model IDs, separated by commas in fallback order. Verify YouTube input compatibility before adding a model. OpenRouter execution is paused pending YouTube compatibility verification. Direct Gemini remains available.
Your keys stay in the local server configuration. Do not paste them into chat or browser inputs.
- Create a Gemini API key in Google AI Studio.
- In Google Cloud, enable YouTube Data API v3 and create an API key. Restrict that key to YouTube Data API v3. See the YouTube setup guide.
- Open the local web folder’s
.dev.varsfile. Fill inGEMINI_API_KEYandYOUTUBE_API_KEY. This file is excluded from Git. - Restart the local preview server, then reload the homepage. Connection labels indicate configuration presence, not verified access.
Individual video links already use public metadata and need neither key. Channels need the YouTube key; requested video analysis needs Gemini. Review provider quotas and billing before use.
YouTube URL analysis is a preview provider feature. Live model access and output still need validation with your keys. Provisional scores are available for local testing. Google sign-in and subscription import require the OAuth setup below. AI-generation detection is not enabled.
Google login and YouTube channel linking
- In your Google Cloud project, create an OAuth client of type Web application. Keep the consent audience in Testing and add your Google account as a test user.
- Register this exact redirect URI:
http://localhost:3000/api/auth/callback. - Save the client ID and secret in
.dev.varsasGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET. SetAPP_ORIGIN=http://localhost:3000. The local encryption key is generated separately and must be retained with backups. - Enable the scopes
openid,email,profile, andhttps://www.googleapis.com/auth/youtube.readonlyin the consent configuration. Sign-in requests only identity; Connect YouTube requests read-only YouTube access to import subscriptions or verify your own channel. - Restart the preview. Sign in, then choose Connect YouTube and approve access in Google. Import subscriptions, verify your own channel, or link any channel by
@handleto load recent videos.
OAuth testing grants may expire and require reconnecting. Public release needs a verified domain, HTTPS callback, applicable Google verification, and completion of the saved policy review.
Local privacy and data-use notice