- curl -s -X POST \
- "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent" \
- -H "x-goog-api-key: $GEMINI_API_KEY" \
- -H "Content-Type: application/json" \
- -d '{
- "contents": [{
- "parts": [
- {"text": "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme"}
- ]
- }]
- }' \
- | grep -o '"data": "[^"]*"' \
- | cut -d'"' -f4 \
- | base64 --decode > gemini-native-image.png
|