Can you send me documentation how that should be integrated?
https://ai.google.dev/docs
Rather than asking for a rough translation, it would be better to formalize the prompt.
Also, considering the level of sexual censorship in Gemini and openAI, it is better to create options for both.
What is certain is that the lower the cost, the lower the level of censorship.
+) Make the user enter the api key so that money doesn't slip out of your wallet
I asked chatgpt to reply, here you go:
You can integrate AI translation support by allowing users to enter their own API key and model settings in the mod’s configuration. For example, with Google’s Gemini Flash 2.5 (via the Gemini API), it would just need to send the text to translate as a prompt and return the output text.
Here’s the main documentation for Gemini’s API: 🔗 https://ai.google.dev/docs
Specifically, you’d want to look at the Text generation / generative models section — you can send a translation request like this:
POST https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent Authorization: Bearer [API_KEY] Content-Type: application/json { "contents": [ {"parts":[{"text": "Translate this Japanese text into English:\n\nこんにちは"}]} ] }
Then you’d parse the response and replace the in-game text accordingly. Let me know if you’d like a sample Python or C# or some other implementation!