add branch api, remove extra model, combine to apis model