=GEMINI() — use Google Gemini in Google Sheets

=GEMINI() runs Google’s Gemini models from a cell. Gemini is fast and cost-effective for high-volume tasks like classification, tagging and short-form generation.

Syntax

=GEMINI(prompt, [value])
Parameter Required Description
prompt yes The instruction for Gemini.
value no Extra input appended to the prompt.
=GEMINI_CUSTOM(apiKey, model, prompt, [value])

Runs Gemini with your own Google AI API key and an exact model name — useful when you need a specific model version or your own billing.

=GEMINI_CREATE_IMAGE(prompt, [aspectRatio], [model])

Generates an image with Gemini image models and returns a URL you can render with =IMAGE(). Default aspect ratio is 1:1.

Examples

Classify support tickets in A2:

=GEMINI("Classify as billing, bug, feature request or other. Return one word.", A2)

Generate a thumbnail illustration:

=GEMINI_CREATE_IMAGE("Flat illustration of a mail merge robot, purple palette", "16:9")

Try it

Copy the template or install GPT for Sheets. See also: How to use Gemini in Google Sheets.