I used the following curl command:
curl --location --request POST 'https://generativelanguage.googleapis.com/v1beta/openai/images/generations' \
--header 'Authorization: Bearer $api_key' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: generativelanguage.googleapis.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"model": "gemini-3-pro-image-preview",
"prompt": "a portrait of a sheepadoodle wearing a cape",
"response_format": "b64_json",
"n": 1,
"size": "1376x768"
}'
Received the following response:
{
"error": {
"code": 404,
"message": "models/gemini-3-pro-image-preview is not found for API version v1main, or is not supported for predict. Call ListModels to see the list of available models and their supported methods.",
"status": "NOT_FOUND"
}
}
I accessed the model list through /v1beta/openai/models and found gemini-3-pro-image-preview included. I also tried other models like gemini-2.5-flash-image-preview, but encountered the same error. Could you please explain what might be causing this issue?