[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/sql/docs/mysql/model-endpoint-embeddings [Back]  [Original]

Generate vector embeddings with model endpoint management  |  Cloud SQL for MySQL  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Generate vector embeddings with model endpoint management Stay organized with collections Save and categorize content based on your preferences.

This page describes how to register an AI model endpoint and generate vector embeddings with model endpoint management. To use AI models in production environments, see Generate and manage vector embeddings.

After the model endpoints are added and registered in model endpoint management, you can reference them using the model ID to generate embeddings.

Before you begin

Make sure that you complete the following actions:

Generate embeddings

Use the mysql.ml_embedding() SQL function to call the registered model endpoint with the text embedding model type to generate embeddings.

To call the model and generate embeddings, use the following SQL query:

SELECT
  mysql.ml_embedding(
    'MODEL_ID',
    'CONTENT');

Replace the following:

Examples

Some examples for generating embeddings using registered model endpoints are listed in this section.

Text embedding models with built-in support

Vertex AI embedding models are supported by default. You don't need to register them. To generate embeddings for a registered gemini-embedding-001 model endpoint, run the following statement:

    SELECT
      mysql.ml_embedding(
        'gemini-embedding-001',
        'Cloud SQL is a managed, cloud-hosted SQL database service');
Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-17 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-17 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page