Execute Custom ML Endpoint
The code snippet given below allows you to pass input data to a published QuickML endpoint , and get the inferences from the ML model . The output returns the prediction of the values of the target column that is defined while creating the ML pipeline.
-
You will need to have the ML pipeline and the model’s endpoint configured and published in your project using the Catalyst console, before you execute this code to predict the outcome with the code snippet below.
-
QuickML is currently available to Catalyst users accessing from the US, IN, EU, JP, SA, or CA data centers.
The quickml component instance is created as shown, which will not fire a server-side call. You will need to create a data dictionary through which you can pass the input data to the model’s endpoint as key-value pairs. The dictionary keys must match the features from your trained dataset that is expected by the model. The endpoint_key mentioned is the unique ID of the endpoint published for the ML model configured in your project.
The endpoint key and the input data are passed to the run_inference ( endpoint_key, input_data) method for execution. The app reference used in the code below is the Python object returned as a response during SDK initialization.
Sample Code Snippet
# Create a QuickML instance.
quickml = app.quick_ml()
# Run Inference
# Replace with your endpoint key copied from the Catalyst console.
endpoint_key = "<ENDPOINT_KEY>"
# Replace the sample feature names and values with the input expected by your model.
input_data = {
“<FEATURE_1>”: “<VALUE_1>”,
“<FEATURE_2>”: “<VALUE_2>”
}
response = quickml.run_inference (endpoint_key, input_data)
print(response)
The syntax of the model response received is shown below:
{
"status": "success",
"result": [
{
"prediction": "1",
"confidence": 0.87
}
]
}
Parameters Used
| Parameter Name | Definition |
|---|---|
| endpoint_key | A mandatory parameter. Will store the unique ID of the endpoint published for the ML model. |
| input_data | A mandatory parameter. Will pass the required data input to the endpoint. |
Where to find the endpoint information?
Create an endpoint for your trained ML model and access the endpoint details page to view the Endpoint URL, required headers and a sample request response.

Last Updated 2026-09-08 15:18:40 +0530 IST
Yes
No
Send your feedback to us