Skip to main content

Query Foundation Model Endpoints

Query Databricks foundation-model endpoints for production-ready access to hosted models with built-in AI Gateway governance.

Query Foundation Model Endpoints 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 foundation-model serving endpoint for chat inference in your app
  • A query helper using the Databricks SDK for standard request/response interactions
  • An optional streaming setup using the Vercel AI SDK for real-time chat responses

Prerequisites

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

  • Foundation Model API endpoints with AI Gateway governance. Databricks-hosted foundation-model endpoints come preconfigured with AI Gateway features (usage tracking, rate limits, guardrails). Confirm availability by listing endpoints and checking the config: databricks serving-endpoints list --profile <PROFILE> should return at least one databricks-* foundation-model endpoint, and databricks serving-endpoints get <endpoint-name> --profile <PROFILE> -o json | grep -q '"ai_gateway"' && echo ok should print ok. Endpoint availability varies by workspace and region.