Connect to Google Gemini for generating content with Gemini models, counting tokens, creating embeddings, managing uploaded files, context caches, and tuned models.
| Action | Description | Parameters | Returns |
|---|---|---|---|
batch_embed_contents | Create embeddings for multiple texts | model, texts [task_type] | BatchEmbeddings |
count_tokens | Count tokens for a prompt | model, contents | TokenCount |
create_cache | Create a context cache | model [contents, system_instruction, ttl, display_name, tools] | CachedContent |
create_tuned_model ⚠ | Create a tuned model | base_model, training_data [display_name, tuned_model_id, epoch_count, batch_size, learning_rate] | TunedModel |
delete_cache ⚠ | Delete a context cache | name | bool |
delete_file ⚠ | Delete an uploaded file | name | bool |
delete_tuned_model ⚠ | Delete a tuned model | name | bool |
embed_content | Create an embedding for a single text | model, text [task_type, title, output_dimensionality] | Embedding |
generate_content | Generate content with a Gemini model | model, contents [system_instruction, temperature, max_output_tokens, cached_content] | GeminiResponse |
get_cache | Get a context cache by name | name | CachedContent |
get_file | Get file metadata by name | name | GeminiFile |
get_model | Get a model by ID | model | GeminiModel |
get_tuned_model | Get a tuned model by name | name | TunedModel |
list_caches | List context caches | [page_size, page_token] | CachedContentList |
list_files | List uploaded files | [page_size, page_token] | FileList |
list_models | List available Gemini models | — | list |
list_tuned_models | List tuned models | [page_size, page_token, filter] | TunedModelList |
update_cache | Update a context cache's expiration | name [ttl, expire_time] | CachedContent |
upload_file | Upload a file to the Gemini Files API | file_content, mime_type [display_name] | GeminiFile |
Full schema explorer, code generation, and live API testing