Create Vertex AI extensions

This page applies to Apigee and Apigee hybrid.

This topic explains how to create Vertex AI extensions within API hub.

What is a Vertex AI extension?

Vertex AI extensions allow LLMs to connect to real-world data and actions through APIs. Extensions process user queries and communicate with large language models (LLMs) to execute operations on behalf of an application, such as a chat app.

For example, suppose you create a Vertex AI extension for a car rental API, and this extension is linked to a chat application. When a user asks the application about renting a car, the generative AI understands the context of the question and calls the extension API to rent a car.

For more information about Vertex AI extensions, see the Generative AI on Vertex AI Overview.

API hub streamlines Vertex AI extension creation

API hub streamlines the process of creating a Vertex AI extension by using existing API hub metadata. The key data used by API hub to create an extension are an API specification and a deployment, which, conveniently, are already validated by API hub. The specification provides the operations of the API to the extension, and the deployment provides the server endpoint of the API.

Create a Vertex AI extension

To create a Vertex AI extension in API hub:

Console

To create an extension:

  1. In the Google Cloud console, go to the APIs page in Apigee API hub.

    Go to API hub
  2. Locate the API where you want to add an extension. Use Filter to specify keywords to filter the list of APIs. If needed, use Search to locate an API.
  3. Click the API to view its details page.
  4. Click Create Vertex Extension.
  5. Specify extension details in the Create a Vertex Extension form:
    • Extension name: (Required) You must supply an extension name.
    • Description: (Required) Add a description of the extension.
    • Version: (Required) Select an API version.
    • Specification file: (Required) If a specification is linked to the API version, it is automatically populated in this field. See Manage API specifications.
    • Deployment: (Required) If a deployment is linked to the API version, it is automatically populated in this field. See Manage deployments.
  6. Click Create Extension. If you add the extension to the default version, the extension will show up in the Extensions section of the API details page. If you added the extension to another version, you'll have to view the version's details page to see the extension listed there.

List Vertex AI extensions

This section explains how to list vertex extensions.

Console

To view all the extensions associated with a registered API in the console:

  1. In the Google Cloud console, go to the API hub page.

    Go to API hub
  2. Click APIs.
  3. Locate the API you wish to inspect. Use Filter to specify keywords to filter the list of APIs. If needed, use Search to locate an API.
  4. Select an API.
  5. Any extensions that were added to the default version are listed in the Extensions section of the API details page. If an extension was added to another version, you'll have to view the version's details page to see the extension listed there.

Get Vertex AI extension details

This section explains how to get the details about a Vertex AI extension.

Console

To view Vertex AI extension details in the console:

  1. In the Google Cloud console, go to the API hub page.

    Go to API hub
  2. Click APIs.
  3. Locate the API you wish to inspect. Use Filter to specify keywords to filter the list of APIs. If needed, use Search to locate an API.
  4. Select an API.
  5. Any extensions that were added to the default version are listed in the Extensions section of the API details page. If an extension was added to another version, you'll have to view the version's details page to see the extension listed there. In the Vertex extensions table, click an extension to see its details page.

Delete a Vertex AI extension

This section explains how to delete a Vertex extension.

Console

To delete an extension:

  1. In the Google Cloud console, go to the API hub page.

    Go to API hub
  2. Click APIs.
  3. Locate the API that includes the extension you wish to delete. Use Filter to specify keywords to filter the list of APIs. If needed, use Search to locate an API.
  4. Select an API.
  5. Locate the extension to delete. Any extensions that were added to the default version are listed in the Extensions section of the API details page. If an extension was added to another version, you'll have to view the version's details page to see the extension listed there.
  6. From the Actions menu (the right side of the row containing the extension), click Delete.