Databricks icon

Databricks

Interact with Databricks API

Model Serving → Query Endpoint

AI-generated

Overview

This node queries a model serving endpoint on Databricks. It automatically fetches the endpoint's OpenAPI schema to detect the expected input format and validates the request body accordingly. The node then sends the request to the endpoint's invocation URL and returns the model's response. This is useful for integrating machine learning model predictions into workflows, such as generating chat completions, embeddings, or other model outputs based on the endpoint's schema.

Use Case Examples

  1. Query a chat model endpoint with a user message to get a conversational response.
  2. Send an embedding request to a model serving endpoint to get vector representations of input text.
  3. Invoke a custom model endpoint with a JSON request body validated against the endpoint's schema.

Properties

Name Meaning
Endpoint The model serving endpoint to query. The node fetches the endpoint's OpenAPI schema to determine the correct invocation URL and input format. Supports selection from a list, by name, or by URL.
Request Body The JSON request body to send to the model serving endpoint. The node validates this input against the endpoint's OpenAPI schema at runtime to ensure correct format.

Output

JSON

- Properties returned by the model serving endpoint in response to the query

  • _metadata
    • endpoint - The name of the queried endpoint
    • detectedFormat - The detected input format of the request body based on the endpoint schema
    • invocationUrl - The invocation URL used to query the endpoint

Dependencies

  • Databricks API with an API token for authentication

Troubleshooting

  • Ensure the endpoint name or URL is correct and accessible.
  • Verify the request body matches the expected format as indicated by the example and validation errors.
  • If a 400 Bad Request error occurs, check the detailed error message and adjust the request body accordingly.
  • Make sure the API token credential is valid and has permission to access the model serving endpoint.

Links

Discussion