-1: Total novice here.
0: I’m trying to create a Python program to load and describe undocumented code. I asked Gemini to provide a program to after some early failure with the wrong URL that we (Gemini and me) determined that is was giving me the wrong URL. We changed to aiplatform . googleapis . com, but we get 404 errors. (hacked address to allow post)
1: Here is a curl example that is failing:
curl -X POST -H "Authorization: Bearer ${GOOGLE_API_KEY}" -H "Content-Type: application/json" -d '{ "prompt": { "text": "Hello, Gemini!"} }' "https://aiplatform.googleapis.com/v1/projects/eorojas/locations/us-central1/models/gemini-pro:generateText"
I had to figure out how to enable accessing the aiplatform and curl -v shows that I access it.
I’ve tried my project name (eorojas) and the project Id, and different locations.
e
.g. * Connected to aiplatform.googleapis.com (142.251.46.202) port 443 (#0) …
Gemini keeps giving me the same advice, “something is wrong”
I enabled the API
gcloud services list --enabled --project eorojas
NAME TITLE
aiplatform.googleapis.com Vertex AI API
I enabled billing, though I’m not sure this was necessary.
I’m an experienced programmer, but I have no experience with debugging this API stuff, but I have accessed HTTP APIs in other domains.
If someone can point me to the error in my ways, or to the right piece of documentation …