Error 404 using http post C#

Hi Everyone,

I’m kind of new here and though I have tried to find a similar issue that I am experiencing, i have not found it yet and I am hoping the developers here can help;

I have trained (fine tuned a model (gemini flash 1.5)) in google ai studio; I have created the access to the api in AI studio and call the api from a httpClient post call in my .net 8 service application;

Now my model id is: multiinfoprompt-vglt2cg95sh9 and my full url should be (as far as I can determine (and the “show code” > curl says the same)) https://generativelanguage.googleapis.com/v1beta2/models/tunedModels/multiinfoprompt-vglt2cg95sh9:generateContent?key=%API_KEY%"

however → I receive a 404 not found from the endpoint, and this I did not expect; aso the CURL code from AI studio returns a 404, but when I create a Py script and run that, I do receive an expected answer back, so I would think the model is availlable for api use and my api key should be fine as the PY script does work.

Any ideas, i’m gratefull for any insights you can offer?

(by the way: the normal gemini_flash endpoint i can reach)

In meanwhile i have solved this issue, if anyone in the near future is also experiencing this issue:

image

though the example CURL code clearly states …/models/tunedModels/… etc, this is very incorrect;
it should be … https://generativelanguage.googleapis.com/v1beta/tunedModels/, this will result in a 200.

don’t know why, but the code example looks to be incorrect;

1 Like