curl --location --request POST 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent?key=GEMINI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [{
"parts":[
{"text": "'\''Hi, This is a picture of me. Can you add a llama next to me"},
{
"inline_data": {
"mime_type":"image/jpeg",
"data": "$IMG_BASE64"
}
}
]
}],
"generationConfig": {"responseModalities": ["TEXT", "IMAGE"]}
}'
{}