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

Build with AI
- Copy the prompt below
- Paste into Cursor, Claude Code, Codex, or any coding agent
- 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 exampledatabricks-gte-large-enordatabricks-bge-large-en, both 1024-dimension). Endpoint availability varies by workspace; note the endpoint name you plan to set asDATABRICKS_EMBEDDING_ENDPOINT.


