diff --git a/lua/gemini/api.lua b/lua/gemini/api.lua index f79c0da..dc3a386 100644 --- a/lua/gemini/api.lua +++ b/lua/gemini/api.lua @@ -46,9 +46,10 @@ local function make_request(prompt) -- Escape the payload for shell payload = vim.fn.shellescape(payload) + -- Updated API endpoint URL local command = string.format( "curl -s -X POST " - .. "'https://generative-ai.googleapis.com/v1/models/%s:generateContent?key=%s' " + .. "'https://generativelanguage.googleapis.com/v1/models/%s:generateContent?key=%s' " .. "-H 'Content-Type: application/json' " .. "-d %s", model,