generate_embeddings
Generate vector embeddings for text content using Gemini embedding models. Supports single and batch embedding generation with configurable task type and dimensionality. Useful for semantic search, classification, and clustering.
count_tokens
Count the number of tokens in text content for a specific Gemini model. Useful for estimating costs and ensuring prompts fit within model token limits before sending generation requests.
list_cached_contents
List all cached content entries. Returns cached content metadata including model association, creation time, and expiration.
generate_text
Generate text using Gemini models with multimodal input support. Supports single-turn and multi-turn conversations with text, images, audio, video, and document inputs. Configure generation parameters, safety settings, system instructions, JSON output mode, and function calling.
delete_file
Delete a file previously uploaded to the Gemini File API. The file will no longer be available for use in generation requests.
delete_cached_content
Delete a cached content entry. The cached content will no longer be available for use in generation requests.
update_cached_content
Update the TTL or expiration time of existing cached content. Use this to extend or shorten the lifetime of a cache entry.
list_models
List available Gemini models and their capabilities. Returns model names, supported generation methods, token limits, and other metadata. Use this to discover which models are available and their specifications.
list_files
List files previously uploaded to the Gemini File API. Files are stored for 48 hours and can be referenced in generation requests by their URI.
get_file
Get metadata for a file previously uploaded to the Gemini File API. Returns file details including processing state, size, MIME type, and expiration time.
generate_image
Generate or edit images using Gemini's native image generation capabilities or Imagen models. Supports text-to-image generation and image editing with text prompts. Returns generated images as base64-encoded data.
create_cached_content
Create cached content to save and reuse precomputed input tokens. Caching is useful when repeatedly prompting with the same large context (e.g., a long document or system instructions). Cached content can be referenced in subsequent generation requests for cost and latency savings.
get_model
Get metadata for a specific Gemini model, including supported generation methods, token limits, version, and generation defaults. Use this before invoking a model-specific capability such as text generation, embeddings, or token counting.
get_cached_content
Get metadata for a cached content entry. The API returns cache metadata such as model, display name, token usage, and expiration, but not the original cached content body.
upload_file
Upload a text, image, audio, video, or document file to the Gemini File API for reuse in generation requests. Returns the file URI needed for fileData parts in Generate Text and cached content workflows.
get_video_operation
Get the current state of a Veo long-running operation. When generation succeeds, downloads each generated MP4 and returns its bytes only as Slate attachments.
generate_video
Start asynchronous text-to-video, image-to-video, or first/last-frame video generation with a Gemini Developer API Veo model. Returns a long-running operation name for get_video_operation.