Package google.cloud.aiplatform.v1beta1

Index

EvaluationService

Vertex AI Online Evaluation Service.

EvaluateInstances

rpc EvaluateInstances(EvaluateInstancesRequest) returns (EvaluateInstancesResponse)

Evaluates instances based on a given metric.

ExtensionExecutionService

A service for Extension execution.

ExecuteExtension

rpc ExecuteExtension(ExecuteExtensionRequest) returns (ExecuteExtensionResponse)

Executes the request against a given extension.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.extensions.execute

For more information, see the IAM documentation.

QueryExtension

rpc QueryExtension(QueryExtensionRequest) returns (QueryExtensionResponse)

Queries an extension with a default controller.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.extensions.execute

For more information, see the IAM documentation.

ExtensionRegistryService

A service for managing Vertex AI's Extension registry.

DeleteExtension

rpc DeleteExtension(DeleteExtensionRequest) returns (Operation)

Deletes an Extension.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.extensions.delete

For more information, see the IAM documentation.

GetExtension

rpc GetExtension(GetExtensionRequest) returns (Extension)

Gets an Extension.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.extensions.get

For more information, see the IAM documentation.

ImportExtension

rpc ImportExtension(ImportExtensionRequest) returns (Operation)

Imports an Extension.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.extensions.import

For more information, see the IAM documentation.

ListExtensions

rpc ListExtensions(ListExtensionsRequest) returns (ListExtensionsResponse)

Lists Extensions in a location.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.extensions.list

For more information, see the IAM documentation.

UpdateExtension

rpc UpdateExtension(UpdateExtensionRequest) returns (Extension)

Updates an Extension.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.extensions.update

For more information, see the IAM documentation.

GenAiCacheConfigService

Service for GenAI Cache Config.

GetCacheConfig

rpc GetCacheConfig(GetCacheConfigRequest) returns (CacheConfig)

Gets a GenAI cache config.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.cacheConfigs.get

For more information, see the IAM documentation.

UpdateCacheConfig

rpc UpdateCacheConfig(UpdateCacheConfigRequest) returns (Operation)

Updates a cache config.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.cacheConfigs.update

For more information, see the IAM documentation.

GenAiCacheService

Service for managing Vertex AI's CachedContent resource.

CreateCachedContent

rpc CreateCachedContent(CreateCachedContentRequest) returns (CachedContent)

Creates cached content, this call will initialize the cached content in the data storage, and users need to pay for the cache data storage.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.cachedContents.create

For more information, see the IAM documentation.

DeleteCachedContent

rpc DeleteCachedContent(DeleteCachedContentRequest) returns (Empty)

Deletes cached content

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.cachedContents.delete

For more information, see the IAM documentation.

GetCachedContent

rpc GetCachedContent(GetCachedContentRequest) returns (CachedContent)

Gets cached content configurations

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.cachedContents.get

For more information, see the IAM documentation.

ListCachedContents

rpc ListCachedContents(ListCachedContentsRequest) returns (ListCachedContentsResponse)

Lists cached contents in a project

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.cachedContents.list

For more information, see the IAM documentation.

UpdateCachedContent

rpc UpdateCachedContent(UpdateCachedContentRequest) returns (CachedContent)

Updates cached content configurations

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.cachedContents.update

For more information, see the IAM documentation.

GenAiTuningService

A service for creating and managing GenAI Tuning Jobs.

CancelTuningJob

rpc CancelTuningJob(CancelTuningJobRequest) returns (Empty)

Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a TuningJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and TuningJob.state is set to CANCELLED.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.tuningJobs.cancel

For more information, see the IAM documentation.

CreateTuningJob

rpc CreateTuningJob(CreateTuningJobRequest) returns (TuningJob)

Creates a TuningJob. A created TuningJob right away will be attempted to be run.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.tuningJobs.create

For more information, see the IAM documentation.

GetTuningJob

rpc GetTuningJob(GetTuningJobRequest) returns (TuningJob)

Gets a TuningJob.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.tuningJobs.get

For more information, see the IAM documentation.

ListTuningJobs

rpc ListTuningJobs(ListTuningJobsRequest) returns (ListTuningJobsResponse)

Lists TuningJobs in a Location.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.tuningJobs.list

For more information, see the IAM documentation.

RebaseTunedModel

rpc RebaseTunedModel(RebaseTunedModelRequest) returns (Operation)

Rebase a TunedModel.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.tuningJobs.create

For more information, see the IAM documentation.

PredictionService

A service for online predictions and explanations.

ChatCompletions

rpc ChatCompletions(ChatCompletionsRequest) returns (HttpBody)

Exposes an OpenAI-compatible endpoint for chat completions.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

CountTokens

rpc CountTokens(CountTokensRequest) returns (CountTokensResponse)

Perform a token counting.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

GenerateContent

rpc GenerateContent(GenerateContentRequest) returns (GenerateContentResponse)

Generate content with multimodal inputs.

IAM Permissions

Requires the following IAM permission on the model resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

Predict

rpc Predict(PredictRequest) returns (PredictResponse)

Perform an online prediction.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

ServerStreamingPredict

rpc ServerStreamingPredict(StreamingPredictRequest) returns (StreamingPredictResponse)

Perform a server-side streaming online prediction request for Vertex LLM streaming.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

StreamDirectPredict

rpc StreamDirectPredict(StreamDirectPredictRequest) returns (StreamDirectPredictResponse)

Perform a streaming online prediction request to a gRPC model server for Vertex first-party products and frameworks.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

StreamDirectRawPredict

rpc StreamDirectRawPredict(StreamDirectRawPredictRequest) returns (StreamDirectRawPredictResponse)

Perform a streaming online prediction request to a gRPC model server for custom containers.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

StreamGenerateContent

rpc StreamGenerateContent(GenerateContentRequest) returns (GenerateContentResponse)

Generate content with multimodal inputs with streaming support.

IAM Permissions

Requires the following IAM permission on the model resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

StreamingPredict

rpc StreamingPredict(StreamingPredictRequest) returns (StreamingPredictResponse)

Perform a streaming online prediction request for Vertex first-party products and frameworks.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

StreamingRawPredict

rpc StreamingRawPredict(StreamingRawPredictRequest) returns (StreamingRawPredictResponse)

Perform a streaming online prediction request through gRPC.

IAM Permissions

Requires the following IAM permission on the endpoint resource:

  • aiplatform.endpoints.predict

For more information, see the IAM documentation.

ReasoningEngineExecutionService

A service for executing queries on Reasoning Engine.

QueryReasoningEngine

rpc QueryReasoningEngine(QueryReasoningEngineRequest) returns (QueryReasoningEngineResponse)

Queries using a reasoning engine.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.reasoningEngines.query

For more information, see the IAM documentation.

ReasoningEngineService

A service for managing Vertex AI's Reasoning Engines.

CreateReasoningEngine

rpc CreateReasoningEngine(CreateReasoningEngineRequest) returns (Operation)

Creates a reasoning engine.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.reasoningEngines.create

For more information, see the IAM documentation.

DeleteReasoningEngine

rpc DeleteReasoningEngine(DeleteReasoningEngineRequest) returns (Operation)

Deletes a reasoning engine.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.reasoningEngines.delete

For more information, see the IAM documentation.

GetReasoningEngine

rpc GetReasoningEngine(GetReasoningEngineRequest) returns (ReasoningEngine)

Gets a reasoning engine.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.reasoningEngines.get

For more information, see the IAM documentation.

ListReasoningEngines

rpc ListReasoningEngines(ListReasoningEnginesRequest) returns (ListReasoningEnginesResponse)

Lists reasoning engines in a location.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.reasoningEngines.list

For more information, see the IAM documentation.

UpdateReasoningEngine

rpc UpdateReasoningEngine(UpdateReasoningEngineRequest) returns (Operation)

Updates a reasoning engine.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.reasoningEngines.update

For more information, see the IAM documentation.

VertexRagDataService

A service for managing user data for RAG.

CreateRagCorpus

rpc CreateRagCorpus(CreateRagCorpusRequest) returns (Operation)

Creates a RagCorpus.

DeleteRagCorpus

rpc DeleteRagCorpus(DeleteRagCorpusRequest) returns (Operation)

Deletes a RagCorpus.

DeleteRagFile

rpc DeleteRagFile(DeleteRagFileRequest) returns (Operation)

Deletes a RagFile.

GetRagCorpus

rpc GetRagCorpus(GetRagCorpusRequest) returns (RagCorpus)

Gets a RagCorpus.

GetRagFile

rpc GetRagFile(GetRagFileRequest) returns (RagFile)

Gets a RagFile.

ImportRagFiles

rpc ImportRagFiles(ImportRagFilesRequest) returns (Operation)

Import files from Google Cloud Storage or Google Drive into a RagCorpus.

ListRagCorpora

rpc ListRagCorpora(ListRagCorporaRequest) returns (ListRagCorporaResponse)

Lists RagCorpora in a Location.

ListRagFiles

rpc ListRagFiles(ListRagFilesRequest) returns (ListRagFilesResponse)

Lists RagFiles in a RagCorpus.

UpdateRagCorpus

rpc UpdateRagCorpus(UpdateRagCorpusRequest) returns (Operation)

Updates a RagCorpus.

VertexRagService

A service for retrieving relevant contexts.

AugmentPrompt

rpc AugmentPrompt(AugmentPromptRequest) returns (AugmentPromptResponse)

Given an input prompt, it returns augmented prompt from vertex rag store to guide LLM towards generating grounded responses.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.locations.get

For more information, see the IAM documentation.

CorroborateContent

rpc CorroborateContent(CorroborateContentRequest) returns (CorroborateContentResponse)

Given an input text, it returns a score that evaluates the factuality of the text. It also extracts and returns claims from the text and provides supporting facts.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.locations.get

For more information, see the IAM documentation.

RetrieveContexts

rpc RetrieveContexts(RetrieveContextsRequest) returns (RetrieveContextsResponse)

Retrieves relevant contexts for a query.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • aiplatform.locations.get

For more information, see the IAM documentation.

ApiAuth

The generic reusable api auth config.

Fields
Union field auth_config. The auth config. auth_config can be only one of the following:
api_key_config ApiKeyConfig

The API secret.

ApiKeyConfig

The API secret.

Fields
api_key_secret_version string

Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}

AugmentPromptRequest

Request message for AugmentPrompt.

Fields
parent string

Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: projects/{project}/locations/{location}.

contents[] Content

Optional. Input content to augment, only text format is supported for now.

model Model

Optional. Metadata of the backend deployed model.

Union field data_source. The data source for retrieving contexts. data_source can be only one of the following:
vertex_rag_store VertexRagStore

Optional. Retrieves contexts from the Vertex RagStore.

Model

Metadata of the backend deployed model.

Fields
model string

Optional. The model that the user will send the augmented prompt for content generation.

model_version string

Optional. The model version of the backend deployed model.

AugmentPromptResponse

Response message for AugmentPrompt.

Fields
augmented_prompt[] Content

Augmented prompt, only text format is supported for now.

facts[] Fact

Retrieved facts from RAG data sources.

AuthConfig

Auth configuration to run the extension.

Fields
auth_type AuthType

Type of auth scheme.

Union field auth_config.

auth_config can be only one of the following:

api_key_config ApiKeyConfig

Config for API key auth.

http_basic_auth_config HttpBasicAuthConfig

Config for HTTP Basic auth.

google_service_account_config GoogleServiceAccountConfig

Config for Google Service Account auth.

oauth_config OauthConfig

Config for user oauth.

oidc_config OidcConfig

Config for user OIDC auth.

ApiKeyConfig

Config for authentication with API key.

Fields
name string

Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name.

api_key_secret string

Required. The name of the SecretManager secret version resource storing the API key. Format: projects/{project}/secrets/{secrete}/versions/{version}

http_element_location HttpElementLocation

Required. The location of the API key.

GoogleServiceAccountConfig

Config for Google Service Account Authentication.

Fields
service_account string

Optional. The service account that the extension execution service runs as.

HttpBasicAuthConfig

Config for HTTP Basic Authentication.

Fields
credential_secret string

Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: projects/{project}/secrets/{secrete}/versions/{version}

OauthConfig

Config for user oauth.

Fields

Union field oauth_config.

oauth_config can be only one of the following:

access_token string

Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.

service_account string

The service account used to generate access tokens for executing the Extension.

OidcConfig

Config for user OIDC auth.

Fields

Union field oidc_config.

oidc_config can be only one of the following:

id_token string

OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.

service_account string

The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc).

AuthType

Type of Auth.

Enums
AUTH_TYPE_UNSPECIFIED
NO_AUTH No Auth.
API_KEY_AUTH API Key Auth.
HTTP_BASIC_AUTH HTTP Basic Auth.
GOOGLE_SERVICE_ACCOUNT_AUTH Google Service Account Auth.
OAUTH OAuth auth.
OIDC_AUTH OpenID Connect (OIDC) Auth.

BigQueryDestination

The BigQuery location for the output content.

Fields
output_uri string

Required. BigQuery URI to a project or table, up to 2000 characters long.

When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist.

Accepted forms:

  • BigQuery path. For example: bq://projectId or bq://projectId.bqDatasetId or bq://projectId.bqDatasetId.bqTableId.

BleuInput

Input for bleu metric.

Fields
metric_spec BleuSpec

Required. Spec for bleu score metric.

instances[] BleuInstance

Required. Repeated bleu instances.

BleuInstance

Spec for bleu instance.

Fields
prediction string

Required. Output of the evaluated model.

reference string

Required. Ground truth used to compare against the prediction.

BleuMetricValue

Bleu metric value for an instance.

Fields
score float

Output only. Bleu score.

BleuResults

Results for bleu metric.

Fields
bleu_metric_values[] BleuMetricValue

Output only. Bleu metric values.

BleuSpec

Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1.

Fields
use_effective_order bool

Optional. Whether to use_effective_order to compute bleu score.

Blob

Content blob.

It's preferred to send as text directly rather than raw bytes.

Fields
mime_type string

Required. The IANA standard MIME type of the source data.

data bytes

Required. Raw bytes.

CacheConfig

Config of GenAI caching features. This is a singleton resource.

Fields
name string

Identifier. Name of the cache config. Format: - projects/{project}/cacheConfig.

disable_cache bool

If set to true, disables GenAI caching. Otherwise caching is enabled.

CachedContent

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

Fields
name string

Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content}

display_name string

Optional. Immutable. The user-generated meaningful display name of the cached content.

model string

Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}

system_instruction Content

Optional. Input only. Immutable. Developer set system instruction. Currently, text only

contents[] Content

Optional. Input only. Immutable. The content to cache

tools[] Tool

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response

tool_config ToolConfig

Optional. Input only. Immutable. Tool config. This config is shared for all tools

create_time Timestamp

Output only. Creatation time of the cache entry.

update_time Timestamp

Output only. When the cache entry was last updated in UTC time.

usage_metadata UsageMetadata

Output only. Metadata on the usage of the cached content.

Union field expiration. Expiration time of the cached content. expiration can be only one of the following:
expire_time Timestamp

Timestamp of when this resource is considered expired. This is always provided on output, regardless of what was sent on input.

ttl Duration

Input only. The TTL for this resource. The expiration time is computed: now + TTL.

UsageMetadata

Metadata on the usage of the cached content.

Fields
total_token_count int32

Total number of tokens that the cached content consumes.

text_count int32

Number of text characters.

image_count int32

Number of images.

video_duration_seconds int32

Duration of video in seconds.

audio_duration_seconds int32

Duration of audio in seconds.

CancelTuningJobRequest

Request message for GenAiTuningService.CancelTuningJob.

Fields
name string

Required. The name of the TuningJob to cancel. Format: projects/{project}/locations/{location}/tuningJobs/{tuning_job}

Candidate

A response candidate generated from the model.

Fields
index int32

Output only. Index of the candidate.

content Content

Output only. Content parts of the candidate.

avg_logprobs double

Output only. Average log probability score of the candidate.

logprobs_result LogprobsResult

Output only. Log-likelihood scores for the response tokens and top tokens

finish_reason FinishReason

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

safety_ratings[] SafetyRating

Output only. List of ratings for the safety of a response candidate.

There is at most one rating per category.

citation_metadata CitationMetadata

Output only. Source attribution of the generated content.

grounding_metadata GroundingMetadata

Output only. Metadata specifies sources used to ground generated content.

finish_message string

Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when finish_reason is set.

FinishReason

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

Enums
FINISH_REASON_UNSPECIFIED The finish reason is unspecified.
STOP Token generation reached a natural stopping point or a configured stop sequence.
MAX_TOKENS Token generation reached the configured maximum output tokens.
SAFETY Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, content is empty if content filters blocks the output.
RECITATION Token generation stopped because the content potentially contains copyright violations.
OTHER All other reasons that stopped the token generation.
BLOCKLIST Token generation stopped because the content contains forbidden terms.
PROHIBITED_CONTENT Token generation stopped for potentially containing prohibited content.
SPII Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).
MALFORMED_FUNCTION_CALL The function call generated by the model is invalid.

ChatCompletionsRequest

Request message for [PredictionService.ChatCompletions]

Fields
endpoint string

Required. The name of the endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

http_body HttpBody

Optional. The prediction input. Supports HTTP headers and arbitrary data payload.

Citation

Source attributions for content.

Fields
start_index int32

Output only. Start index into the content.

end_index int32

Output only. End index into the content.

uri string

Output only. Url reference of the attribution.

title string

Output only. Title of the attribution.

license string

Output only. License of the attribution.

publication_date Date

Output only. Publication date of the attribution.

CitationMetadata

A collection of source attributions for a piece of content.

Fields
citations[] Citation

Output only. List of citations.

Claim

Claim that is extracted from the input text and facts that support it.

Fields
fact_indexes[] int32

Indexes of the facts supporting this claim.

start_index int32