Use this file to discover all available pages before exploring further.
Vertex AI offers wide ranging support for embedding text, images and videos.
Portkey provides a standardized interface for embedding multiple modalities.
The gemini-embedding-2-preview model supports embedding across multiple modalities — text, image, video, and audio — through a single unified endpoint.
from portkey_ai import Portkeyclient = Portkey( api_key="YOUR_PORTKEY_API_KEY", provider="@PROVIDER", vertex_region="us-central1",)embeddings = client.embeddings.create( model="gemini-embedding-2-preview", input="What is the meaning of life?",)
from portkey_ai import Portkeyclient = Portkey( api_key="YOUR_PORTKEY_API_KEY", # defaults to os.environ.get("PORTKEY_API_KEY") provider="@PROVIDER",)embeddings = client.embeddings.create( model="textembedding-gecko@003", input_type="classification", input="The food was delicious and the waiter...", # input=["text to embed", "more text to embed"], # if you would like to embed multiple texts)
from portkey_ai import Portkeyclient = Portkey( api_key="YOUR_PORTKEY_API_KEY", # defaults to os.environ.get("PORTKEY_API_KEY") provider="@PROVIDER",)embeddings = client.embeddings.create( model="multimodalembedding@001", input=[ { "text": "this is the caption of the image", "image": { "base64": "UklGRkacAABXRUJQVlA4IDqcAACQggKdASqpAn8B.....", # "url": "gcs://..." # if you want to use a url } } ])
from portkey_ai import Portkeyclient = Portkey( api_key="YOUR_PORTKEY_API_KEY", # defaults to os.environ.get("PORTKEY_API_KEY") provider="@PROVIDER",)embeddings = client.embeddings.create( model="multimodalembedding@001", input=[ { "text": "this is the caption of the video", "video": { "base64": "UklGRkacAABXRUJQVlA4IDqcAACQggKdASqpAn8B.....", "start_offset": 0, "end_offset": 10, "interval": 5, # "url": "gcs://..." # if you want to use a url } } ])