Guess The Shape

gemini-cookbookgemini-apiexamplesgemini
Copyright 2025 Google LLC.
[1]

Guess the shape: Triangle, square, pentagon, ?

This notebook provides a quick code example showing how to use multiple images in the same prompt with the Gemini API. You'll show the model a sequence of shapes (a triangle, a square, and a pentagon) and ask it to guess the shape that comes next.

[2]
[3]
'1.9.0'
[4]
[5]
[6]
MODEL_ID
[7]
Output
[8]
Output
[9]
Output
[10]
[11]
[12]

Further reading

In this notebook, you included images directly in the prompt. This is fine for small images. If your prompts will exceed 100MB in size, you can use the Files API to upload your images (and other media types) in advance.