Skip to navigation

Kumo Relational is served through the Universal Structured Data Foundation Models (TFM) API, the same contract that sdm-client’s generated bindings (structured-data-models-api) speak. Use the Python SDK for standard workflows. Use REST directly for service integration or OpenAPI client generation.

Choose an Endpoint

Choose one of the following endpoints:

  • Self-hosted NIM: Use the base URL of your deployment. The NIM does not require authentication as part of its API contract, but a gateway in front of it might require an API key or another credential.
  • NVIDIA API Catalog: Use the server URL and bearer-token authentication shown in the Kumo Relational API reference.

Run a One-Shot Prediction

The POST /v1/predictions endpoint accepts a complete Universal TFM request that contains the model, task, relational schema, labeled context, rows to predict, requested outputs, and optional inference settings and metadata. It returns the prediction synchronously and does not create a durable prediction resource.

The client’s versioned wire-request examples include a complete relational count-regression request. The following Python example saves that request as request.json:

import json
from urllib.request import urlopen
url = (
"https://raw.githubusercontent.com/NVIDIA/structured-data-models-client/"
"v1.0.0/tests/golden/wire_payloads.json"
)
with urlopen(url) as response:
examples = json.load(response)
request = examples["relational/pql-count-aggregation"][0]
with open("request.json", "w") as output:
json.dump(request, output)

This small fixture demonstrates the request format. It does not measure prediction quality. Replace its sample data and task with your own after verifying that your deployment accepts it.

To send the request, complete the following steps:

  1. Set SDM_RELATIONAL_URL to the base URL of your deployment, such as http://localhost:8000.
  2. If applicable, add the authentication header required by your gateway. For the NVIDIA API Catalog endpoint, use the Authorization: Bearer $NVIDIA_API_KEY header, as shown in the generated API examples.
  3. Run the following command:
curl --fail-with-body \
--request POST \
--url "${SDM_RELATIONAL_URL}/v1/predictions" \
--header "Content-Type: application/json" \
--data @request.json

Sessions

POST /v1/sessions pins a context without running inference. POST /v1/sessions/{session_id}/predictions scores against it. DELETE /v1/sessions/{session_id} releases it. SDMClient.fit() and FittedModel.predict()/close() call these endpoints.

Response and Errors

A successful response contains a response-level correlation ID, the model name, prediction items, and metadata. Each prediction item includes a zero-based row_index. It can include the input id and requested fields such as prediction and probabilities.

Errors use application/problem+json with fields such as type, status, title, detail, and code. A request refused for exceeding a size limit, or an output a deployment does not serve, uses 422 with a code such as UNSUPPORTED_SHAPE or UNSUPPORTED_OUTPUT. Refer to the generated API reference for the complete request schema, response schema, error model, and runnable examples.

For more information, refer to the following pages: