Based on the python version of the sdk, i decided to make a lua version of them
GitHub - bulieme/lua-genai-framework: Roblox's unofficial Google API wrapper.
Im sorry if i didnt provide any examples. but you can go thru the code in vscode.
local HttpService = game:GetService("HttpService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Get your api key from Google's generative AI studio
local apiKey = HttpService:GetSecret("google") or "your-api-key-here"
local genAI = require(ReplicatedStorage.APIClient)
local cli = genAI.new(apiKey)
local model = "models/gemini-2.0-flash-exp"
-- Basic greeting
local resp = cli:GenerateContent(
"Hello! How are you today?",
model
)
print(resp.candidates[1]) -- Print the response