local HttpService = game.HttpService
local apiKey = HttpService:GetSecret("google")
local baseUrl = "https://generativelanguage.googleapis.com/v1beta/models?key="
local urlWithApi = apiKey:AddPrefix(baseUrl)
print(urlWithApi)
HttpService:GetAsync(urlWithApi)
Edit: I have READ the entire documentation, and STILL have the same problem. PLEASE do not send me the Secrets Documentation, as a solution to this problem.
do you know how Secrets in HttpService works?
Well… if i tried that, that obviously fails…
because its a Secrets Object, and HttpService:JSONDecode is obviously for strings…
Anyways… As you wish:
local HttpService = game.HttpService
local apiKey = HttpService:GetSecret("google")
local baseUrl = "https://generativelanguage.googleapis.com/v1beta/models?key="
local urlWithApi = apiKey:AddPrefix(baseUrl)
urlWithApi = HttpService:JSONDecode(urlWithApi)
local res = HttpService:GetAsync(urlWithApi)
print(res)