Image Generation
Generate images from natural language prompts.
Request
POST /images/generations
Request Body
{
"model": "gemini-3-pro-image-preview",
"prompt": "A cartoon-style kiwi fruit with a clean background"
}
Response
Response Example
{
"created": 1810100000,
"data": [
{
"b64_json": "hEUgAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGP4//8/IwJDAfwJ/l9+lwAAAABJRU5ErkJggg==..."
}
]
}
Best Practices
- Carefully design prompts with the desired style and level of detail
- Choose appropriate image sizes and formats based on your use case
- Perform safety and compliance review on generated content where necessary