Builders can now entry Imagen 3, Google’s state-of-the-art picture technology mannequin, by way of the Gemini API. The mannequin might be initially accessible to paid users, with a rollout to the free tier coming quickly.
Imagen 3 excels in producing visually interesting, artifact-free photographs in all kinds of kinds from hyperrealistic photographs to impressionistic landscapes, summary compositions to anime characters. Improved immediate following makes it simple to transform nice concepts into high-quality photographs. Total, Imagen 3 achieves state-of-the-art efficiency on the number of benchmarks. Imagen 3 achieves this whereas being priced at $0.03 per picture on the Gemini API, with management over side ratios, the variety of choices to generate, and more.
To assist fight misinformation and misattribution, all photographs generated by Imagen 3 embody a non-visible digital SynthID watermark, figuring out them as AI-generated.
See Imagen 3 in Motion
The gallery under highlights Imagen 3’s capabilities throughout a variety of kinds.
Get Began with Imagen 3 within the Gemini API
This Python code snippet demonstrates generate a picture with Imagen 3 utilizing the Gemini API.
from google import genai
from google.genai import sorts
from PIL import Picture
from io import BytesIO
shopper = genai.Shopper(api_key='GEMINI_API_KEY')
response = shopper.fashions.generate_images(
mannequin='imagen-3.0-generate-002',
immediate='a portrait of a sheepadoodle sporting cape',
config=sorts.GenerateImagesConfig(
number_of_images=1,
)
)
for generated_image in response.generated_images:
picture = Picture.open(BytesIO(generated_image.picture.image_bytes))
picture.present()
You’ll be able to discover extra prompting recommendation and picture kinds within the Gemini API developer docs, with additional particulars accessible on scores, methodology, and efficiency enchancment in Appendix D of our up to date technical report.
We’re excited to take step one of increasing availability of our generative media fashions into the Gemini API and plan to make extra accessible within the close to future in order that builders can bridge generative media and language fashions collectively.