Skip to main content

Gemini (Google AI Studio)

Gemini Embeddings convert text into numerical vectors that capture meaning and context, accessible through Google AI Studio. Similar text snippets produce close vectors, enabling tasks like semantic search and classification.

Google AI Studio vs. Vertex AI

This adapter uses a Google AI Studio API key — the simplest way to use Gemini embeddings. If you need GCP-managed access with service account credentials, use the VertexAI embedding adapter instead.

Getting started with Gemini Embedding

  1. Sign in to Google AI Studio using your Google account.

  2. From the side navigation menu, choose API keys.

  3. Click on Create API key in the top right corner.

    img Gemini API Key Creation

  4. Select or create a Google Cloud project for the key, then copy the generated API key and keep it safe.

Setting up the Gemini Embedding model in Unstract

Now that we have an API key from Google AI Studio, we can use it to set up an Embedding profile on the Unstract platform. For this:

  • Sign in to the Unstract Platform

  • From the side navigation menu, choose Settings 🞂 Embedding

  • Click on the New Embedding Profile button.

  • From the list of Embeddings, choose Gemini. You should see a dialog box where you enter details.

    img Gemini Embedding Adapter Selection

    img Gemini Embedding Configuration

  • For Name, enter a unique name for this adapter instance. Example: gemini-emb-1.

  • In the Model field, enter the Gemini embedding model name (recommended: gemini-embedding-001). Unstract supports text embeddings only — avoid multimodal models. See Gemini Embedding Models for the current list.

  • In the API Key field, paste the API key copied from Google AI Studio.

  • Leave Embed Batch Size and Timeout at their default values.

  • Leave Timeout (in seconds) at its default unless you have specific requirements.

  • Click on Test Connection and ensure it succeeds. You can finally click on Submit and that should create a new Embedding Profile for use in your Unstract projects.