
#10564
model_not_supported_error
The specified model is not found or is unsupported for the requested operation. Verify the model's availability and supported methods by using the ListModels feature.
This error has been identified and solved.
Reason
The 404 status error in this context indicates that the specified model, models/gemini-2.0-flash-thinking-exp-121
, is not available or supported for the generateContent
method under the API version v1beta
. This means the model either does not exist, has been moved, or is not compatible with the current API version and the requested method.
Solution
To fix the 404 error when trying to use the models/gemini-2.0-flash-thinking-exp-121
model with the Google API, you need to ensure the model is available and supported for your API version. Here are the steps to resolve the issue:
Check the available models by calling the
ListModels
method to see which models are supported for thegenerateContent
method.Verify that the API version
v1beta
supports the model you are trying to use.If the model is not listed, consider using a different model that is supported.
If necessary, switch to a different API version (e.g., from
v1beta
tov1
) if the model is available in that version.
By following these steps, you can identify and use a compatible model for your API requests.
Suggested Links
https://developers.google.com/drive/api/guides/handle-errors
https://discuss.ai.google.dev/t/how-to-use-gemini-flash-via-the-rest-curl-api/2457
https://community.particle.io/t/error-status-404-from-www-googleapis-com/43572
https://github.com/home-assistant/core/issues/105679
https://www.techtarget.com/whatis/definition/404-status-code
https://community.make.com/t/404-error-http-oauth-google-ads-api/42398
https://cloud.google.com/php/docs/reference/analytics-data/0.21.1/V1beta.Compatibility
https://ai.google.dev/gemini-api/docs/api-versions