{
  "service": "gemini",
  "displayName": "Gemini",
  "categories": [
    "AI"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "GEMINI_API_KEY",
      "description": "Gemini API key sent with the x-goog-api-key header. Get it from https://aistudio.google.com/api-keys."
    }
  ],
  "homepageUrl": "https://ai.google.dev/gemini-api",
  "actions": [
    {
      "id": "gemini.count_tokens",
      "service": "gemini",
      "name": "count_tokens",
      "description": "Count the Gemini token usage for input text.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "description": "The text to count tokens for."
          },
          "model": {
            "type": "string",
            "description": "The model name to use for tokenization."
          }
        },
        "additionalProperties": false,
        "required": [
          "text"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "total_tokens": {
            "type": "integer",
            "description": "The total token count."
          },
          "token_details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "modality": {
                  "type": "string",
                  "description": "The content modality."
                },
                "token_count": {
                  "type": "integer",
                  "description": "The token count for this modality."
                }
              },
              "additionalProperties": false,
              "required": [
                "modality",
                "token_count"
              ],
              "description": "A per-modality token count entry."
            },
            "description": "The per-modality token count breakdown."
          }
        },
        "additionalProperties": false,
        "required": [
          "total_tokens"
        ],
        "description": "The output payload for this action."
      }
    },
    {
      "id": "gemini.embed_content",
      "service": "gemini",
      "name": "embed_content",
      "description": "Generate Gemini embeddings for text content.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "description": "The text to generate embeddings for."
          },
          "model": {
            "type": "string",
            "description": "The embedding model name to use."
          },
          "title": {
            "type": "string",
            "description": "The optional title for the embedding content."
          },
          "task_type": {
            "type": "string",
            "description": "The task type hint for the embedding model."
          },
          "output_dimensionality": {
            "type": "integer",
            "description": "The desired embedding dimensionality."
          }
        },
        "additionalProperties": false,
        "required": [
          "text"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "embedding": {
            "type": "array",
            "items": {
              "type": "number",
              "description": "An embedding vector value."
            },
            "description": "The embedding vector values."
          },
          "dimensions": {
            "type": "integer",
            "description": "The number of embedding dimensions."
          }
        },
        "additionalProperties": false,
        "required": [
          "embedding",
          "dimensions"
        ],
        "description": "The output payload for this action."
      }
    },
    {
      "id": "gemini.generate_content",
      "service": "gemini",
      "name": "generate_content",
      "description": "Generate text or speech audio with Gemini models.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The model name to use."
          },
          "top_k": {
            "type": "integer",
            "description": "The top-K sampling parameter."
          },
          "top_p": {
            "type": "number",
            "description": "The top-P sampling parameter."
          },
          "temperature": {
            "type": "number",
            "description": "The sampling temperature."
          },
          "safety_settings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "description": "The harm category name."
                },
                "threshold": {
                  "type": "string",
                  "description": "The blocking threshold level."
                }
              },
              "additionalProperties": false,
              "required": [
                "category",
                "threshold"
              ],
              "description": "A Gemini content safety setting."
            },
            "description": "The safety settings to apply."
          },
          "max_output_tokens": {
            "type": "integer",
            "description": "The maximum number of output tokens."
          },
          "system_instruction": {
            "type": "string",
            "description": "The system instruction prepended to the prompt."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "The text prompt to send to the model."
          },
          "voice_name": {
            "type": "string",
            "description": "The voice name for speech audio output."
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The sequences that stop generation."
          }
        },
        "additionalProperties": false,
        "required": [
          "prompt"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A JSON-like object with arbitrary string keys."
          },
          "text": {
            "type": "string",
            "description": "The generated text content."
          },
          "mime_type": {
            "type": "string",
            "description": "The MIME type of the response."
          },
          "audio_data": {
            "type": "string",
            "description": "The base64-encoded audio data."
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A JSON-like object with arbitrary string keys."
            },
            "description": "The candidate responses."
          },
          "usage_metadata": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A JSON-like object with arbitrary string keys."
          },
          "message": {
            "type": "string",
            "description": "The execution status message."
          }
        },
        "additionalProperties": false,
        "required": [
          "raw"
        ],
        "description": "The output payload for this action."
      }
    },
    {
      "id": "gemini.generate_image",
      "service": "gemini",
      "name": "generate_image",
      "description": "Generate an image with Gemini and return a transit URL.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The model name to use."
          },
          "top_k": {
            "type": "integer",
            "description": "The top-K sampling parameter."
          },
          "top_p": {
            "type": "number",
            "description": "The top-P sampling parameter."
          },
          "temperature": {
            "type": "number",
            "description": "The sampling temperature."
          },
          "safety_settings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "description": "The harm category name."
                },
                "threshold": {
                  "type": "string",
                  "description": "The blocking threshold level."
                }
              },
              "additionalProperties": false,
              "required": [
                "category",
                "threshold"
              ],
              "description": "A Gemini content safety setting."
            },
            "description": "The safety settings to apply."
          },
          "max_output_tokens": {
            "type": "integer",
            "description": "The maximum number of output tokens."
          },
          "system_instruction": {
            "type": "string",
            "description": "The system instruction prepended to the prompt."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "The text prompt describing the image to generate."
          },
          "timeout": {
            "type": "number",
            "description": "The request timeout in milliseconds."
          },
          "image_size": {
            "type": "string",
            "enum": [
              "1K",
              "2K",
              "4K"
            ],
            "description": "The target image resolution."
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "1:1",
              "2:3",
              "3:2",
              "3:4",
              "4:3",
              "4:5",
              "5:4",
              "9:16",
              "16:9",
              "21:9"
            ],
            "description": "The image aspect ratio."
          }
        },
        "additionalProperties": false,
        "required": [
          "prompt"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "image": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The file name."
              },
              "mimetype": {
                "type": "string",
                "description": "The MIME type."
              },
              "downloadUrl": {
                "type": "string",
                "description": "The local transit URL for downloading the file.",
                "format": "uri"
              }
            },
            "additionalProperties": false,
            "required": [
              "name",
              "mimetype",
              "downloadUrl"
            ],
            "description": "A downloadable file with a transit URL."
          }
        },
        "additionalProperties": false,
        "required": [
          "image"
        ],
        "description": "The output payload for this action."
      }
    },
    {
      "id": "gemini.generate_videos",
      "service": "gemini",
      "name": "generate_videos",
      "description": "Start a Gemini Veo video generation operation.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "seed": {
            "type": "integer",
            "description": "The random seed for reproducibility."
          },
          "model": {
            "type": "string",
            "description": "The Veo model name to use."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "The text prompt describing the video to generate."
          },
          "resolution": {
            "type": "string",
            "enum": [
              "720p",
              "1080p"
            ],
            "description": "The video resolution."
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "16:9",
              "9:16"
            ],
            "description": "The video aspect ratio."
          },
          "negative_prompt": {
            "type": "string",
            "description": "The negative prompt describing content to avoid."
          },
          "duration_seconds": {
            "type": "integer",
            "enum": [
              4,
              5,
              6,
              7,
              8
            ],
            "description": "The video duration in seconds."
          },
          "person_generation": {
            "type": "string",
            "enum": [
              "dont_allow",
              "allow_adult",
              "allow_all"
            ],
            "description": "The person generation policy."
          }
        },
        "additionalProperties": false,
        "required": [
          "prompt"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A JSON-like object with arbitrary string keys."
          },
          "operation_name": {
            "type": "string",
            "description": "The long-running operation name."
          }
        },
        "additionalProperties": false,
        "required": [
          "raw",
          "operation_name"
        ],
        "description": "The output payload for this action."
      }
    },
    {
      "id": "gemini.get_videos_operation",
      "service": "gemini",
      "name": "get_videos_operation",
      "description": "Fetch the current status for a Gemini Veo operation.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "operation_name": {
            "type": "string",
            "minLength": 1,
            "description": "The long-running Veo operation name."
          }
        },
        "additionalProperties": false,
        "required": [
          "operation_name"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "done": {
            "type": "boolean",
            "description": "Whether the Veo operation has finished."
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "description": "The API error code returned for the operation."
              },
              "message": {
                "type": "string",
                "description": "The API error message returned for the operation."
              }
            },
            "additionalProperties": false,
            "required": [
              "code",
              "message"
            ],
            "description": "The operation error payload."
          },
          "response": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A JSON-like object with arbitrary string keys."
          },
          "video_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The generated video URLs when the operation succeeds."
          }
        },
        "additionalProperties": false,
        "required": [
          "done",
          "video_urls"
        ],
        "description": "The output payload for this action."
      }
    },
    {
      "id": "gemini.list_models",
      "service": "gemini",
      "name": "list_models",
      "description": "List the available Gemini and Veo models.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "filter_prefix": {
            "type": "string",
            "description": "The model name prefix to filter by."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "raw": {
            "type": "object",
            "properties": {
              "models": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The model resource name."
                    },
                    "version": {
                      "type": "string",
                      "description": "The model version string."
                    },
                    "topK": {
                      "type": "integer",
                      "description": "The default top-K sampling value."
                    },
                    "topP": {
                      "type": "number",
                      "description": "The default top-P sampling value."
                    },
                    "thinking": {
                      "type": "boolean",
                      "description": "Whether the model supports thinking mode."
                    },
                    "baseModelId": {
                      "type": "string",
                      "description": "The base model identifier."
                    },
                    "description": {
                      "type": "string",
                      "description": "The model description."
                    },
                    "displayName": {
                      "type": "string",
                      "description": "The human-readable model display name."
                    },
                    "temperature": {
                      "type": "number",
                      "description": "The default temperature value."
                    },
                    "maxTemperature": {
                      "type": "number",
                      "description": "The maximum allowed temperature."
                    },
                    "inputTokenLimit": {
                      "type": "integer",
                      "description": "The maximum input token count."
                    },
                    "outputTokenLimit": {
                      "type": "integer",
                      "description": "The maximum output token count."
                    },
                    "supportedGenerationMethods": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": "The generation methods supported by the model."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "version"
                  ],
                  "description": "A Gemini model summary record."
                },
                "description": "The raw model records."
              },
              "nextPageToken": {
                "type": "string",
                "description": "The token for fetching the next page."
              }
            },
            "additionalProperties": false,
            "required": [
              "models"
            ],
            "description": "The raw API response."
          },
          "models": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The model resource name."
                },
                "version": {
                  "type": "string",
                  "description": "The model version string."
                },
                "topK": {
                  "type": "integer",
                  "description": "The default top-K sampling value."
                },
                "topP": {
                  "type": "number",
                  "description": "The default top-P sampling value."
                },
                "thinking": {
                  "type": "boolean",
                  "description": "Whether the model supports thinking mode."
                },
                "baseModelId": {
                  "type": "string",
                  "description": "The base model identifier."
                },
                "description": {
                  "type": "string",
                  "description": "The model description."
                },
                "displayName": {
                  "type": "string",
                  "description": "The human-readable model display name."
                },
                "temperature": {
                  "type": "number",
                  "description": "The default temperature value."
                },
                "maxTemperature": {
                  "type": "number",
                  "description": "The maximum allowed temperature."
                },
                "inputTokenLimit": {
                  "type": "integer",
                  "description": "The maximum input token count."
                },
                "outputTokenLimit": {
                  "type": "integer",
                  "description": "The maximum output token count."
                },
                "supportedGenerationMethods": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": "The generation methods supported by the model."
                }
              },
              "additionalProperties": false,
              "required": [
                "name",
                "version"
              ],
              "description": "A Gemini model summary record."
            },
            "description": "The parsed model records."
          }
        },
        "additionalProperties": false,
        "required": [
          "raw",
          "models"
        ],
        "description": "The output payload for this action."
      }
    },
    {
      "id": "gemini.wait_for_video",
      "service": "gemini",
      "name": "wait_for_video",
      "description": "Poll a Gemini Veo operation and return the finished video via transit URL.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "operation_name": {
            "type": "string",
            "minLength": 1,
            "description": "The long-running Veo operation name."
          }
        },
        "additionalProperties": false,
        "required": [
          "operation_name"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the polling completed with a finished video."
          },
          "video_file": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The file name."
              },
              "mimetype": {
                "type": "string",
                "description": "The MIME type."
              },
              "downloadUrl": {
                "type": "string",
                "description": "The local transit URL for downloading the file.",
                "format": "uri"
              }
            },
            "additionalProperties": false,
            "required": [
              "name",
              "mimetype",
              "downloadUrl"
            ],
            "description": "A downloadable file with a transit URL."
          },
          "rai_filtering": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "The Responsible AI filtering summary message."
              },
              "filtered": {
                "type": "boolean",
                "description": "Whether any outputs were filtered."
              },
              "filter_reasons": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "description": "The Responsible AI filter reasons."
              },
              "filtered_count": {
                "type": "integer",
                "description": "The number of filtered outputs."
              }
            },
            "additionalProperties": false,
            "required": [
              "message",
              "filtered_count"
            ],
            "description": "Responsible AI filtering details for the operation."
          }
        },
        "additionalProperties": false,
        "required": [
          "success"
        ],
        "description": "The output payload for this action."
      }
    }
  ]
}
