Your API key: AIzaSyD6eIn0o6DH2yGD6GRqPzznN_D6rp4vpMI
Add this temporary endpoint to src/server/index.ts after the other routes:
// Temporary endpoint to set API key
router.post('/api/set-key', async (req, res) => {
await redis.set('config:gemini_api_key', 'AIzaSyD6eIn0o6DH2yGD6GRqPzznN_D6rp4vpMI');
res.json({ success: true, message: 'API key set' });
});Then:
- Run
npm run dev - Open the playtest URL
- In browser console:
fetch('/api/set-key', {method: 'POST'}).then(r => r.json()).then(console.log) - Remove the endpoint from code
- Upload:
npx devvit upload
Done. The key is now in Redis and will persist.