Google Gemini

Generate text, chat, and create images using Google Gemini models.

AI and MLAPI key7 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (7)
  4. chat_gemini
  5. create_video
  6. generate_content
  7. generate_content_from_image
  8. generate_content_with_filesearch
  9. text-to-speech
  10. custom_api_call
  11. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("google_gemini", action, input) resolves with the provider's answer and rejects when Google Gemini isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "google_gemini"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Google Gemini when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellGoogleGemini = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Google Gemini isn't connected.
  const output = await step.run("Google Gemini", () =>
    step.ctx.integrations.invoke("google_gemini", "chat_gemini", {
      "model": "<model>",
      "prompt": "<prompt>"
    }),
  );
  step.ctx.log("Google Gemini answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "google_gemini",
    "piece_action": "chat_gemini",
    "input": {
      "model": "<model>",
      "prompt": "<prompt>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/google_gemini/chat_gemini" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"model":"<model>","prompt":"<prompt>"}}'

Actions

chat_gemini

Chat Gemini. Chat with Google Gemini

InputTypeDescription
modelrequiredid (picked from your account)The model which will generate the completion
promptrequiredlong textThe prompt to generate content from.
memoryKeyoptionaltextA memory key that will keep the chat history. Keep it empty to leave Gemini without memory of previous messages.

create_video

Create Video. Generate a video from a text prompt using Google Veo models.

InputTypeDescription
modelrequiredone of "veo-3.1-generate-preview" | "veo-3.1-fast-generate-preview" | "veo-3.0-generate-001" | "veo-3.0-fast-generate-001" | "veo-2.0-generate-001"Model
promptrequiredlong textDescribe the video you want to generate. Be specific about the scene, motion, style, and lighting for best results.
imageoptionalfileOptional image to use as the first frame of the video (image-to-video).
lastFrameoptionalfileOptional image to use as the last frame. Use together with Start Image to generate an interpolation video.
aspectRatiorequiredone of "16:9" | "9:16"Aspect Ratio
durationSecondsoptionalid (picked from your account)Must be 8 when using 1080p, 4K, or reference images.
resolutionoptionalid (picked from your account)1080p is available on Veo 3.0+ only. 4K is only available on Veo 3.1 models. 1080p and 4K require 8-second duration.
personGenerationoptionalone of "allow_adult" | "allow_all" | "dont_allow"Controls whether people or faces can appear in the generated video.

generate_content

Generate Content. Generate content using Google Gemini using the "gemini-pro" model

InputTypeDescription
promptrequiredlong textThe prompt to generate content from.
modelrequiredid (picked from your account)The model which will generate the completion
toolTypeoptionalone of "google-search" | "file-search" | "google-maps" | "url-context"Select built-in tool to use with Gemini model.
toolPropertiesoptionalobject (depends on other props)Tool Config

generate_content_from_image

Generate Content from Image. Generate content using Google Gemini using the "gemini-pro-vision" model

InputTypeDescription
promptrequiredlong textThe prompt to generate content from.
imagerequiredfileThe image to generate content from.
modelrequiredid (picked from your account)The model which will generate the completion

generate_content_with_filesearch

Generate Content with File Search. Generate content with file search functionality.

InputTypeDescription
promptrequiredlong textThe prompt to generate content from.
modelrequiredid (picked from your account)The model which will generate the completion
fileStoreNamerequiredtextFile Store Name
filerequiredfileFile

text-to-speech

Text to Speech. Converts text to audio file.

InputTypeDescription
modelrequiredone of "gemini-2.5-pro-preview-tts" | "gemini-2.5-flash-preview-tts"Model
textrequiredlong textInput Text
voicerequiredone of "Zephyr" | "Puck" | "Charon" | "Kore" | "Fenrir" | "Leda" | "Orus" | "Aoede" | "Callirrhoe" | "Autonoe" | "Enceladus" | "Iapetus"Voice

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

Details

Id
google_gemini
Category
AI and ML
Tags
ai, google, gemini, llm, multimodal
Package
@activepieces/piece-google-gemini@0.1.5
Runs
Through the integration runner