404 error using Lucee-Works in Postman

I am trying to set up a test to the API. I am on the free plan at the moment.

I using Lucee to do this, this is the RUL that I am using
https://generativelanguage.googleapis.com/v1/models/gemini-2.0-flash:generateContent?key=AIzaSyA00PHueErXGyr1Jky6RwGhyfjQwcQPWGE

However I’m getting a 404 error.

Edit: Since posting this I tried it in postman and it works, yet when I try outside of postman with the same URL and API credentials, I’m getting the 404

I wonder if scaffolding on HTTPServer2 in the headers is suggesting it’s being blocked for some reason

I have tried this in the UK and USA

Clearly I am missing something, can anybody help

Thanks

SOLUTION: The problem has been resolved. I was using Lucee for the API. It turns out that you need to add encodeurl=“false” to the CFHTTP parameters. This is not needed and in-fact fails the code in Adobe ColdFusion

1 Like