Cloudflare Worker app for OpenAI API key protection
Top 88.0% on sourcepulse
This project demonstrates secure client-side tool calling with OpenAI's API by using Cloudflare Workers to proxy API requests and protect the OpenAI API key. It's targeted at developers looking to build interactive applications that leverage AI capabilities without exposing sensitive credentials directly in the frontend.
How It Works
The application utilizes Cloudflare Workers as a backend to handle requests to the OpenAI Realtime API. A frontend JavaScript application communicates with the Worker, which then securely interacts with OpenAI. This architecture shields the OpenAI API key by storing it as an environment secret within the Cloudflare Worker environment, preventing direct exposure in the browser.
Quick Start & Requirements
npm install
npm run dev
npx wrangler secret put OPENAI_API_API_KEY
and npm run deploy
Highlighted Details
Maintenance & Community
No specific community channels or maintenance details are provided in the README.
Licensing & Compatibility
The license is not specified in the README.
Limitations & Caveats
The project is presented as a demonstration, and its suitability for production environments without further hardening is not detailed. The reverse-engineered robot code is a separate component and may have its own dependencies or limitations.
5 months ago
1+ week