Google Gemini AI
The robomotion googlegemini CLI calls Google's Gemini API for text generation, image analysis, and embeddings. It supports single-turn generation, multi-turn chat with history, vision (image + text), and embedding generation.
When to use
- Generate text responses using Gemini models
- Analyze images with text prompts (vision)
- Run multi-turn chat conversations with history
- Generate text embeddings for semantic search
Prerequisites
robomotionCLI installed- Package installed:
robomotion install googlegemini - Google Gemini API key configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install googlegemini - Connect with session:
robomotion googlegemini connect_gemini --session --output json # → {"outConnectionId":"<connection-id>","session_id":"<session-id>"} - Use the returned
connection-idandsession-idin all subsequent commands:robomotion googlegemini generate_text --connection-id "<connection-id>" --prompt <text> --session-id "<session-id>" --output json - Disconnect when done:
robomotion googlegemini disconnect_gemini --connection-id "<connection-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion googlegemini connect --session --output jsonEstablishes a connection to Google Gemini API using API key or Robomotion creditsrobomotion googlegemini generate_text --connection-id --system-prompt --user-prompt --local-file-paths --file-paths --uploaded-files [--model] [--custom-model] [--number-of-generations] [--temperature] [--top-p] [--top-k] [--max-output-tokens] [--thinking-mode] [--thinking-budget] [--safety-settings-harassment] [--safety-settings-hate-speech] [--safety-settings-sexually-explicit] [--safety-settings-dangerous-content] [--safety-settings-civic-integrity] [--response-mime-type] [--response-schema] [--presence-penalty] [--frequency-penalty] [--stop-sequences] [--60] --session-id "<session-id>" --output jsonGenerates text using Google Gemini models with optional file inputsrobomotion googlegemini send_chat_message --connection-id --user-prompt --history --local-file-paths --file-paths --uploaded-files [--model] [--custom-model] [--temperature] [--top-p] [--top-k] [--max-output-tokens] [--safety-settings-harassment] [--safety-settings-hate-speech] [--safety-settings-sexually-explicit] [--safety-settings-dangerous-content] [--safety-settings-civic-integrity] [--response-mime-type] [--presence-penalty] [--frequency-penalty] [--60] --session-id "<session-id>" --output jsonSends a message in a multi-turn chat conversation with Geminirobomotion googlegemini upload_file --connection-id --file-display-name --file-local-path --session-id "<session-id>" --output jsonUploads a local file to Google Gemini for use in promptsrobomotion googlegemini list_files --connection-id [--page-size] [--page-token] [--max-results] --session-id "<session-id>" --output jsonLists all uploaded files in your Google Gemini accountrobomotion googlegemini get_file --connection-id --file-uri --session-id "<session-id>" --output jsonRetrieves metadata for an uploaded file from Google Geminirobomotion googlegemini delete_file --connection-id --file-uri --session-id "<session-id>" --output jsonDeletes an uploaded file from Google Geminirobomotion googlegemini list_models --connection-id [--page-size] [--page-token] [--filter] [--max-results] --session-id "<session-id>" --output jsonLists available Gemini models with their capabilities and token limitsrobomotion googlegemini embeddings --connection-id --content --compare-text [--title] [--task-type] [--embedding-model] [--output-dimensionality] --session-id "<session-id>" --output jsonGenerates text embeddings for semantic search٫ classification٫ and similarity tasksrobomotion googlegemini batch_embeddings --connection-id --contents [--task-type] [--embedding-model] [--title] [--output-dimensionality] --session-id "<session-id>" --output jsonGenerates embeddings for multiple texts in a single batch operationrobomotion googlegemini compare_embeddings --connection-id --source-text --comparison-texts --source-embedding-file --target-embeddings-file --comparison-texts-file [--embedding-model] [--custom-model] [--similarity-metric] [--similarity-threshold] [--max-results] [--sort-order] [--60] --session-id "<session-id>" --output jsonCompares semantic similarity between a source text and multiple target textsrobomotion googlegemini generate_image --connection-id --prompt --reference-images --reference-images [--model] [--custom-model] [--number-of-images] [--aspect-ratio] [--image-size] [--person-generation] [--output-format] [--120] --session-id "<session-id>" --output jsonGenerates images using Google Gemini image generation modelsrobomotion googlegemini edit_image --connection-id --edit-prompt --base-image-path --mask-image-path [--model] [--custom-model] [--number-of-images] [--negative-prompt] [--output-format] [--output-quality] [--120] --session-id "<session-id>" --output jsonEdits an existing image using Gemini with mask-based inpaintingrobomotion googlegemini generate_video --connection-id --video-prompt --negative-prompt --first-frame-image --last-frame-image [--model] [--custom-model] [--aspect-ratio] [--resolution] [--duration] [--generate-audio] [--person-generation] [--600] --session-id "<session-id>" --output jsonGenerates videos using Google Veo models with optional audio and frame controlrobomotion googlegemini disconnect --connection-id --session-id "<session-id>" --output jsonCloses an existing Google Gemini API connection
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)