Exploring Gemini 2.0 Flash for Native Image Creation – Google Developers Blog
In December, we first introduced native image output in Gemini 2.0 Flash to trusted testers. Today, we’re making it available for developer experimentation across all regions currently supported by Google AI Studio. You can test this new capability using an experimental version of Gemini 2.0 Flash (gemini-2.0-flash-exp) in Google AI Studio and via the Gemini API. Gemini 2.0 Flash combines multimodal input, enhanced reasoning, and natural language understanding to create images. Here are some examples of where 2.0 Flash’s multimodal outputs excel:
-
Text and images together
Use Gemini 2.0 Flash to tell a story, and it will illustrate it with pictures while maintaining character and setting consistency throughout. Provide feedback, and the model will adjust the story or alter the style of its drawings.Story and illustration generation in Google AI Studio -
Conversational image editing
Gemini 2.0 Flash enables you to edit images through multiple rounds of natural language dialogue, making it ideal for refining the perfect image or exploring different ideas collaboratively.Multi-turn conversation image editing maintaining context throughout in Google AI Studio -
World understanding
Unlike many other image generation models, Gemini 2.0 Flash leverages world knowledge and enhanced reasoning to create accurate images. This feature makes it suitable for producing detailed and realistic imagery, such as illustrating a recipe. While it aims for accuracy, it’s important to note that its knowledge is broad and general rather than absolute or complete.Interleaved text and image output for a recipe in Google AI Studio -
Text rendering
Many image generation models struggle with accurately rendering long text sequences, leading to poorly formatted or illegible characters. Internal benchmarks indicate that 2.0 Flash has superior rendering capabilities compared to other models, making it excellent for creating advertisements, social posts, or even invitations.Image outputs with long text rendering in Google AI Studio
Get started with Gemini 2.0 Flash via the Gemini API. For more information about image generation, refer to our documentation.
from google import genai
from google.genai import types
client = genai.Client(api_key="GEMINI_API_KEY")
response = client.models.generate_content(
model="gemini-2.0-flash-exp",
contents=(
"Generate a story about a cute baby turtle in a 3D digital art style. "
"For each scene, generate an image."
),
config=types.GenerateContentConfig(
response_modalities=["Text", "Image"]
),
)
Whether you are building AI agents, developing applications with captivating visuals like illustrated interactive stories, or brainstorming visual ideas in conversation, Gemini 2.0 Flash allows you to incorporate text and image generation using a single model. We’re excited to see what developers create with native image output, and your feedback will help us finalize a production-ready version soon.
