Initial API for bayes.