Table of Contents

Namespace Google.GenAI.Types

Classes

ActivityEnd

Marks the end of user activity. This can only be sent if automatic (i.e. server-side) activity detection is disabled.

ActivityHandlingConverter
ActivityStart

Marks the start of user activity. This can only be sent if automatic (i.e. server-side) activity detection is disabled.

AdapterSizeConverter
AggregationMetricConverter
AggregationOutput

The aggregation result for the entire dataset and all metrics. This data type is not supported in Gemini API.

AggregationResult

The aggregation result for a single metric. This data type is not supported in Gemini API.

ApiAuth

The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. This data type is not supported in Gemini API.

ApiAuthApiKeyConfig

The API secret. This data type is not supported in Gemini API.

ApiKeyConfig

Config for authentication with API key. This data type is not supported in Gemini API.

ApiSpecConverter
AudioTranscriptionConfig

The audio transcription configuration in Setup.

AuthConfig

The authentication config to access the API.

AuthConfigGoogleServiceAccountConfig

Config for Google Service Account Authentication. This data type is not supported in Gemini API.

AuthConfigHttpBasicAuthConfig

Config for HTTP Basic Authentication. This data type is not supported in Gemini API.

AuthConfigOauthConfig

Config for user oauth. This data type is not supported in Gemini API.

AuthConfigOidcConfig

Config for user OIDC auth. This data type is not supported in Gemini API.

AuthToken

Config for auth_tokens.create parameters.

AuthTypeConverter
AutomaticActivityDetection

Configures automatic detection of activity.

AutoraterConfig

Autorater config used for evaluation.

AvatarConfig

Configures the avatar to be used in the session.

BatchJob

Config for batches.create return value.

BatchJobDestination

Config for dest parameter.

BatchJobOutputInfo

Represents the output_info field in batch jobs.

BatchJobSource

Config for src parameter.

BehaviorConverter
BigQuerySource

The BigQuery location for the input content. This data type is not supported in Gemini API.

BleuMetricValue

Bleu metric value for an instance. This data type is not supported in Gemini API.

Blob

A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video.

BlockedReasonConverter
CachedContent

A resource used in LLM queries for users to explicitly specify what to cache.

CachedContentUsageMetadata

Metadata on the usage of the cached content.

CancelBatchJobConfig

Optional parameters.

CancelTuningJobConfig

Optional parameters for tunings.cancel method.

CancelTuningJobResponse

Empty response for tunings.cancel method.

Candidate

A response candidate generated from the model.

Checkpoint

Describes the machine learning model version checkpoint.

Citation

A citation for a piece of generatedcontent. This data type is not supported in Gemini API.

CitationMetadata

Citation information when the model quotes another source.

ClientOptions

Client options to be used in the client instantiation.

CodeExecutionResult

Result of executing the ExecutableCode. Generated only when the CodeExecution tool is used.

CompletionStats

Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. This data type is not supported in Gemini API.

CompositeReinforcementTuningRewardConfig

Composite reinforcement tuning reward config.

CompositeReinforcementTuningRewardConfigWeightedRewardConfig

Composite reinforcement tuning reward config weighted reward config.

ComputeTokensConfig

Optional parameters for computing tokens.

ComputeTokensResponse

Response for computing tokens.

ComputerUse

Tool to support computer use.

Content

Contains the multi-part content of a message.

ContentEmbedding

The embedding generated from an input content.

ContentEmbeddingStatistics

Statistics of the input text associated with the result of content embedding.

ContentReferenceImage

A content reference image. A content reference image represents a subject to reference (ex. person, product, animal) provided by the user. It can optionally be provided in addition to a style reference image (ex. background, style reference).

ContextWindowCompressionConfig

Enables context window compression -- mechanism managing model context window so it does not exceed given length.

ControlReferenceConfig

Configuration for a Control reference image.

ControlReferenceImage

A control reference image. The image of the control reference image is either a control image provided by the user, or a regular image which the backend will use to generate a control image of. In the case of the latter, the enable_control_image_computation field in the config should be set to True. A control image is an image that represents a sketch image of areas for the model to fill in based on the prompt.

ControlReferenceTypeConverter
CountTokensConfig

Config for the count_tokens method.

CountTokensResponse

Response for counting tokens.

CreateAuthTokenConfig

Optional parameters.

CreateBatchJobConfig

Config for optional parameters.

CreateCachedContentConfig

Optional configuration for cached content creation.

CreateEmbeddingsBatchJobConfig

Config for optional parameters.

CreateFileConfig

Used to override the default configuration.

CreateFileResponse

Response for the create file method.

CreateTuningJobConfig

Fine-tuning job creation request - optional fields.

CustomCodeExecutionResult

Result for custom code execution metric. This data type is not supported in Gemini API.

CustomOutput

Spec for custom output. This data type is not supported in Gemini API.

CustomizedAvatar

Configures the customized avatar to be used in the session.

DatasetDistribution

Distribution computed over a tuning dataset. This data type is not supported in Gemini API.

DatasetDistributionDistributionBucket

Dataset bucket used to create a histogram for the distribution given a population of values. This data type is not supported in Gemini API.

DatasetStats

Statistics computed over a tuning dataset. This data type is not supported in Gemini API.

DeleteBatchJobConfig

Optional parameters for models.get method.

DeleteCachedContentConfig

Optional parameters for caches.delete method.

DeleteCachedContentResponse

Empty response for caches.delete method.

DeleteFileConfig

Used to override the default configuration.

DeleteFileResponse

Response for the delete file method.

DeleteModelConfig

Configuration for deleting a tuned model.

DeleteModelResponse
DeleteResourceJob

The return value of delete operation.

DistillationDataStats

Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. This data type is not supported in Gemini API.

DistillationHyperParameters

Distillation hyperparameters for tuning.

DistillationSamplingSpec

Distillation sampling spec for tuning.

DistillationSpec

Distillation tuning spec for tuning.

DownloadFileConfig

Used to override the default configuration.

DynamicRetrievalConfig

Describes the options to customize dynamic retrieval.

DynamicRetrievalConfigModeConverter
EditImageConfig

Configuration for editing an image.

EditImageResponse

Response for the request to edit an image.

EditModeConverter
EmbedContentBatch

Parameters for the embed_content method.

EmbedContentConfig

Optional parameters for the embed_content method.

EmbedContentMetadata

Request-level metadata for the Gemini Enterprise Agent Platform Embed Content API.

EmbedContentResponse

Response for the embed_content method.

EmbeddingApiTypeConverter
EmbeddingsBatchJobSource
EncryptionSpec

Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. This data type is not supported in Gemini API.

EndSensitivityConverter
Endpoint

An endpoint where you deploy models.

EnterpriseWebSearch

Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API.

EntityLabel

An entity representing the segmented area.

EnvironmentConverter
EvaluateDatasetResponse

The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API.

EvaluateDatasetRun

Evaluate Dataset Run Result for Tuning Job. This data type is not supported in Gemini API.

EvaluationDataset

The dataset used for evaluation. This data type is not supported in Gemini API.

ExactMatchMetricValue

Exact match metric value for an instance. This data type is not supported in Gemini API.

ExecutableCode

Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the CodeExecution tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated.

ExternalApi

Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. This data type is not supported in Gemini API.

ExternalApiElasticSearchParams

The search parameters to use for the ELASTIC_SEARCH spec. This data type is not supported in Gemini API.

ExternalApiSimpleSearchParams

The search parameters to use for SIMPLE_SEARCH spec. This data type is not supported in Gemini API.

FeatureSelectionPreferenceConverter
FetchPredictOperationConfig
File

A file uploaded to the API.

FileData

URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage.

FileSearch

The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API. This data type is not supported in Vertex AI.

FileSourceConverter
FileStateConverter
FileStatus

Status of a File that uses a common error model.

FinishReasonConverter
FullFineTuningSpec

Tuning Spec for Full Fine Tuning. This data type is not supported in Gemini API.

FunctionCall

A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values.

FunctionCallingConfig

Function calling config.

FunctionCallingConfigModeConverter
FunctionDeclaration

Structured representation of a function declaration as defined by the OpenAPI 3.0 specification (https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

FunctionResponse

The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a FunctionCall made based on model prediction.

FunctionResponseBlob

Raw media bytes for function response. Text should not be sent as raw bytes, use the 'text' field.

FunctionResponseFileData

URI based data for function response. This data type is not supported in Gemini API.

FunctionResponsePart

A datatype containing media that is part of a FunctionResponse message. A FunctionResponsePart consists of data which has an associated datatype. A FunctionResponsePart can only contain one of the accepted types in FunctionResponsePart.data. A FunctionResponsePart must have a fixed IANA MIME type identifying the type and subtype of the media if the inline_data field is filled with raw bytes.

FunctionResponseSchedulingConverter
GcsSource

The Google Cloud Storage location for the input content. This data type is not supported in Gemini API.

GeminiPreferenceExample

Input example for preference optimization. This data type is not supported in Gemini API.

GeminiPreferenceExampleCompletion

Completion and its preference score. This data type is not supported in Gemini API.

GenerateContentConfig

Optional model configuration parameters. For more information, see Content generation parameters (https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters).

GenerateContentResponse

Response message for PredictionService.GenerateContent.

GenerateContentResponsePromptFeedback

Content filter results for a prompt sent in the request. Note: This is sent only in the first stream chunk and only if no candidates were generated due to content violations.

GenerateContentResponseUsageMetadata

Usage metadata about the content generation request and response. This message provides a detailed breakdown of token usage and other relevant metrics. This data type is not supported in Gemini API.

GenerateImagesConfig

The config for generating an images.

GenerateImagesResponse

The output images response.

GenerateVideosConfig

Configuration for generating videos.

GenerateVideosOperation

A video generation operation.

GenerateVideosResponse

Response with generated videos.

GenerateVideosSource

A set of source input(s) for video generation.

GeneratedImage

An output image.

GeneratedImageMask

A generated image mask.

GeneratedVideo

A generated video.

GenerationConfig

Generation config.

GenerationConfigRoutingConfig

The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. This data type is not supported in Gemini API.

GenerationConfigRoutingConfigAutoRoutingMode

The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API.

GenerationConfigRoutingConfigManualRoutingMode

The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. This data type is not supported in Gemini API.

GenerationConfigThinkingConfig

Config for thinking features.

GetBatchJobConfig

Optional parameters.

GetCachedContentConfig

Optional parameters for caches.get method.

GetFileConfig

Used to override the default configuration.

GetModelConfig

Optional parameters for models.get method.

GetOperationConfig
GetTuningJobConfig

Optional parameters for tunings.get method.

GoogleMaps

Tool to retrieve knowledge from Google Maps.

GoogleRpcStatus

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). This data type is not supported in Gemini API.

GoogleSearch

GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.

GoogleSearchRetrieval

Tool to retrieve public web data for grounding, powered by Google.

GoogleTypeDate

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp. This data type is not supported in Gemini API.

GroundingChunk

A piece of evidence that supports a claim made by the model. This is used to show a citation for a claim made by the model. When grounding is enabled, the model returns a GroundingChunk that contains a reference to the source of the information.

GroundingChunkCustomMetadata

User provided metadata about the GroundingFact. This data type is not supported in Vertex AI.

GroundingChunkImage

An Image chunk is a piece of evidence that comes from an image search result. It contains the URI of the image search result and the URI of the image. This is used to provide the user with a link to the source of the information.

GroundingChunkMaps

A Maps chunk is a piece of evidence that comes from Google Maps. It contains information about a place, such as its name, address, and reviews. This is used to provide the user with rich, location-based information.

GroundingChunkMapsPlaceAnswerSources

The sources that were used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as URIs to flag content.

GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution

Author attribution for a photo or review.

GroundingChunkMapsPlaceAnswerSourcesReviewSnippet

Encapsulates a review snippet.

GroundingChunkMapsRoute

Route information from Google Maps. This data type is not supported in Gemini API.

GroundingChunkRetrievedContext

Context retrieved from a data source to ground the model's response. This is used when a retrieval tool fetches information from a user-provided corpus or a public dataset.

GroundingChunkStringList

A list of string values. This data type is not supported in Vertex AI.

GroundingChunkWeb

A Web chunk is a piece of evidence that comes from a web page. It contains the URI of the web page, the title of the page, and the domain of the page. This is used to provide the user with a link to the source of the information.

GroundingMetadata

Information for various kinds of grounding.

GroundingMetadataSourceFlaggingUri

A URI that can be used to flag a place or review for inappropriate content. This is populated only when the grounding source is Google Maps. This data type is not supported in Gemini API.

GroundingSupport

Grounding support.

HarmBlockMethodConverter
HarmBlockThresholdConverter
HarmCategoryConverter
HarmProbabilityConverter
HarmSeverityConverter
HttpElementLocationConverter
HttpOptions

HTTP options to be used in each of the requests.

HttpResponse

A wrapper class for the http response.

Image

An image.

ImageConfig

The image generation configuration to be used in GenerateContentConfig.

ImageConfigImageOutputOptions

The image output format for generated images. This data type is not supported in Gemini API.

ImagePromptLanguageConverter
ImageResizeModeConverter
ImageSearch

Image search for grounding and related configurations.

ImportFileOperation

Long-running operation for importing a file to a FileSearchStore.

ImportFileResponse

Response for ImportFile to import a File API file with a file search store.

InlinedEmbedContentResponse

Config for inlined_embedding_responses parameter.

InlinedRequest

Config for inlined request.

InlinedResponse

Config for inlined_responses parameter.

Interval

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.

JobError

Job error.

JobStateConverter
LanguageAuto

Indicates the language of the audio should be automatically detected.

LanguageConverter
LanguageHints

Provides hints to the model about possible languages present in the audio.

LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.

ListBatchJobsConfig

Config for optional parameters.

ListBatchJobsResponse

Config for batches.list return value.

ListCachedContentsConfig

Config for caches.list method.

ListCachedContentsResponse
ListFilesConfig

Used to override the default configuration.

ListFilesResponse

Response for the list files method.

ListModelsConfig
ListModelsResponse
ListTuningJobsConfig

Configuration for the list tuning jobs method.

ListTuningJobsResponse

Response for the list tuning jobs method.

LiveClientContent

Incremental update of the current conversation delivered from the client. All the content here will unconditionally be appended to the conversation history and used as part of the prompt to the model to generate content. A message here will interrupt any current model generation.

LiveClientMessage

Messages sent by the client in the API call.

LiveClientRealtimeInput

User input that is sent in real time. This is different from LiveClientContent in a few ways: - Can be sent continuously without interruption to model generation. - If there is a need to mix data interleaved across the LiveClientContent and the LiveClientRealtimeInput, server attempts to optimize for best response, but there are no guarantees. - End of turn is not explicitly specified, but is rather derived from user activity (for example, end of speech). - Even before the end of turn, the data is processed incrementally to optimize for a fast start of the response from the model. - Is always assumed to be the user's input (cannot be used to populate conversation history).

LiveClientSetup

Message contains configuration that will apply for the duration of the streaming session.

LiveClientToolResponse

Client generated response to a ToolCall received from the server. Individual FunctionResponse objects are matched to the respective FunctionCall objects by the id field. Note that in the unary and server-streaming GenerateContent APIs function calling happens by exchanging the Content parts, while in the bidi GenerateContent APIs function calling happens over this dedicated set of messages.

LiveConnectConfig

Session config for the API connection.

LiveConnectConstraints

Config for LiveConnectConstraints for Auth Token creation.

LiveConnectParameters

Parameters for connecting to the live API.

LiveSendClientContentParameters

Parameters for sending client content to the live API.

LiveSendRealtimeInputParameters

Parameters for sending realtime input to the live API.

LiveSendToolResponseParameters

Parameters for sending tool responses to the live API.

LiveServerContent

Incremental server update generated by the model in response to client messages. Content is generated as quickly as possible, and not in real time. Clients may choose to buffer and play it out in real time.

LiveServerGoAway

Server will not be able to service client soon.

LiveServerMessage

Response message for API call.

LiveServerSessionResumptionUpdate

Update of the session resumption state. Only sent if session_resumption was set in the connection config.

LiveServerSetupComplete

Sent in response to a LiveGenerateContentSetup message from the client.

LiveServerToolCall

Request for the client to execute the function_calls and return the responses with the matching ids.

LiveServerToolCallCancellation

Notification for the client that a previously issued ToolCallMessage with the specified ids should have been not executed and should be cancelled. If there were side-effects to those tool calls, clients may attempt to undo the tool calls. This message occurs only in cases where the clients interrupt server turns.

LogprobsResult

The log probabilities of the tokens generated by the model. This is useful for understanding the model's confidence in its predictions and for debugging. For example, you can use log probabilities to identify when the model is making a less confident prediction or to explore alternative responses that the model considered. A low log probability can also indicate that the model is "hallucinating" or generating factually incorrect information.

LogprobsResultCandidate

A single token and its associated log probability.

LogprobsResultTopCandidates

A list of the top candidate tokens and their log probabilities at each decoding step. This can be used to see what other tokens the model considered.

MaskReferenceConfig

Configuration for a Mask reference image.

MaskReferenceImage

A mask reference image. This encapsulates either a mask image provided by the user and configs for the user provided mask, or only config parameters for the model to generate a mask. A mask image is an image whose non-zero values indicate where to edit the base image. If the user provides a mask image, the mask must be in the same dimensions as the raw image.

MaskReferenceModeConverter
MatchOperationConverter
McpServer

A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6. This data type is not supported in Vertex AI.

MediaModalityConverter
MediaResolutionConverter
ModalityConverter
ModalityTokenCount

Represents a breakdown of token usage by modality. This message is used in CountTokensResponse and GenerateContentResponse.UsageMetadata to provide a detailed view of how many tokens are used by each modality (e.g., text, image, video) in a request. This is particularly useful for multimodal models, allowing you to track and manage token consumption for billing and quota purposes.

Model

A trained machine learning model.

ModelArmorConfig

Configuration for Model Armor. Model Armor is a Google Cloud service that provides safety and security filtering for prompts and responses. It helps protect your AI applications from risks such as harmful content, sensitive data leakage, and prompt injection attacks. This data type is not supported in Gemini API.

ModelSelectionConfig

Config for model selection.

ModelStageConverter
ModelStatus

The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. This data type is not supported in Vertex AI.

MultiSpeakerVoiceConfig

Configuration for a multi-speaker text-to-speech request.

Operation<TOperation>

An abstract operation.

OutcomeConverter
OutputInfo

Describes the info for output of EvaluationService. This data type is not supported in Gemini API.

PairwiseChoiceConverter
PairwiseMetricResult

Spec for pairwise metric result. This data type is not supported in Gemini API.

Part

A datatype containing media content. Exactly one field within a Part should be set, representing the specific type of content being conveyed. Using multiple fields within the same Part instance is considered invalid.

PartMediaResolution

Media resolution for the input media.

PartMediaResolutionLevelConverter
PartialArg

Partial argument value of the function call. This data type is not supported in Gemini API.

PartnerModelTuningSpec

Tuning spec for Partner models. This data type is not supported in Gemini API.

PersonGenerationConverter
PhishBlockThresholdConverter
PointwiseMetricResult

Spec for pointwise metric result. This data type is not supported in Gemini API.

PreTunedModel

A pre-tuned model for continuous tuning. This data type is not supported in Gemini API.

PrebuiltVoiceConfig

Configuration for a prebuilt voice.

PreferenceOptimizationDataStats

Statistics computed for datasets used for preference optimization. This data type is not supported in Gemini API.

PreferenceOptimizationHyperParameters

Hyperparameters for Preference Optimization. This data type is not supported in Gemini API.

PreferenceOptimizationSpec

Preference optimization tuning spec for tuning.

ProactivityConfig

Config for proactivity features.

ProductImage

An image of the product.

ProminentPeopleConverter
RagChunk

A RagChunk includes the content of a chunk of a RagFile, and associated metadata. This data type is not supported in Gemini API.

RagChunkPageSpan

Represents where the chunk starts and ends in the document. This data type is not supported in Gemini API.

RagRetrievalConfig

Specifies the context retrieval config. This data type is not supported in Gemini API.

RagRetrievalConfigFilter

Config for filters. This data type is not supported in Gemini API.

RagRetrievalConfigHybridSearch

Config for Hybrid Search. This data type is not supported in Gemini API.

RagRetrievalConfigRanking

Config for ranking and reranking. This data type is not supported in Gemini API.

RagRetrievalConfigRankingLlmRanker

Config for LlmRanker. This data type is not supported in Gemini API.

RagRetrievalConfigRankingRankService

Config for Rank Service. This data type is not supported in Gemini API.

RawOutput

Raw output. This data type is not supported in Gemini API.

RawReferenceImage

A raw reference image. A raw reference image represents the base image to edit, provided by the user. It can optionally be provided in addition to a mask reference image or a style reference image.

RealtimeInputConfig

Marks the end of user activity. This can only be sent if automatic (i.e. server-side) activity detection is disabled.

RecontextImageConfig

Configuration for recontextualizing an image.

RecontextImageResponse

The output images response.

RecontextImageSource

A set of source input(s) for image recontextualization.

RegisterFilesConfig

Used to override the default configuration.

RegisterFilesResponse

Response for the _register file method.

ReinforcementTuningAutoraterScorer

Reinforcement tuning autorater scorer.

ReinforcementTuningAutoraterScorerExactMatchScorer

Scores autorater responses by using exact string match reward scorer.

ReinforcementTuningAutoraterScorerParsedResponseConversionScorer

Scores responses by directly converting parsed autorater response to float reward (reward is clipped to be within [-1, 1]).

ReinforcementTuningCloudRunRewardScorer

Scores parsed responses by calling a Cloud Run service.

ReinforcementTuningCodeExecutionRewardScorer

Scores parsed responses for code execution use cases.

ReinforcementTuningExample

User-facing format for Gemini Reinforcement Tuning examples on Vertex.

ReinforcementTuningHyperParameters

Hyperparameters for Reinforcement Tuning.

ReinforcementTuningParseResponseConfig

Defines how to parse sample response for reinforcement tuning.

ReinforcementTuningRewardInfo

The reward info for a reward function.

ReinforcementTuningSpec

Reinforcement tuning spec for tuning.

ReinforcementTuningStringMatchRewardScorer

Scores parsed responses for string matching use cases.

ReinforcementTuningStringMatchRewardScorerJsonMatchExpression

Converts parsed responses to JSON format, finds the first-level matching key, then performs StringMatchExpression on the value.

ReinforcementTuningStringMatchRewardScorerStringMatchExpression

Evaluates parsed response using match type against expression.

ReinforcementTuningThinkingLevelConverter
ReplayFile

Represents a recorded session.

ReplayInteraction

Represents a single interaction, request and response in a replay.

ReplayRequest

Represents a single request in a replay.

ReplayResponse

Represents a single response in a replay.

ReplicatedVoiceConfig

The configuration for the replicated voice to use.

ResourceScopeConverter
ResponseParseTypeConverter
Retrieval

Defines a retrieval tool that model can call to access external knowledge. This data type is not supported in Gemini API.

RetrievalConfig

Retrieval config.

RetrievalMetadata

Metadata returned to client when grounding is enabled.

RougeMetricValue

Rouge metric value for an instance. This data type is not supported in Gemini API.

SafetyAttributes

Safety attributes of a GeneratedImage or the user-provided prompt.

SafetyFilterLevelConverter
SafetyPolicyConverter
SafetyRating

A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level.

SafetySetting

A safety setting that affects the safety-blocking behavior. A SafetySetting consists of a harm category and a threshold for that category.

Schema

Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object (https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.

ScribbleImage

An image mask representing a brush scribble.

SearchEntryPoint

The entry point used to search for grounding sources.

SearchTypes

Different types of search that can be enabled on the GoogleSearch tool.

Segment

Segment of the content this support belongs to.

SegmentImageConfig

Configuration for segmenting an image.

SegmentImageResponse

The output images response.

SegmentImageSource

A set of source input(s) for image segmentation.

SegmentModeConverter
ServiceTierConverter
SessionResumptionConfig

Configuration of session resumption mechanism. Included in LiveConnectConfig.session_resumption. If included server will send LiveServerSessionResumptionUpdate messages.

SingleEmbedContentResponse

Config for response parameter.

SingleReinforcementTuningRewardConfig

Single reinforcement tuning reward config.

SlidingWindow

Context window will be truncated by keeping only suffix of it. Context window will always be cut at start of USER role turn. System instructions and BidiGenerateContentSetup.prefix_turns will not be subject to the sliding window mechanism, they will always stay at the beginning of context window.

SpeakerVoiceConfig

Configuration for a single speaker in a multi-speaker setup.

SpeechConfig

Config for speech generation and transcription.

StartSensitivityConverter
StreamableHttpTransport

A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI.

StyleReferenceConfig

Configuration for a Style reference image.

StyleReferenceImage

A style reference image. This encapsulates a style reference image provided by the user, and additionally optional config parameters for the style reference image. A raw reference image can also be provided as a destination for the style to be applied to.

SubjectReferenceConfig

Configuration for a Subject reference image.

SubjectReferenceImage

A subject reference image. This encapsulates a subject reference image provided by the user, and additionally optional config parameters for the subject reference image. A raw reference image can also be provided as a destination for the subject to be applied to.

SubjectReferenceTypeConverter
SupervisedHyperParameters

Hyperparameters for SFT. This data type is not supported in Gemini API.

SupervisedTuningDataStats

Tuning data statistics for Supervised Tuning. This data type is not supported in Gemini API.

SupervisedTuningDatasetDistribution

Dataset distribution for Supervised Tuning. This data type is not supported in Gemini API.

SupervisedTuningDatasetDistributionDatasetBucket

Dataset bucket used to create a histogram for the distribution given a population of values. This data type is not supported in Gemini API.

SupervisedTuningSpec

Supervised tuning spec for tuning.

TestTableFile
TestTableItem
ThinkingConfig

The thinking features configuration.

ThinkingLevelConverter
TokensInfo

Tokens info with a list of tokens and the corresponding list of token ids.

Tool

Tool details of a tool that the model may use to generate a response.

ToolCall

A predicted server-side ToolCall returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this ToolCall. Instead, the client should pass this ToolCall back to the API in a subsequent turn within a Content message, along with the corresponding ToolResponse.

ToolCodeExecution

Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. This data type is not supported in Gemini API.

ToolConfig

Tool config. This config is shared for all tools provided in the request.

ToolParallelAiSearch

ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API.

ToolResponse

The output from a server-side ToolCall execution. This message contains the results of a tool invocation that was initiated by a ToolCall from the model. The client should pass this ToolResponse back to the API in a subsequent turn within a Content message, along with the corresponding ToolCall.

ToolTypeConverter
TrafficTypeConverter
Transcription

Audio transcription in Server Content.

TranslationConfig

Config for stream translation.

TunedModel

TunedModel for the Tuned Model of a Tuning Job.

TunedModelCheckpoint

TunedModelCheckpoint for the Tuned Model of a Tuning Job.

TunedModelInfo

A tuned machine learning model.

TuningDataStats

The tuning data statistic values for TuningJob. This data type is not supported in Gemini API.

TuningDataset

Supervised fine-tuning training dataset.

TuningExample

A single example for tuning. This data type is not supported in Vertex AI.

TuningJob

A tuning job.

TuningJobMetadata

Tuning job metadata. This data type is not supported in Gemini API.

TuningJobStateConverter
TuningMethodConverter
TuningModeConverter
TuningOperation

A long-running operation.

TuningSpeedConverter
TuningTaskConverter
TuningValidationDataset
TurnCompleteReasonConverter
TurnCoverageConverter
TypeConverter
UpdateCachedContentConfig

Optional parameters for caches.update method.

UpdateModelConfig

Configuration for updating a tuned model.

UploadFileConfig

Used to override the default configuration.

UploadToFileSearchStoreOperation

Long-running operation for uploading a file to a FileSearchStore.

UploadToFileSearchStoreResponse

The response when long-running operation for uploading a file to a FileSearchStore complete.

UpscaleImageConfig

Configuration for upscaling an image. For more information on this configuration, refer to the Imagen API reference documentation (https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api).

UpscaleImageResponse
UrlContext

Tool to support URL context.

UrlContextMetadata

Metadata returned when the model uses the url_context tool to get information from a user-provided URL.

UrlMetadata

The metadata for a single URL retrieval.

UrlRetrievalStatusConverter
UsageMetadata

Usage metadata about response(s).

VadSignalTypeConverter
ValidateRewardConfig

Optional parameters for tunings.validate_reward.

ValidateRewardResponse

Response for the validate_reward method. Contains the computed reward for a reinforcement tuning reward configuration.

VeoHyperParameters

Hyperparameters for Veo. This data type is not supported in Gemini API.

VeoLoraTuningSpec

Tuning Spec for Veo LoRA Model Tuning. This data type is not supported in Gemini API.

VeoTuningSpec

Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API.

VertexAISearch

Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder. This data type is not supported in Gemini API.

VertexAISearchDataStoreSpec

Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec. This data type is not supported in Gemini API.

VertexMultimodalDatasetDestination

This class is experimental and may change in future versions. The specification for an output Vertex AI multimodal dataset.

VertexRagStore

Retrieve from Vertex RAG Store for grounding. This data type is not supported in Gemini API.

VertexRagStoreRagResource

The definition of the Rag resource. This data type is not supported in Gemini API.

Video

A generated video.

VideoCompressionQualityConverter
VideoGenerationMask

A mask for video generation.

VideoGenerationMaskModeConverter
VideoGenerationReferenceImage

A reference image for video generation.

VideoGenerationReferenceTypeConverter
VideoMetadata

Provides metadata for a video, including the start and end offsets for clipping and the frame rate.

VideoOrientationConverter
VoiceActivity

Voice activity signal.

VoiceActivityDetectionSignal
VoiceActivityTypeConverter
VoiceConfig

The configuration for the voice to use.

WebSearch

Standard web search for grounding and related configurations. Only text results are returned.

WebhookConfig

Configuration for webhook notifications. Used to configure webhook endpoints that will receive notifications when long-running operations (e.g., batch jobs, video generation) complete.

Structs

ActivityHandling

The different ways of handling user activity.

AdapterSize

Adapter size for tuning. This enum is not supported in Gemini API.

AggregationMetric

Aggregation metric. This enum is not supported in Gemini API.

ApiSpec

The API spec that the external API implements. This enum is not supported in Gemini API.

AuthType

Type of auth scheme. This enum is not supported in Gemini API.

Behavior

Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.

BlockedReason

Output only. The reason why the prompt was blocked.

ControlReferenceType

Enum representing the control type of a control reference image.

DynamicRetrievalConfigMode

The mode of the predictor to be used in dynamic retrieval.

EditMode

Enum representing the editing mode.

EmbeddingApiType

Enum representing the Gemini Enterprise Agent Platform embedding API to use.

EndSensitivity

End of speech sensitivity.

Environment

The environment being operated.

FeatureSelectionPreference

Options for feature selection preference.

FileSource

Source of the File.

FileState

State for the lifecycle of a File.

FinishReason

Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.

FunctionCallingConfigMode

Function calling mode.

FunctionResponseScheduling

Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.

HarmBlockMethod

The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API.

HarmBlockThreshold

The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked.

HarmCategory

The harm category to be blocked.

HarmProbability

Output only. The probability of harm for this category.

HarmSeverity

Output only. The severity of harm for this category. This enum is not supported in Gemini API.

HttpElementLocation

The location of the API key. This enum is not supported in Gemini API.

ImagePromptLanguage

Enum that specifies the language of the text in the prompt.

ImageResizeMode

Resize mode for the image input for video generation.

JobState

Job state.

Language

Programming language of the code.

MaskReferenceMode

Enum representing the mask mode of a mask reference image.

MatchOperation

Match operation to use for evaluation.

MediaModality

The modality that this token count applies to.

MediaResolution

The media resolution to use.

Modality

Server content modalities.

ModelStage

The stage of the underlying model. This enum is not supported in Vertex AI.

Outcome

Outcome of the code execution.

PairwiseChoice

Output only. Pairwise metric choice. This enum is not supported in Gemini API.

PartMediaResolutionLevel

The tokenization quality used for given media.

PersonGeneration

Enum that controls the generation of people.

PhishBlockThreshold

Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API.

ProminentPeople

Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people. This enum is not supported in Gemini API.

ReinforcementTuningThinkingLevel

Represents how much to think for the tuning job.

ResourceScope

Resource scope.

ResponseParseType

Defines how to parse sample response.

SafetyFilterLevel

Enum that controls the safety filter level for objectionable content.

SafetyPolicy

SafetyPolicy

SegmentMode

Enum that represents the segmentation mode.

ServiceTier

Pricing and performance service tier.

StartSensitivity

Start of speech sensitivity.

SubjectReferenceType

Enum representing the subject type of a subject reference image.

ThinkingLevel

The number of thoughts tokens that the model should generate.

ToolType

The type of tool in the function call.

TrafficType

Output only. The traffic type for this request. This enum is not supported in Gemini API.

TuningJobState

Output only. The detail state of the tuning job (while the overall JobState is running). This enum is not supported in Gemini API.

TuningMethod

Enum representing the tuning method.

TuningMode

Tuning mode. This enum is not supported in Gemini API.

TuningSpeed

The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API.

TuningTask

The tuning task for Veo. This enum is not supported in Gemini API.

TurnCompleteReason

The reason why the turn is complete.

TurnCoverage

Options about which input is included in the user's turn.

Type

Data type of the schema field.

UrlRetrievalStatus

The status of the URL retrieval.

VadSignalType

The type of the VAD signal.

VideoCompressionQuality

Enum that controls the compression quality of the generated videos.

VideoGenerationMaskMode

Enum for the mask mode of a video generation mask.

VideoGenerationReferenceType

Enum for the reference type of a video generation reference image.

VideoOrientation

The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API.

VoiceActivityType

The type of the voice activity signal.

Interfaces

IReferenceImage

The interface for ReferenceImage.