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

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 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 onedatabricks-*foundation-model endpoint, anddatabricks serving-endpoints get <endpoint-name> --profile <PROFILE> -o json | grep -q '"ai_gateway"' && echo okshould printok. Endpoint availability varies by workspace and region.


