Just fyi, Google team, there are mistakes in your Rest documentation, with property names mistakenly written in snake case instead of pascal case.
For ex, inline_data should be inlineData and mime_type should be mimeType.
From the docs:
curl -s -X POST \
“https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent” \
-H “x-goog-api-key: $GEMINI_API_KEY” \
-H ‘Content-Type: application/json’ \
-d “{
\“contents\”: [{
\“parts\”:[
{\“text\”: \”'Create a picture of my cat eating a nano-banana in a fancy restaurant under the Gemini constellation\“},
{
\“inline_data\”: {
\“mime_type\”:\“image/jpeg\”,
\“data\”: \”<BASE64_IMAGE_DATA>\"
}
}
]
}]
}"