I am experimenting with AI in a plugin. Not AI to build the plugin, but AI being used by the plugin.
This can be used for AI opponents or AI generated dialogue, where the player can have an actual conversation with the NPC's. All lore friendly to your own game.
However, to integrate ChatGTP or Gemini into my plugin, I need an API key. I got an API key like that and it works flawlessly.
The problem is: I am not supposed to share this AIP key, because it might be abused.
This is not a problem for sharing the plugin... Each dev should use their own API key, problem solved. However, I do need to include the API key for players. And those devs need to include their API key for their players. And this should somehow be done in a way that the players (or people who download AI projects for other reasons, like to steal API keys) can not in any way see this API key.
The only thing I can think of, is to encrypt the plugin, but is that even possible? And if so, how do I do this?