add instance creation to instance API