How to use App Connect with Google Gemini

Google Gemini is a family of multimodal AI models that process data types such as text, code, audio, images, and video.

Supported product and API versions

To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.

Connecting to Google Gemini

Complete the connection fields that you see in the App Connect Designer Connect > Applications and APIs page (previously the Catalog page) or flow editor. If necessary, work with your Google Gemini administrator to obtain these values.

Google Gemini authorization types and connection fields:
Account name
Provide a meaningful name to your account that helps you to identify it.
BASIC OAUTH
Server URL: The URL for the API server that makes runtime calls.
Application client ID: The unique ID that identifies your application when it requests access to Google data and APIs.
Application client secret: The secret key that authenticates your application when it requests access to Google data and APIs.
Refresh token: The refresh token used to get a new access token when the current one expires. This is generated from the application client ID and client secret.
Access token: A temporary key that lets the application securely access your data or specific features. This is generated from the application client ID and client secret.
API KEY
Server URL: The URL for the API server that makes runtime calls.
API key: The API key used to authenticate requests to the Google Gemini API.

To obtain the connection values for Google Gemini, see Obtaining connection values for Google Gemini.

To connect to a Google Gemini endpoint from the App Connect Designer Applications and APIs page for the first time, expand Google Gemini, then click Connect. For more information, see Managing accounts.

Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Applications and APIs page, select the account, open its options menu (⋮), then click Rename Account.

General Considerations

Before you use App Connect Designer with Google Gemini, take note of the following considerations:

  • You can see lists of the trigger events and actions that are available on the Applications and APIs page of the App Connect Designer.

    For some applications, the events and actions depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Post connection considerations

Take note of the following considerations after you are connected to Google Gemini:
  • The Google Gemini API includes models that are optimized for specific use cases. For an overview of the available Google Gemini models, see Gemini models.
  • Rate limits control how many requests you can send to the Google Gemini API in a specific time period. These limits help ensure fair usage, prevent abuse, and maintain system performance for all users. For more information, see Rate limits.

Events and Actions

Note: Events are not available for changes in this application. You can trigger a flow in other ways, such as at a scheduled interval or at specific dates and times.

Google Gemini actions

Your flow completes these actions on this application.

Object Action Description
Document analysis Analyze document content Analyzes document content by using the specified model and returns a structured response
Image analysis Analyze image data Analyzes image data by using the specified model and returns a structured response
Models Retrieve all models Retrieves a list of available Gemini models
Text embeddings Generate embeddings Generates embeddings for the provided content by using the specified model
Generate batch embeddings Generates multiple embedding vectors from the input content
Text generation Generate text with Gemini model Sends a prompt to the specified Gemini model and receives a generated response
Generate text with custom configuration Generates text with custom configuration by using the specified model and returns a structured response
Token count Count tokens Counts tokens in the provided content by using the specified model
Transcript analysis Generate transcript summary Generates a summary of a transcript by using the specified model
Translation Translate text Translates text by using the specified model and language