Gemini API/Lucee give 404 but works in Postman

Well, the CFTRY and CFFIDDLE helped me find the issue.

CFTRY “Current engine Lucee 5”. It failed same issue, 404 error. I changed it to use CF2023, and it worked.
CFFIDDLE - Tested on CF2021 and 2025, it worked


I then added encodeurl=“false” to the CFHTTP as suggested by @Zackster and … it worked!!! I’d spent most of the day trying to fix this :(. I had a feeling it was something reasonable simple.

I tried cftry on coldfusion with the encodeurl and the code threw an error, so I guess this format is for Lucee, which is fine for me.

THANK YOU both and THANK YOU @Zackster for the solution! I can now switch to use Gemini :slight_smile:

3 Likes