API call to my tuned model

Hi there, I’m trying to get a Google Script to do an API call that sends a prompt to a tuned model. The script times out every time I run it.

Gemini tells me I need to “find the correct way to identify your tuned model in the REST API call.”

It tells me “copy its “name” value (it should look like tunedModels/... ). That’s the ID we need!”

Trouble is, I can’t find the model’s name anywhere, including when I check “Get Code” nor any articles that address this question.

Gemini says it’s not the display name either. Ideas?

Problem: How to call the tuned model in a Google Script?

User solved! Solution:

Click “Get Code.” There’s a subtle drop-down menu in the upper left corner of the pop-up window that I didn’t notice before. (Pretty sure default is “REST.”) I selected “Apps Script” and boom, the script for how to call the tuned model was right there.

Side note, I didn’t have to install a package because I’m not using Vertex, just Google AI Studio.

I hope that saves someone the days it took me to find this out.

-Z