Hello, does anyone know how to do so that in the OpenIA API plugin we can ask the user to enter this personal OpenIA key to use the application? Because if I leave my key, anyone can spam, it consumes all my key credit. I searched a lot on the internet and didn’t find any solutions, but many other people are asking the same question without finding an answer.
Not sure this is possible but maybe you can make the OpenAI key a parameter in your API call?
Not sure how you’re building your app but if you would need your users to create an open AI account and go through the hassle of creating / generating keys, wouldn’t that be too much of a hassle for them?
Store the API key on a data type, and simply pass that API key to a dynamic header value
Bearer Current User's API Key.
The only thing is that if you also offer a non-self paid option, that you ensure you protect your own API key from being displayed in the client side.
This API call won’t work. You have headers in the body. There are dozens of threads about how to set up OpenAI API calls, you might want to start there and then work out the dynamic header.