POST
/
api
/
projects
/
{projectName}
/
models
/
{modelName}
/
predict
curl --request POST \
  --url http://127.0.0.1:47334/api/projects/{projectName}/models/{modelName}/predict \
  --header 'Content-Type: application/json' \
  --data '[
  "<any>"
]'
curl --request POST \
  --url http://127.0.0.1:47334/api/projects/mindsdb/models/home_rentals_model/predict \
  --header 'Content-Type: application/json' \
  --data '{
    "data": [
      {
        "sqft": "823",
        "location": "good",
        "neighborhood": "downtown",
        "days_on_market": "10"
      }
    ]
  }'
curl --request POST \
  --url http://127.0.0.1:47334/api/projects/mindsdb/models/home_rentals_model/predict \
  --header 'Content-Type: application/json' \
  --data '{
    "data": [
      {
        "sqft": "823",
        "location": "good",
        "neighborhood": "downtown",
        "days_on_market": "10"
      }
    ]
  }'

The REST API endpoints can be used with MindsDB running locally at http://127.0.0.1:47334/api.

Note that data sent in the request is specific to the model. For instance, the home_rentals_model has been trained on data that includes details of rental properties, and we want to predict the rental_price value for a specific property that matches data passed in the request.

Path Parameters

projectName
string
required

The name of the project

modelName
string
required

The name of the model

Body

application/json · any[]

The body is of type any[].

Response

200
application/json
Model queried succesfully

The response is of type object.