# Gemini

The Gemini AI Connector provides a suite of AI-powered operations using Google's Gemini API.

## Overview

Gemini is a suite of AI-powered operations using Google's Gemini API.

## Authentication

Within the builder, click on the Gemini connector to display the connector properties panel. Select the **Auth** tab and click on the **New authentication** button.
In the Tray.io authentication pop-up modal name your authentication in a way that will quickly identify it within a potentially large list. For example whether it is a Sandbox or Production auth, etc.
Consider who/ how many people will need access to this authentication when choosing where to create this authentication ('Personal' vs 'Organisational').
The next page asks you for your **API Key** credentials.
![gemini-auth-modal](https://tray.ai/documentation/images/connectors/artificial-intelligence/gemini/5Vj70CzlpYAEt3vJQh5XFu_gemini-auth-modal.png)
To get these fields, head to the Gemini dashboard. Navigate to the Google AI Studio found here: <https://aistudio.google.com/apikey>.
![gemini-get-api-key-1](https://tray.ai/documentation/images/connectors/artificial-intelligence/gemini/2BFBklXiqtDYS5YvUulLzQ_get-api-key-1.png)
To get the API Key click the **Create API Key** button.
![gemini-create-api-key-1](https://tray.ai/documentation/images/connectors/artificial-intelligence/gemini/92tHzDWqQkOT3sqeFw5h9_create-api-key-1.png)
You can then copy the API key from the popup and navigate back to the Tray.io Authentication panel.
Once you have added these fields to your Tray.io authentication pop-up window click the **Create authentication** button. 
Your connector authentication setup should now be complete. Please run the simplest operation available to test and make sure you can retrieve data as expected.

## Available Operations

The examples below show one or two of the available connector operations in use.
Please see the [Full Operations Reference](#operationsFull) at the end of this page for details on all available operations for this connector.

## Example Usage

\*\[****Reference docs:****  *[*Accelevents*](https://tray.ai/documentation/connectors/service/accelevents/)* and \*[*Fullstory*](https://tray.ai/documentation/connectors/service/fullstory/) *]*

> **Info:** **TRAY POTENTIAL:** Tray is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors.

Below is an example of a way in which you could potentially use the Gemini connector, to create text embeddings.
The overall logic of the workflow is:

1. Setup using a manual trigger and add a File Helper step
2. Use the \*\*Create file from URL \*\*operation and set the input to a file URL
3. Add a Gemini step and use the **Analyze Image** operation
4. Use a JSON path to the File Helper step output for the **Image File** input
5. Run the workflow to see generated the image analysis
   Your completed workflow should look similar to this:
   ![Gemini-Image-analysis-workflow-result-1](https://tray.ai/documentation/images/connectors/artificial-intelligence/gemini/2pyCc7FkOTGn5I2VbtyHPJ_workflow-result-1.png)

### Step-by-step Explanation

> **Info:** \*\*BEST PRACTICES: \*\*Whenever you do decide to create your own workflow, be sure to check out some of our key articles such as:- [Using callable workflows](https://tray.ai/documentation/platform/automation-integration/building-workflows/composable-workflows/calling-other-workflows)
> - [Pagination](https://tray.ai/documentation/platform/automation-integration/advanced-use-cases/batching-queueing/pagination)
> - [Data transformation guide](https://tray.ai/documentation/platform/automation-integration/building-workflows/mapping-data/data-transformation-guide)
