prediction in api