Is there an open-source proxy to get requests and relay to openai?

I am making an iOS app that makes use of chatGPT.

To protect my openai api-key, I don’t want the app to send requests directly to openAI (because the requests that contain the api-key can be intercepted by bad actors).

Is there an open-source proxy code that I can use on my server side (self-hosted) for this purpose. I would like streaming support as well, if possible.

I suppose if you only make the requests on the server-side with an OpenAI key as an environment variable, your OpenAI key will be as secure as any other sercret environment variable on your server. Making an OpenAI proxy to handle user usage and cost limits based on that one key would be another issue, and an entirely valid concern.

We are building an LLM-specific gateway with a user auth flow to generate API keys for each user and then use those to monitor and control costs and access https://llmetrics.app

I have DMed you with more info :slight_smile: