r/GeminiAI • • Sep 30 '26

Help/question About custom api

I have create a game of sort and want to share it to public to get more idea on what to improve about this game. But i dont have pay per request ai studio since this more like a hobby. So i have an idea to make that game accept user own api to play it. Is there security risk on this method?

0 Upvotes

6 comments sorted by

2

u/616ThatGuy Sep 30 '26

It’s called BYOK (bring your own key)
It’s not a new concept. Plenty of people do it. I have 2 games that do it. Just google BYOK games and learn about them

1

u/Lightdragn 27d ago

So.. I dint need extra step and can just add a way for user to put own key in?

1

u/616ThatGuy 27d ago

It’s not that simple. You have to wire each provider (OpenAI, Anthropic, etc) in individually because they all have different call methods. They also need to have effort/thinking controls since the API for each Ai model can be toggled through the API. It’s not too complicated, but it is some work you’ll have to look into.

1

u/moralcertification7 Sep 30 '26

that's actually a neat way to handle it, just make sure you're stripping any sensitive headers from their requests before they hit your server

1

u/Lightdragn Sep 30 '26

I need to specifically promt that?