
Google Cloud Vertex AI Embeddings
CertifiedGenerate text embeddings with Google Cloud Vertex AI
Google Cloud Vertex AI Embeddings
Generate text embeddings with Google Cloud Vertex AI
Generates vector embeddings for a single text or batch of texts using Vertex AI foundation models (e.g., text-embedding-005, text-multilingual-embedding-002). Supports downstream task types, document titles, and customizable output dimensionality for vector search and RAG workflows.
type: io.kestra.plugin.gcp.vertexai.EmbeddingsExamples
Generate an embedding for a single search query
id: gcp_vertexai_query_embedding
namespace: company.ai
tasks:
- id: embed_query
type: io.kestra.plugin.gcp.vertexai.Embeddings
projectId: my-gcp-project
region: us-central1
modelId: text-embedding-005
text: "How to configure GCS lifecycle policies?"
taskType: RETRIEVAL_QUERY
outputDimensionality: 768
Generate embeddings for batch document chunks
id: gcp_vertexai_batch_embeddings
namespace: company.ai
tasks:
- id: embed_chunks
type: io.kestra.plugin.gcp.vertexai.Embeddings
projectId: my-gcp-project
region: us-central1
modelId: text-embedding-005
taskType: RETRIEVAL_DOCUMENT
title: "GCS Architecture"
texts:
- "Cloud Storage is an object storage service."
- "Lifecycle rules automate transitions between storage classes."
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-gcp --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.
Properties
region *string
Region
Vertex AI regional endpoint (e.g., us-central1, europe-west1).
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150autoTruncate booleanstring
trueAuto truncate
Whether to automatically truncate input text exceeding the model's token limit. Defaults to true.
impersonatedServiceAccount string
The GCP service account to impersonate
modelId string
text-embedding-005Model ID
Vertex AI embedding model identifier (e.g., text-embedding-005, text-multilingual-embedding-002).
outputDimensionality integerstring
Output dimensionality
Optional reduced dimension size (e.g., 256, 512, 768) supported by modern embedding models.
projectId string
The GCP project ID
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used
serviceAccount string
The GCP service account
When unset or rendered to an empty value, Application Default Credentials are used (e.g. GOOGLE_APPLICATION_CREDENTIALS or the runtime's attached identity).
taskType string
RETRIEVAL_QUERYRETRIEVAL_DOCUMENTSEMANTIC_SIMILARITYCLASSIFICATIONCLUSTERINGQUESTION_ANSWERINGFACT_VERIFICATIONTask type
Intended downstream use case for the embedding vector:
RETRIEVAL_QUERY: Specifies the given text is a query in a search/retrieval setting.RETRIEVAL_DOCUMENT: Specifies the given text is a document in a search/retrieval setting.SEMANTIC_SIMILARITY: Specifies the given text will be used for STS (semantic textual similarity).CLASSIFICATION: Specifies that the embeddings will be used for classification.CLUSTERING: Specifies that the embeddings will be used for clustering.QUESTION_ANSWERING: Specifies that the embeddings will be used for question answering.FACT_VERIFICATION: Specifies that the embeddings will be used for fact verification.
text string
Text
Single text string to generate an embedding for. Mutually exclusive with texts.
texts array
Texts
List of text strings to generate embeddings for in a batch (maximum 250 texts per request). Mutually exclusive with text.
title string
Document title
Optional title for the text, recommended when taskType is RETRIEVAL_DOCUMENT.
workloadIdentityAudience string
Audience of the Workload Identity Federation provider
The full resource name of the workload identity pool provider, //iam.googleapis.com/projects/<number>/locations/global/workloadIdentityPools/<pool>/providers/<provider>.
Required with workloadIdentityToken, and must match the aud claim of the token.
workloadIdentityToken string
OIDC token for Workload Identity Federation
When set together with workloadIdentityAudience, the token is exchanged at Google STS for federated credentials and no service account key is needed: Google verifies it against the identity provider that issued it.
Use {{ oidcToken(audience='…') }} to have Kestra Enterprise mint one for the running execution.
Combine with impersonatedServiceAccount to act as a service account the pool may impersonate, and set projectId explicitly since no key file carries it.
Cannot be combined with serviceAccount.
Outputs
count integer
Count
Total number of embedding vectors generated.
dimension integer
Dimension
Dimensionality size of the returned vectors.
embedding array
Single embedding vector
Convenience vector populated when a single text property is provided.
embeddings array
Generated embeddings
List of vector embeddings for each input text.
Metrics
embeddings.count counter
Number of embeddings generated.
token.count counter
Total number of tokens consumed by the embedding model.