Skip to main content

Generate Embeddings with AI Gateway

Generate text embeddings from a Databricks AI Gateway endpoint using the Databricks SDK.

Generate Embeddings with AI Gateway preview

Build with AI

  1. Copy the prompt below
  2. Paste into Cursor, Claude Code, Codex, or any coding agent
  3. Your agent builds it — asking questions along the way so the result is exactly what you want

New to templates? Learn more here

When done, you will have:

  • A configured embedding endpoint in your app environment
  • A reusable helper function that generates vector embeddings from text input
  • Integration with your existing Databricks workspace client via AppKit

Prerequisites

Verify these Databricks workspace features are enabled before starting. If any check fails, ask your workspace admin to enable the feature.

  • An embedding endpoint in Model Serving. Run databricks serving-endpoints list --profile <PROFILE> and confirm at least one embedding endpoint is listed (for example databricks-gte-large-en or databricks-bge-large-en, both 1024-dimension). Endpoint availability varies by workspace; note the endpoint name you plan to set as DATABRICKS_EMBEDDING_ENDPOINT.