added api instance launching, fixed api setup