Minimal, provider-agnostic web app for AI video generation (OpenAI Sora 2 first).
npm install
npm run dev
Create a .env with your key (local dev only):
VITE_OPENAI_API_KEY=sk-...
Security note: never set VITE_OPENAI_API_KEY in production builds. Browser-side keys can leak.
Start the proxy:
cd proxy
node server.js
Then set:
VITE_PROXY_BASE_URL=http://localhost:8787
VITE_PROXY_TOKEN=optional-shared-secret
When the proxy is enabled, the app can generate without a browser key.
Build and deploy static assets with Wrangler:
npm run build
npm run deploy
This uses wrangler.jsonc to deploy the dist directory.
- Browser keys are inherently leakable (XSS, extensions, shared devices).
- For production, use the proxy/worker and keep keys server-side.
- Update
public/_headerswith your production proxy domain inconnect-src.