Skip to content

DreamHubCo/openai-proxy

Repository files navigation

openai-proxy

Deploy a proxy in front of OpenAI API to allow your frontend to make requests without exposing your API key while enforcing rate limiting. Designed for speed and ease of deployment.

Features

  • JWT authentication
  • Chat streaming
  • Per user rate limiting

Run the example

  1. Start the proxy
    export OPENAI_API_KEY=sk-XXX
    cargo run
  2. Start the example
    cd examples/openai-proxy-js-example
    npm i
    npm run dev
    open localhost:3000

About

Allow your frontend to send requests to OpenAI without exposing your API key and enforcing rate limits per user.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages