Initial work for prediction API.