# Google AI

## Google AI[]()

[Section titled “Google AI ”](#google-ai)

The `google` provider allows you to use Google AI models. It gives you access

Note

GenAIScript uses the [OpenAI compatibility](https://ai.google.dev/gemini-api/docs/openai) layer of Google AI, so some [limitations](https://ai.google.dev/gemini-api/docs/openai#current-limitations) apply.

* `seed` is not supported and ignored.
* [fallback tools](/genaiscript/reference/scripts/tools#fallbacktools) are enabled using Google finishes the OpenAI compatibilty layer. (See [forum](https://discuss.ai.google.dev/t/gemini-openai-compatibility-multiple-functions-support-in-function-calling-error-400/49431)).

1. Open [Google AI Studio](https://aistudio.google.com/app/apikey) and create a new API key.

2. Update the `.env` file with the API key.

   .env

   ```txt
   GEMINI_API_KEY=...
   ```

3. Find the model identifier in the [Gemini documentation](https://ai.google.dev/gemini-api/docs/models/gemini) and use it in your script or cli with the `google` provider.

   ```py
   ...
   const model = genAI.getGenerativeModel({
     model: "gemini-1.5-pro-latest",
   });
   ...
   ```

   then use the model identifier in your script.

   ```js
   script({ model: "google:gemini-1.5-pro-latest" });
   ```

### Aliases

The following model aliases are attempted by default in GenAIScript.

| Alias            | Model identifier                   |
| ---------------- | ---------------------------------- |
| large            | gemini-1.5-flash-latest            |
| small            | gemini-1.5-flash-latest            |
| vision           | gemini-1.5-flash-latest            |
| long             | gemini-1.5-flash-latest            |
| reasoning        | gemini-2.0-flash-thinking-exp-1219 |
| reasoning\_small | gemini-2.0-flash-thinking-exp-1219 |
| embeddings       | text-embedding-004                 |

### Limitations

* Uses [OpenAI compatibility layer](https://ai.google.dev/gemini-api/docs/openai)
* listModels
* logprobs (and top logprobs) ignored
* Ignore prediction of output tokens
* Seed ignored
* Tools implemented as fallback tools automatically.
* topLogprobs