For best results with your generated images:
If you're not sure what to generate, try the example prompts below!
Generating your image... This may take a moment
Click on an image to select it for download
If you prefer using the command line, you can generate images directly using cURL:
curl -s -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent?key=AIzaSyB2AaCk0OyNKAzCsgcbquX20OsGD2FcAdA" \
-H "Content-Type: application/json" \
-d '{
"contents": [{
"parts": [
{"text": "A 3D rendered image of a pig with wings and a top hat flying over a happy futuristic scifi city with lots of greenery"}
]
}],
"generationConfig":{"responseModalities":["Text","Image"]}
}' \
| grep -o '"data": "[^"]*"' \
| cut -d'"' -f4 \
| base64 --decode > gemini-image.png
Note: For Windows users, you may need to adjust the command or use Windows Subsystem for Linux (WSL).
# First set your API key as an environment variable
export GEMINI_API_KEY=AIzaSyB2AaCk0OyNKAzCsgcbquX20OsGD2FcAdA
# Then run the command
curl -s -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{
"parts": [
{"text": "Your prompt text here"}
]
}],
"generationConfig":{"responseModalities":["Text","Image"]}
}' \
| grep -o '"data": "[^"]*"' \
| cut -d'"' -f4 \
| base64 --decode > gemini-native-image.png
Browse and manage your previously generated images