Skip to main content

Query AI Gateway Endpoints

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

Query AI Gateway 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 AI Gateway 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.

  • AI Gateway (currently in Beta). AI Gateway is built into all Foundation Model API endpoints, but it is still a Beta feature — behavior and APIs can change. 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.