Skip to main content

gemini@1.0.0

deepResearch(message, options)
generateImage(promptText, options)
prompt(message, options)

Functions

deepResearch

deepResearch(message, options) ⇒ operation

Prompt Gemini deep research (using Google Search grounding)

ParamTypeDescription
messagestringThe research query
optionsDeepResearchOptionsModel and tools

Example

deepResearch(`Find recent news about OpenFn`);

generateImage

generateImage(promptText, options) ⇒ operation

Generate an image using Gemini/Imagen

ParamTypeDescription
promptTextstringThe image prompt
optionsobjectModel and generation options

Example

generateImage("A futuristic city skyline");

prompt

prompt(message, options) ⇒ operation

Prompt the Gemini interface to respond

ParamTypeDescription
messagestringThe prompt
optionsPromptOptionsModel and other parameters

Example

prompt(`Summarize this text: ${JSON.stringify($.data)}`);

Interfaces

DeepResearchOptions

Options provided to the Deep Research function

Properties

NameTypeDescription
modelstringWhich model to use, defaults to 'gemini-2.5-flash-lite'
toolsobjectTools configuration (e.g., googleSearch) shortcut to add tools in generationConfig use any of the following tools: https://ai.google.dev/gemini-api/docs/tools
generationConfigobjectConfiguration for generation (temperature, topK, etc.) see the options here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#googlegenaisdk_textgen_config_with_txt-nodejs_genai_sdk

GenerateImageOptions

Options provided to the Generate Image function

Properties

NameTypeDescription
modelstringWhich model to use, defaults to ' 'gemini-3-pro-image-preview'
imageSizestringSize of the image to generate, defaults to '1k'
aspectRatiostringAspect ratio of the image to generate, defaults to '1:1'
generationConfigobjectConfiguration for generation (temperature, topK, etc.) see the options here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#googlegenaisdk_textgen_config_with_txt-nodejs_genai_sdk

PromptOptions

Options provided to the Prompt function

Properties

NameTypeDescription
modelstringWhich model to use, defaults to 'gemini-2.5-flash-lite'
generationConfigobjectConfiguration for generation (temperature, topK, etc.) see the options here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#googlegenaisdk_textgen_config_with_txt-nodejs_genai_sdk