Move api out