Hi,
I’m trying to figure out the correct URL for REST call to retrieve model details using the Open AI compatibility layer.
According to the API reference - OpenAI compatibility | Gemini API | Google AI for Developers - it should be one of the likes.
GET https://generativelanguage.googleapis.com/v1beta/openai/models?model=gemini-1.5-flash
GET https://generativelanguage.googleapis.com/v1beta/openai/models/?model=gemini-1.5-flash
GET https://generativelanguage.googleapis.com/v1beta/openai/models/gemini-1.5-flash
However, none of them return a result other than HTTP 400 Bad Request
{
"error": {
"code": 400,
"message": "* GetModelRequest.name: unexpected model name format\n",
"status": "INVALID_ARGUMENT"
}
}
The corresponding REST call to list all models works as expected.
GET https://generativelanguage.googleapis.com/v1beta/openai/models
Any comment or hints are welcome. Thanks.